Skip to content

Commit

Permalink
bugfix: text corrections for spessuit storages and smol combat defib. (
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir authored Nov 4, 2023
1 parent ac4c4ac commit 7635631
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
30 changes: 18 additions & 12 deletions code/game/machinery/suit_storage_unit.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// SUIT STORAGE UNIT /////////////////
/obj/machinery/suit_storage_unit
name = "suit storage unit"
desc = "An industrial U-Stor-It Storage unit designed to accomodate all kinds of space suits. Its on-board equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. There's a warning label dangling from the control pad, reading \"STRICTLY NO BIOLOGICALS IN THE CONFINES OF THE UNIT\"."
desc = "An industrial \"U-Stor-It Storage\" unit designed to accommodate all types of spacesuits. \
Its onboard equipment also allows the user to decontaminate the contents through a UV-ray purging cycle."
icon = 'icons/obj/machines/suit_storage.dmi'
icon_state = "close"
anchored = TRUE
Expand Down Expand Up @@ -51,9 +52,12 @@
helmet_type = /obj/item/clothing/head/helmet/space/ert_eva_amber
mask_type = /obj/item/clothing/mask/gas/sechailer
storage_type = /obj/item/tank/internals/oxygen/red

/obj/machinery/suit_storage_unit/captain
name = "captain's suit storage unit"
desc = "An industrial U-Stor-It Storage unit designed to accomodate all kinds of space suits. Its on-board equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. There's a warning label dangling from the control pad, reading \"STRICTLY NO BIOLOGICALS IN THE CONFINES OF THE UNIT\". This one looks kind of fancy."
desc = "An industrial \"U-Stor-It Storage\" unit designed to accommodate all types of spacesuits. \
Its onboard equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. \
This one looks kind of fancy."
suit_type = /obj/item/clothing/suit/space/captain
helmet_type = /obj/item/clothing/head/helmet/space/capspace
mask_type = /obj/item/clothing/mask/gas
Expand Down Expand Up @@ -148,6 +152,7 @@
magboots_type = /obj/item/clothing/shoes/magboots/security
storage_type = /obj/item/tank/internals/oxygen
req_access = list(ACCESS_BLUESHIELD)

/obj/machinery/suit_storage_unit/rd
name = "research director's suit storage unit"
suit_type = /obj/item/clothing/suit/space/hardsuit/rd
Expand Down Expand Up @@ -263,6 +268,10 @@
QDEL_NULL(wires)
return ..()

/obj/machinery/suit_storage_unit/examine(mob/user)
. = ..()
. += " There's a warning label dangling from the control pad that reads:<br>[span_danger("\"BIOLOGICAL SUBJECTS ARE STRICTLY PROHIBITED IN THE CONFINES OF THE UNIT.\"")]"

/obj/machinery/suit_storage_unit/update_icon()
cut_overlays()

Expand Down Expand Up @@ -520,9 +529,6 @@
SStgui.update_uis(src)
update_icon()


////////

/obj/machinery/suit_storage_unit/attack_hand(mob/user)
if(..() || (stat & NOPOWER))
return
Expand Down Expand Up @@ -631,7 +637,7 @@
usr.put_in_active_hand(storage, ignore_anim = FALSE)
storage = null

/obj/machinery/suit_storage_unit/proc/toggle_open(mob/user as mob)
/obj/machinery/suit_storage_unit/proc/toggle_open(mob/user)
if(locked || uv)
to_chat(user, span_danger("Unable to open unit."))
return
Expand All @@ -640,7 +646,7 @@
return
state_open = !state_open

/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob)
/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user)
if(!allowed(user))
to_chat(user, span_warning("Access denied."))
return
Expand All @@ -654,7 +660,7 @@
return
locked = !locked

/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob)
/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user)
if(locked)
return

Expand All @@ -669,7 +675,7 @@
occupant.forceMove(loc)
occupant = null
if(!state_open)
state_open = 1
state_open = TRUE
update_icon()
return

Expand All @@ -681,7 +687,7 @@
set category = "Object"
set src in oview(1)

if(usr.stat != 0)
if(usr.stat)
return
eject_occupant(usr)
add_fingerprint(usr)
Expand All @@ -694,7 +700,7 @@
set category = "Object"
set src in oview(1)

if(usr.stat != 0)
if(usr.stat)
return
if(usr.incapacitated() || usr.buckled) //are you cuffed, dying, lying, stunned or other
return
Expand All @@ -721,7 +727,7 @@
else
occupant = null

/obj/machinery/suit_storage_unit/attack_ai(mob/user as mob)
/obj/machinery/suit_storage_unit/attack_ai(mob/user)
return attack_hand(user)

