Skip to content

Commit

Permalink
bugfix: Runtimes/Bugs Fixes (#5274)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottfrei authored Jun 25, 2024
1 parent 48d8197 commit b7e7fe2
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 76 deletions.
7 changes: 2 additions & 5 deletions code/_onclick/hud/swarmer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@

/atom/movable/screen/swarmer/ToggleLight/Click()
if(isswarmer(usr))
if(is_ventcrawling(usr))
to_chat(usr, "You can't toggle light in vent!")
return
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ToggleLight()
var/mob/living/simple_animal/hostile/swarmer/swarmer = usr
swarmer.ToggleLight()

/atom/movable/screen/swarmer/ContactSwarmers
icon_state = "ui_contact_swarmers"
Expand Down
10 changes: 5 additions & 5 deletions code/datums/spells/touch_attacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
return new /datum/spell_targeting/self


/obj/effect/proc_holder/spell/touch/Click(mob/user = usr)
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, span_warning("You can't control your hands!!"))
/obj/effect/proc_holder/spell/touch/Click()
if(HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
to_chat(usr, span_warning("You can't control your hands!!"))
return FALSE
if(attached_hand)
discharge_hand(user, TRUE)
discharge_hand(usr, TRUE)
return FALSE
charge_hand(user)
charge_hand(usr)


/obj/effect/proc_holder/spell/touch/proc/charge_hand(mob/living/carbon/user)
Expand Down
8 changes: 4 additions & 4 deletions code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,10 @@
to_chat(src, "<span class='info'>We successfully repaired ourselves.</span>")

/mob/living/simple_animal/hostile/swarmer/proc/ToggleLight()
if(!light_range)
set_light_on(TRUE)
else
set_light_on(FALSE)
if(!light_on && is_ventcrawling(src))
to_chat(src, span_warning("You cannot toggle light in vent!"))
return
set_light_on(!light_on)

/mob/living/simple_animal/hostile/swarmer/proc/ContactSwarmers()
var/message = input(src, "Announce to other swarmers", "Swarmer contact")
Expand Down
13 changes: 11 additions & 2 deletions code/game/gamemodes/shadowling/shadowling_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@
var/conseal_time = 4 SECONDS


/obj/effect/proc_holder/spell/shadowling_guise/Destroy()
if(action?.owner)
reveal(action.owner)
return ..()


/obj/effect/proc_holder/spell/shadowling_guise/create_new_targeting()
return new /datum/spell_targeting/self

Expand All @@ -178,7 +184,6 @@
addtimer(CALLBACK(src, PROC_REF(reveal), user), conseal_time)



/obj/effect/proc_holder/spell/shadowling_guise/proc/reveal(mob/user)
if(QDELETED(user))
return
Expand All @@ -187,7 +192,6 @@
user.visible_message("<span class='warning'>[user] appears from nowhere!</span>", "<span class='shadowling'>Your shadowy guise slips away.</span>")



/obj/effect/proc_holder/spell/shadowling_vision
name = "Shadowling Darksight"
desc = "Gives you night and thermal vision."
Expand All @@ -197,6 +201,11 @@
action_icon_state = "darksight"


/obj/effect/proc_holder/spell/shadowling_vision/Destroy()
action?.owner?.set_vision_override(null)
return ..()


/obj/effect/proc_holder/spell/shadowling_vision/create_new_targeting()
return new /datum/spell_targeting/self

Expand Down
15 changes: 9 additions & 6 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,13 @@ BLIND // can't see anything
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
slot_flags = ITEM_SLOT_CLOTH_OUTER
var/blood_overlay_type = "suit"
/// Whether suit is currently adjusted, example: shirt is buttoned.
/// If this variable is set to `TRUE` initial icon_state/item_state should be without "_open" postfix.
var/suit_adjusted = FALSE
/// Whether we can even adjust this suit.
var/ignore_suitadjust = TRUE
var/adjust_flavour = null
/// Flavour text used when adjusting this suit.
var/adjust_flavour
var/list/hide_tail_by_species = null
max_integrity = 400
integrity_failure = 160
Expand Down Expand Up @@ -718,8 +722,9 @@ BLIND // can't see anything
to_chat(user, "<span class='warning'>You yank and pull at \the [src] with your [pick("excessive", "extreme", "insane", "monstrous", "ridiculous", "unreal", "stupendous")] [pick("power", "strength")], however you are unable to change its state!</span>")//Yep, that's all they get. Avoids having to snowflake in a cooldown.
return

suit_adjusted = !suit_adjusted
update_icon(UPDATE_ICON_STATE)
update_equipped_item()
update_equipped_item(update_speedmods = FALSE)

if(suit_adjusted)
var/flavour = "close"
Expand All @@ -732,14 +737,12 @@ BLIND // can't see anything
flavour = "[adjust_flavour]"
to_chat(user, "You [flavour] [src].")

suit_adjusted = !suit_adjusted


/obj/item/clothing/suit/update_icon_state()
// Trims the '_open' off the end of the icon state, thus avoiding a case where jackets that start open will
// end up with a suffix of _open_open if adjusted twice, since their initial state is _open
var/base_icon_state = copytext(icon_state, 1, findtext(icon_state, "_open"))
var/base_item_state = copytext(item_state, 1, findtext(item_state, "_open"))
var/base_icon_state = replacetext("[icon_state]", "_open", "")
var/base_item_state = replacetext("[item_state]", "_open", "")

icon_state = suit_adjusted ? base_icon_state : "[base_icon_state]_open"
item_state = suit_adjusted ? base_item_state : "[base_item_state]_open"
Expand Down
6 changes: 2 additions & 4 deletions code/modules/clothing/suits/armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@
armor = list(melee = 25, bullet = 15, laser = 25, energy = 10, bomb = 25, bio = 0, rad = 0, fire = 50, acid = 50)
cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS
heat_protection = UPPER_TORSO|LOWER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/openclose)
adjust_flavour = "unzip"

