Skip to content

Commit

Permalink
Changes more <span>'s into span_defines, fixes more lists, de-hardcod…
Browse files Browse the repository at this point in the history
…es a lil bit of code and removes useless defines (vlggms#1930)

* spans and lists

* bap

* some more fixes

* unknown
  • Loading branch information
Gboster-0 authored Feb 8, 2024
1 parent e4acc2c commit fe3bf24
Show file tree
Hide file tree
Showing 50 changed files with 606 additions and 604 deletions.
2 changes: 1 addition & 1 deletion ModularTegustation/tegu_cloning/machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

//Potential replacement for genetics revives or something I dunno (?)

#define CLONE_INITIAL_DAMAGE 150 //Clones in clonepods start with 150 cloneloss damage and 150 brainloss damage, thats just logical
#define CLONE_INITIAL_DAMAGE 150 //Clones in clonepods start with 150 cloneloss damage and 150 brainloss damage, thats just logical
#define MINIMUM_HEAL_LEVEL 40

#define SPEAK(message) radio.talk_into(src, message, radio_channel)
Expand Down
108 changes: 57 additions & 51 deletions ModularTegustation/tegu_security_code/detective_vendor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,63 @@
icon_state = "det"
icon_deny = "det-deny"
req_access = list(ACCESS_FORENSICS_LOCKERS)
products = list(/obj/item/clothing/suit/det_suit/disco = 1,
/obj/item/clothing/suit/det_suit/disco/aerostatic = 1,
/obj/item/clothing/suit/det_suit = 1,
/obj/item/clothing/suit/det_suit/grey = 1,
/obj/item/clothing/suit/det_suit/noir = 1,
/obj/item/clothing/suit/armor/vest/det_suit = 1,
/obj/item/clothing/under/rank/security/detective/disco = 4,
/obj/item/clothing/under/rank/security/detective/disco/aerostatic = 4,
/obj/item/clothing/under/rank/security/detective = 4,
/obj/item/clothing/under/rank/security/detective/skirt = 4,
/obj/item/clothing/under/rank/security/detective/grey = 4,
/obj/item/clothing/under/rank/security/detective/grey/skirt = 4,
/obj/item/clothing/accessory/waistcoat = 4,
/obj/item/clothing/neck/tie/detective/disco_necktie = 4,
/obj/item/clothing/gloves/color/black/aerostatic_gloves = 4,
/obj/item/clothing/gloves/color/black = 4,
/obj/item/clothing/shoes/sneakers/disco = 4,
/obj/item/clothing/shoes/jackboots/aerostatic = 4,
/obj/item/clothing/shoes/laceup/digitigrade = 4,
/obj/item/clothing/shoes/laceup = 4,
/obj/item/clothing/glasses/sunglasses/disco = 4,
/obj/item/clothing/head/fedora/det_hat = 4,
/obj/item/clothing/head/fedora = 4,
/obj/item/assembly/flash/handheld = 4,
/obj/item/flashlight/seclite = 4,
/obj/item/radio/off/security = 4,
/obj/item/detective_scanner = 1,
/obj/item/radio/headset/headset_discipline = 1,
/obj/item/holosign_creator/security = 1,
/obj/item/reagent_containers/spray/pepper = 1,
/obj/item/storage/belt/holster/detective/full = 1,
/obj/item/pinpointer/crew = 1,
/obj/item/binoculars = 1,
/obj/item/storage/box/rxglasses/spyglasskit = 1,
/obj/item/folder = 4,
/obj/item/disk/forensic = 12,
/obj/item/storage/box/evidence = 12,
/obj/item/storage/box/matches = 12,
/obj/item/storage/fancy/cigarettes/cigars = 12,
/obj/item/reagent_containers/food/drinks/coffee = 12,
/obj/item/food/donut = 12)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,
/obj/item/storage/fancy/donut_box = 2)
premium = list(/obj/item/storage/belt/security/webbing = 5,
/obj/item/coin/antagtoken = 1,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 4,
/obj/item/storage/box/gum/nicotine = 2,
/obj/item/lighter = 4,
/obj/item/clothing/mask/cigarette/pipe = 4,
/obj/item/storage/fancy/cigarettes/cigars/havana = 12,
/obj/item/storage/fancy/cigarettes/cigars/cohiba = 12)
products = list(
/obj/item/clothing/suit/det_suit/disco = 1,
/obj/item/clothing/suit/det_suit/disco/aerostatic = 1,
/obj/item/clothing/suit/det_suit = 1,
/obj/item/clothing/suit/det_suit/grey = 1,
/obj/item/clothing/suit/det_suit/noir = 1,
/obj/item/clothing/suit/armor/vest/det_suit = 1,
/obj/item/clothing/under/rank/security/detective/disco = 4,
/obj/item/clothing/under/rank/security/detective/disco/aerostatic = 4,
/obj/item/clothing/under/rank/security/detective = 4,
/obj/item/clothing/under/rank/security/detective/skirt = 4,
/obj/item/clothing/under/rank/security/detective/grey = 4,
/obj/item/clothing/under/rank/security/detective/grey/skirt = 4,
/obj/item/clothing/accessory/waistcoat = 4,
/obj/item/clothing/neck/tie/detective/disco_necktie = 4,
/obj/item/clothing/gloves/color/black/aerostatic_gloves = 4,
/obj/item/clothing/gloves/color/black = 4,
/obj/item/clothing/shoes/sneakers/disco = 4,
/obj/item/clothing/shoes/jackboots/aerostatic = 4,
/obj/item/clothing/shoes/laceup/digitigrade = 4,
/obj/item/clothing/shoes/laceup = 4,
/obj/item/clothing/glasses/sunglasses/disco = 4,
/obj/item/clothing/head/fedora/det_hat = 4,
/obj/item/clothing/head/fedora = 4,
/obj/item/assembly/flash/handheld = 4,
/obj/item/flashlight/seclite = 4,
/obj/item/radio/off/security = 4,
/obj/item/detective_scanner = 1,
/obj/item/radio/headset/headset_discipline = 1,
/obj/item/holosign_creator/security = 1,
/obj/item/reagent_containers/spray/pepper = 1,
/obj/item/storage/belt/holster/detective/full = 1,
/obj/item/pinpointer/crew = 1,
/obj/item/binoculars = 1,
/obj/item/storage/box/rxglasses/spyglasskit = 1,
/obj/item/folder = 4,
/obj/item/disk/forensic = 12,
/obj/item/storage/box/evidence = 12,
/obj/item/storage/box/matches = 12,
/obj/item/storage/fancy/cigarettes/cigars = 12,
/obj/item/reagent_containers/food/drinks/coffee = 12,
/obj/item/food/donut = 12,
)
contraband = list(
/obj/item/clothing/glasses/sunglasses = 2,
/obj/item/storage/fancy/donut_box = 2,
)
premium = list(
/obj/item/storage/belt/security/webbing = 5,
/obj/item/coin/antagtoken = 1,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 4,
/obj/item/storage/box/gum/nicotine = 2,
/obj/item/lighter = 4,
/obj/item/clothing/mask/cigarette/pipe = 4,
/obj/item/storage/fancy/cigarettes/cigars/havana = 12,
/obj/item/storage/fancy/cigarettes/cigars/cohiba = 12,
)