/obj/machinery/suit_storage_unit/proc/check_electrified_callback()
Expand Down
32 changes: 16 additions & 16 deletions code/game/objects/items/devices/handheld_defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
emagged = TRUE
desc += " The screen only shows the word KILL flashing over and over."
if(user)
to_chat(user, "<span class='warning'>you short out the safeties on [src]</span>")
to_chat(user, span_warning("you short out the safeties on [src]"))
else
add_attack_logs(user, src, "un-emagged")
emagged = FALSE
desc = "Used to restart stopped hearts."
if(user)
to_chat(user, "<span class='warning'>You restore the safeties on [src]</span>")
to_chat(user, span_warning("You restore the safeties on [src]"))

/obj/item/handheld_defibrillator/emp_act(severity)
if(emagged)
emagged = FALSE
desc = "Used to restart stopped hearts."
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
visible_message(span_notice("[src] beeps: Safety protocols enabled!"))
playsound(get_turf(src), 'sound/machines/defib_saftyon.ogg', 50, 0)
else
emagged = TRUE
desc += " The screen only shows the word KILL flashing over and over."
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
visible_message(span_notice("[src] beeps: Safety protocols disabled!"))
playsound(get_turf(src), 'sound/machines/defib_saftyoff.ogg', 50, 0)

/obj/item/handheld_defibrillator/attack(mob/living/carbon/human/H, mob/user)
Expand All @@ -51,44 +51,44 @@
if(HardS.shield)
HardS.shield.hit_reaction(user, src, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(cooldown)
to_chat(user, "<span class='warning'>[src] is still charging!</span>")
to_chat(user, span_warning("[src] is still charging!"))
return
if(emagged || (H.health <= HEALTH_THRESHOLD_CRIT) || (H.undergoing_cardiac_arrest()))
user.visible_message("<span class='notice'>[user] shocks [H] with [src].</span>", "<span class='notice'>You tried to shock [H] with [src].</span>")
user.visible_message(span_notice("[user] shocks [H] with [src]."), span_notice("You tried to shock [H] with [src]."))
add_attack_logs(user, H, "defibrillated with [src]")
playsound(get_turf(src), "sound/weapons/Egloves.ogg", 75, 1)
if(!blocked)
if(H.stat == DEAD)
to_chat(user, "<span class='danger'>[H] doesn't respond at all!</span>")
to_chat(user, span_danger("[H] doesn't respond at all!"))
if(H.stat != DEAD)
H.set_heartattack(FALSE)
var/total_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss()
if(H.health <= HEALTH_THRESHOLD_CRIT)
if(total_damage >= 90)
to_chat(user, "<span class='danger'>[H] looks horribly injured. Resuscitation alone may not help revive them.</span>")
to_chat(user, span_danger("[H] looks horribly injured. Resuscitation alone may not help revive them."))
if(prob(66))
to_chat(user, "<span class='notice'>[H] inhales deeply!</span>")
to_chat(user, span_danger("[H] inhales deeply!"))
H.adjustOxyLoss(-50)
else
to_chat(user, "<span class='danger'>[H] doesn't respond!</span>")
to_chat(user, span_danger("[H] doesn't respond!"))

H.AdjustWeakened(4 SECONDS)
H.AdjustStuttering(20 SECONDS)
to_chat(H, "<span class='danger'>You feel a powerful jolt!</span>")
to_chat(H, span_danger("You feel a powerful jolt!"))
H.shock_internal_organs(100)

if(emagged && prob(10))
to_chat(user, "<span class='danger'>[src]'s on board scanner indicates that the target is undergoing a cardiac arrest!</span>")
to_chat(user, span_danger("[src]'s on board scanner indicates that the target is undergoing a cardiac arrest!"))
H.set_heartattack(TRUE)
if(blocked)
to_chat(user, "<span class='danger'>[H] has a hardsuit!</span>")
else
to_chat(user, span_danger("[H] has a hardsuit!"))
cooldown = TRUE
icon_state = "[icon_base]-shock"
addtimer(CALLBACK(src, PROC_REF(short_charge)), 10)
addtimer(CALLBACK(src, PROC_REF(recharge)), charge_time)

else
to_chat(user, "<span class='notice'>[src]'s on board medical scanner indicates that no shock is required.</span>")
to_chat(user, span_notice("[src]'s on board medical scanner indicates that no shock is required."))

/obj/item/handheld_defibrillator/proc/short_charge()
icon_state = "[icon_base]-off"
Expand All @@ -100,7 +100,7 @@

/obj/item/handheld_defibrillator/syndie
name = "combat handheld defibrillator"
desc = "Used to restart stopped hearts(Not nanotrasen's pigs hearts"
desc = "Used to restart stopped hearts (Not nanotrasen's pigs hearts)."
icon_state = "sdefib-on"
item_state = "sdefib"
charge_time = 30
Expand Down

0 comments on commit 7635631

Please sign in to comment.