Expand All @@ -145,8 +144,7 @@
icon_state = "hostrench_open"
item_state = "hostrench_open"
flags_inv_transparent = HIDEJUMPSUIT
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/openclose)
adjust_flavour = "unbutton"

Expand Down
25 changes: 7 additions & 18 deletions code/modules/clothing/suits/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe,
/obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/internals/emergency_oxygen,/obj/item/rad_laser)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10, fire = 50, acid = 50)
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand Down Expand Up @@ -109,7 +108,6 @@
icon_state = "cap_jacket_black_open"
item_state = "cap_jacket_black_open"
ignore_suitadjust = FALSE
suit_adjusted = TRUE
flags_inv_transparent = HIDEJUMPSUIT
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"
Expand All @@ -124,7 +122,6 @@
icon_state = "cap_jacket_open"
item_state = "cap_jacket_open"
ignore_suitadjust = FALSE
suit_adjusted = TRUE
flags_inv_transparent = HIDEJUMPSUIT
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"
Expand All @@ -135,7 +132,6 @@
icon_state = "bomber_captain_open"
item_state = "bomber_captain_open"
ignore_suitadjust = FALSE
suit_adjusted = TRUE
flags_inv_transparent = HIDEJUMPSUIT
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"
Expand Down Expand Up @@ -397,8 +393,7 @@
item_state = "suitjacket_black_open"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -409,8 +404,7 @@
item_state = "suitjacket_blue_open"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -431,8 +425,7 @@
flags_inv = HIDEJUMPSUIT
flags_inv_transparent = HIDEJUMPSUIT
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/storage/fancy/cigarettes, /obj/item/clothing/mask/cigarette, /obj/item/lighter, /obj/item/rcs, /obj/item/stack/packageWrap, /obj/item/stack/wrapping_paper, /obj/item/destTagger, /obj/item/pen, /obj/item/paper, /obj/item/stamp, /obj/item/qm_quest_tablet)
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -454,8 +447,7 @@
item_state = "ia_jacket_open"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -476,7 +468,6 @@
item_state = "ntrep"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
ignore_suitadjust = 0
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -499,8 +490,7 @@
blood_overlay_type = "armor"
allowed = list(/obj/item/stack/medical, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/reagent_containers/syringe,
/obj/item/healthanalyzer, /obj/item/flashlight, /obj/item/radio, /obj/item/tank/internals/emergency_oxygen,/obj/item/rad_laser)
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand Down Expand Up @@ -584,8 +574,7 @@
item_state = "suitjacket_hop_open"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand Down
3 changes: 1 addition & 2 deletions code/modules/clothing/suits/labcoat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
desc = "A suit that protects against minor chemical spills."
icon_state = "labcoat_open"
item_state = "labcoat_open"
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
permeability_coefficient = 0.5
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
Expand Down
22 changes: 12 additions & 10 deletions code/modules/clothing/suits/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,7 @@
icon_state = "trackjacket_open"
item_state = "bltrenchcoat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
ignore_suitadjust = 0
suit_adjusted = 1
ignore_suitadjust = FALSE
actions_types = list(/datum/action/item_action/openclose)
adjust_flavour = "unzip"