refill_canister = /obj/item/vending_refill/detective
extra_price = 100
Expand Down
12 changes: 6 additions & 6 deletions code/__DEFINES/~lobotomy_defines/adventure.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// defines used in ModularTegustation/_adventure_console

#define DEBUG_TEXT_DISPLAY 1
#define NORMAL_TEXT_DISPLAY 2
#define ADVENTURE_TEXT_DISPLAY 3
#define DEBUG_TEXT_DISPLAY (1<<0)
#define NORMAL_TEXT_DISPLAY (1<<1)
#define ADVENTURE_TEXT_DISPLAY (1<<2)

//Modes for what is displayed on the adventure panel.
#define ADVENTURE_MODE_TRAVEL 1
#define ADVENTURE_MODE_BATTLE 2
#define ADVENTURE_MODE_EVENT_BATTLE 3
#define ADVENTURE_MODE_TRAVEL (1<<0)
#define ADVENTURE_MODE_BATTLE (1<<1)
#define ADVENTURE_MODE_EVENT_BATTLE (1<<2)

//Stats defined. I honestly didnt want to make it have limbus company sins but here we are.
#define WRATH_STAT 1
Expand Down
30 changes: 15 additions & 15 deletions code/game/objects/items/ego_weapons/_ego_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,41 @@
. = ..()
. += EgoAttackInfo(user)
if(special)
. += "<span class='notice'>[special]</span>"
. += span_notice("[special]")
if(LAZYLEN(attribute_requirements))
. += "<span class='notice'>It has <a href='?src=[REF(src)];list_attributes=1'>certain requirements</a> for the wearer.</span>"
. += span_notice("It has <a href='?src=[REF(src)];list_attributes=1'>certain requirements</a> for the wearer.")

if(type in GLOB.small_ego)
. += "<span class='notice'>This weapon fits in an EGO belt.</span>"
. += span_notice("This weapon fits in an EGO belt.")

if(reach>1)
. += "<span class='notice'>This weapon has a reach of [reach].</span>"
. += span_notice("This weapon has a reach of [reach].")

if(throwforce>force)
. += "<span class='notice'>This weapon deals [throwforce] [damtype] damage when thrown.</span>"
. += span_notice("This weapon deals [throwforce] [damtype] damage when thrown.")

