From 23bc71bd2f116078beed34f027cd697234415471 Mon Sep 17 00:00:00 2001
From: Doxxmedearly <38594443+Doxxmedearly@users.noreply.github.com>
Date: Fri, 3 Jun 2022 06:58:42 -0400
Subject: [PATCH] Round of small bugfixes (#14160)
---
code/game/objects/items.dm | 2 +-
.../objects/items/weapons/extinguisher.dm | 23 ++---
.../items/weapons/implants/implantfreedom.dm | 89 ++++++++++---------
code/game/objects/structures/gore/tendrils.dm | 10 +--
.../abstract/new_player/sprite_accessories.dm | 4 +-
code/modules/mob/inventory.dm | 6 +-
.../tools/ano_device_battery.dm | 2 +-
html/changelogs/doxxmedearly-smallfixes.yml | 11 +++
8 files changed, 81 insertions(+), 66 deletions(-)
create mode 100644 html/changelogs/doxxmedearly-smallfixes.yml
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 3b71597e338..cdb5aa8bbfc 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -14,7 +14,7 @@
var/storage_cost
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
var/no_attack_log = 0 //If it's an item we don't want to log attack_logs with, set this to 1
- pass_flags = PASSTABLE
+ pass_flags = PASSTABLE | PASSRAILING
var/obj/item/master
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index 87f2a07b2ea..8fbc983f24c 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -19,15 +19,23 @@
drop_sound = 'sound/items/drop/gascan.ogg'
pickup_sound = 'sound/items/pickup/gascan.ogg'
-/obj/item/reagent_containers/extinguisher_refill/attackby(var/obj/O as obj, var/mob/user as mob)
+/obj/item/reagent_containers/extinguisher_refill/attackby(obj/item/O, mob/user)
+ if(O.isscrewdriver())
+ if(is_open_container())
+ flags &= ~OPENCONTAINER
+ else
+ flags |= OPENCONTAINER
+ to_chat(user, SPAN_NOTICE("Using \the [O], you [is_open_container() ? "unsecure" : "secure"] the cartridge's lid!"))
+ return TRUE
+
if(istype(O,/obj/item/extinguisher))
var/obj/item/extinguisher/E = O
- if(src.is_open_container())
+ if(is_open_container())
to_chat(user,"\The [src] needs to be secured first!")
- else if(src.reagents.total_volume <= 0)
+ else if(reagents.total_volume <= 0)
to_chat(user,"\The [src] is empty!")
else if(E.reagents.total_volume < E.reagents.maximum_volume)
- src.reagents.trans_to(E, src.reagents.total_volume)
+ reagents.trans_to(E, src.reagents.total_volume)
user.visible_message("[user] fills \the [E] with the [src].", "You fill \the [E] with the [src].")
playsound(E.loc, 'sound/items/stimpack.ogg', 50, 1)
else
@@ -47,13 +55,6 @@
to_chat(user,"\The reagents inside [src] are already secured!")
return
-/obj/item/reagent_containers/extinguisher_refill/attackby(obj/item/W, mob/user)
- if(W.isscrewdriver() && !is_open_container())
- to_chat(user,"Using \the [W], you unsecure the extinguisher refill cartridge's lid.") // it locks shut after being secured
- flags |= OPENCONTAINER
- return TRUE
- . = ..()
-
/obj/item/reagent_containers/extinguisher_refill/examine(var/mob/user) //Copied from inhalers.
if(!..(user, 2))
return
diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm
index a4c670b0d21..20ce9ea08ab 100644
--- a/code/game/objects/items/weapons/implants/implantfreedom.dm
+++ b/code/game/objects/items/weapons/implants/implantfreedom.dm
@@ -5,56 +5,59 @@
desc = "Use this to escape from those evil Red Shirts."
implant_color = "r"
var/activation_emote = "chuckle"
- var/uses = 1.0
+ var/uses = 1
+/obj/item/implant/freedom/New()
+ uses = rand(1, 5)
+ ..()
- New()
- src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
- src.uses = rand(1, 5)
- ..()
+/obj/item/implant/freedom/trigger(emote, mob/living/carbon/source)
+ if(!activation_emote)
return
-
-
- trigger(emote, mob/living/carbon/source as mob)
- if (src.uses < 1) return 0
- if (emote == src.activation_emote)
- src.uses--
- to_chat(source, "You feel a faint click.")
- if (source.handcuffed)
- var/obj/item/W = source.handcuffed
- source.handcuffed = null
- if(source.buckled_to && source.buckled_to.buckle_require_restraints)
- source.buckled_to.unbuckle()
- source.update_inv_handcuffed()
- if (source.client)
- source.client.screen -= W
- if (W)
- W.forceMove(source.loc)
- dropped(source)
- if (W)
- W.layer = initial(W.layer)
- if (source.legcuffed)
- var/obj/item/W = source.legcuffed
- source.legcuffed = null
- source.update_inv_legcuffed()
- if (source.client)
- source.client.screen -= W
- if (W)
- W.forceMove(source.loc)
- dropped(source)
- if (W)
- W.layer = initial(W.layer)
+ if(uses < 1)
+ to_chat(source, SPAN_WARNING("\The [src] gives a faint beep inside your head, indicating that it's out of uses!"))
+ activation_emote = null //Disable this to allow them to emote normally
return
+ if(emote == activation_emote)
+ uses--
+ to_chat(source, "You feel a faint click.")
+ if(source.handcuffed)
+ var/obj/item/W = source.handcuffed
+ source.handcuffed = null
+ if(source.buckled_to && source.buckled_to.buckle_require_restraints)
+ source.buckled_to.unbuckle()
+ source.update_inv_handcuffed()
+ if(source.client)
+ source.client.screen -= W
+ if(W)
+ W.forceMove(source.loc)
+ dropped(source)
+ if (W)
+ W.layer = initial(W.layer)
+ if(source.legcuffed)
+ var/obj/item/W = source.legcuffed
+ source.legcuffed = null
+ source.update_inv_legcuffed()
+ if(source.client)
+ source.client.screen -= W
+ if(W)
+ W.forceMove(source.loc)
+ dropped(source)
+ if(W)
+ W.layer = initial(W.layer)
+ return
- implanted(mob/living/carbon/source)
- source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0)
- to_chat(source, "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.")
- return 1
+/obj/item/implant/freedom/implanted(mob/living/carbon/source)
+ activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
+ if(source.mind)
+ source.mind.store_memory("\The [src] can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate.")
+ to_chat(source, "The implanted [src] can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate.")
+ return TRUE
- get_data()
- var/dat = {"
+/obj/item/implant/freedom/get_data()
+ var/dat = {"
Implant Specifications:
Name: Freedom Beacon
Life: optimum 5 uses
@@ -68,4 +71,4 @@ mechanisms
Integrity: The battery is extremely weak and commonly after injection its
life can drive down to only 1 use.