Expand Down Expand Up @@ -831,7 +830,7 @@
desc = "A canvas jacket styled after classical American military garb. Feels sturdy, yet comfortable. This one comes in olive."
icon_state = "militaryjacket"
item_state = "militaryjacket"
ignore_suitadjust = 1
ignore_suitadjust = TRUE
actions_types = null
adjust_flavour = null
allowed = list(/obj/item/flashlight,/obj/item/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/storage/fancy/cigarettes,/obj/item/lighter,/obj/item/gun/projectile/automatic/pistol,/obj/item/gun/projectile/revolver,/obj/item/gun/projectile/revolver/detective)
Expand Down Expand Up @@ -928,7 +927,8 @@
desc = "Aviators not included."
icon_state = "bomber"
item_state = "bomber"
ignore_suitadjust = 0
ignore_suitadjust = FALSE
suit_adjusted = TRUE
allowed = list(/obj/item/flashlight,/obj/item/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/storage/fancy/cigarettes,/obj/item/lighter)
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
cold_protection = UPPER_TORSO|LOWER_TORSO|ARMS
Expand All @@ -952,7 +952,8 @@
w_class = WEIGHT_CLASS_NORMAL
icon_state = "bombersec"
item_state = "bombersec"
ignore_suitadjust = 0
ignore_suitadjust = FALSE
suit_adjusted = TRUE
//Inherited from Security armour.
allowed = list(/obj/item/gun/energy,/obj/item/reagent_containers/spray/pepper,/obj/item/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/melee/baton,/obj/item/restraints/handcuffs,/obj/item/flashlight/seclite,/obj/item/melee/classic_baton/telescopic,/obj/item/kitchen/knife/combat)
heat_protection = UPPER_TORSO|LOWER_TORSO
Expand All @@ -967,7 +968,7 @@
name = "leather jacket"
desc = "Pompadour not included."
icon_state = "leatherjacket"
ignore_suitadjust = 1
ignore_suitadjust = TRUE
actions_types = null
adjust_flavour = null
resistance_flags = NONE
Expand All @@ -978,7 +979,6 @@
icon_state = "motojacket_open"
item_state = "motojacket_open"
ignore_suitadjust = FALSE
suit_adjusted = TRUE
actions_types = list(/datum/action/item_action/zipper)
adjust_flavour = "unzip"

Expand Down Expand Up @@ -1006,7 +1006,8 @@
desc = "A classy clown officer's overcoat, also designed by Hugo Boss."
icon_state = "officersuit"
item_state = "officersuit"
ignore_suitadjust = 0
ignore_suitadjust = FALSE
suit_adjusted = TRUE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand All @@ -1025,7 +1026,8 @@
desc = "An overcoat for the clown soldier, to keep him warm during those cold winter nights on the front."
icon_state = "soldiersuit"
item_state = "soldiersuit"
ignore_suitadjust = 0
ignore_suitadjust = FALSE
suit_adjusted = TRUE
actions_types = list(/datum/action/item_action/button)
adjust_flavour = "unbutton"

Expand Down Expand Up @@ -1285,7 +1287,7 @@
name = "Suragi Jacket"
desc = "Smoke one cigarette"
icon_state = "suragi_jacket_civ"
ignore_suitadjust = 1
ignore_suitadjust = TRUE
blood_overlay_type = ""
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
allowed = list(/obj/item/flashlight,/obj/item/tank/internals/emergency_oxygen,/obj/item/toy,/obj/item/storage/fancy/cigarettes,/obj/item/lighter,/obj/item/gun/projectile/automatic/pistol,/obj/item/gun/projectile/revolver,/obj/item/gun/projectile/revolver/detective)
Expand Down
Loading

0 comments on commit b7e7fe2

Please sign in to comment.