if(!attack_speed)
return

//Can't switch for less than for some reason
if(attack_speed<0.4)
. += "<span class='notice'>This weapon has a very fast attack speed.</span>"
. += span_notice("This weapon has a very fast attack speed.")
else if(attack_speed<0.7)
. += "<span class='notice'>This weapon has a fast attack speed.</span>"
. += span_notice("This weapon has a fast attack speed.")
else if(attack_speed<1)
. += "<span class='notice'>This weapon attacks slightly faster than normal.</span>"
. += span_notice("This weapon attacks slightly faster than normal.")
else if(attack_speed<1.5)
. += "<span class='notice'>This weapon attacks slightly slower than normal.</span>"
. += span_notice("This weapon attacks slightly slower than normal.")
else if(attack_speed<2)
. += "<span class='notice'>This weapon has a slow attack speed.</span>"
. += span_notice("This weapon has a slow attack speed.")
else if(attack_speed>=2)
. += "<span class='notice'>This weapon attacks extremely slow.</span>"
. += span_notice("This weapon attacks extremely slow.")


/obj/item/ego_weapon/Topic(href, href_list)
. = ..()
if(href_list["list_attributes"])
var/display_text = "<span class='warning'><b>It requires the following attributes:</b></span>"
var/display_text = span_warning("<b>It requires the following attributes:</b>")
for(var/atr in attribute_requirements)
if(attribute_requirements[atr] > 0)
display_text += "\n <span class='warning'>[atr]: [attribute_requirements[atr]].</span>"
Expand All @@ -85,7 +85,7 @@
var/mob/living/carbon/human/H = user
for(var/atr in attribute_requirements)
if(attribute_requirements[atr] > get_attribute_level(H, atr))
to_chat(H, "<span class='notice'>You cannot use [src]!</span>")
to_chat(H, span_notice("You cannot use [src]!"))
return FALSE
if(!SpecialEgoCheck(H))
return FALSE
Expand All @@ -99,8 +99,8 @@

/obj/item/ego_weapon/proc/EgoAttackInfo(mob/user)
if(force_multiplier != 1)
return "<span class='notice'>It deals [round(force * force_multiplier, 0.1)] [damtype] damage. (+ [(force_multiplier - 1) * 100]%)</span>"
return "<span class='notice'>It deals [force] [damtype] damage.</span>"
return span_notice("It deals [round(force * force_multiplier, 0.1)] [damtype] damage. (+ [(force_multiplier - 1) * 100]%)")
return span_notice("It deals [force] [damtype] damage.")

/*
* Used to clean up any remaining variables or timers in an ego weapon.
Expand Down
38 changes: 19 additions & 19 deletions code/game/objects/items/ego_weapons/_lists.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
//Everything here fits in a belt
GLOBAL_LIST_INIT(small_ego, list (
//EGO weapons
/obj/item/gun/ego_gun/pistol,
/obj/item/ego_weapon/mini,
/obj/item/ego_weapon/warp/knife,
/obj/item/ego_weapon/support/letter_opener,
/obj/item/ego_weapon/charge/warring,
/obj/item/gun/ego_gun/feather,
//EGO weapons
/obj/item/gun/ego_gun/pistol,
/obj/item/ego_weapon/mini,
/obj/item/ego_weapon/warp/knife,
/obj/item/ego_weapon/support/letter_opener,
/obj/item/ego_weapon/charge/warring,
/obj/item/gun/ego_gun/feather,

//Non-EGO weapons
/obj/item/ego_weapon/city/ncorp_mark,
/obj/item/ego_weapon/city/ncorp_nail,
/obj/item/ego_weapon/city/ncorp_brassnail,
/obj/item/ego_weapon/city/rats,
/obj/item/ego_weapon/city/charge/rosespanner/minihammer,
/obj/item/ego_weapon/city/seven_fencing/dagger,
/obj/item/ego_weapon/city/jeong,
/obj/item/ego_weapon/city/awl,
/obj/item/ego_weapon/city/charge/wcorp/hatchet,
/obj/item/gun/ego_gun/city/fullstop/deagle,
))
//Non-EGO weapons
/obj/item/ego_weapon/city/ncorp_mark,
/obj/item/ego_weapon/city/ncorp_nail,
/obj/item/ego_weapon/city/ncorp_brassnail,
/obj/item/ego_weapon/city/rats,
/obj/item/ego_weapon/city/charge/rosespanner/minihammer,
/obj/item/ego_weapon/city/seven_fencing/dagger,
/obj/item/ego_weapon/city/jeong,
/obj/item/ego_weapon/city/awl,
/obj/item/ego_weapon/city/charge/wcorp/hatchet,
/obj/item/gun/ego_gun/city/fullstop/deagle,
))

Loading

0 comments on commit fe3bf24

Please sign in to comment.