Round of small bugfixes (#14160)

This commit is contained in:
Doxxmedearly
2022-06-03 12:58:42 +02:00
committed by GitHub
parent 6801b81be2
commit 23bc71bd2f
8 changed files with 81 additions and 66 deletions
+1 -1
View File
@@ -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
+12 -11
View File
@@ -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,"<span class='notice'>\The [src] needs to be secured first!</span>")
else if(src.reagents.total_volume <= 0)
else if(reagents.total_volume <= 0)
to_chat(user,"<span class='notice'>\The [src] is empty!</span>")
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("<span class='notice'>[user] fills \the [E] with the [src].</span>", "<span class='notice'>You fill \the [E] with the [src].</span>")
playsound(E.loc, 'sound/items/stimpack.ogg', 50, 1)
else
@@ -47,13 +55,6 @@
to_chat(user,"<span class='notice'>\The reagents inside [src] are already secured!</span>")
return
/obj/item/reagent_containers/extinguisher_refill/attackby(obj/item/W, mob/user)
if(W.isscrewdriver() && !is_open_container())
to_chat(user,"<span class='notice'>Using \the [W], you unsecure the extinguisher refill cartridge's lid.</span>") // 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
@@ -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, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
to_chat(source, "The implanted freedom implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> 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, <B>say *[activation_emote]</B> to attempt to activate.")
to_chat(source, "The implanted [src] can be activated by using the [activation_emote] emote, <B>say *[activation_emote]</B> to attempt to activate.")
return TRUE
get_data()
var/dat = {"
/obj/item/implant/freedom/get_data()
var/dat = {"
<b>Implant Specifications:</b><BR>
<b>Name:</b> Freedom Beacon<BR>
<b>Life:</b> optimum 5 uses<BR>
@@ -68,4 +71,4 @@ mechanisms<BR>
<b>Integrity:</b> The battery is extremely weak and commonly after injection its
life can drive down to only 1 use.<HR>
No Implant Specifics"}
return dat
return dat
@@ -5,6 +5,7 @@
desc = "Bloody, pulsating tendrils."
icon_state = "tendril"
maxHealth = 40
pass_flags = PASSTABLE | PASSMOB | PASSTRACE | PASSRAILING
var/being_destroyed = FALSE
var/is_node = FALSE
var/obj/structure/gore/tendrils/node/linked_node = null
@@ -113,14 +114,9 @@
var/D = pick(dirs_left)
var/turf/T = get_step(U, D)
var/obj/machinery/door/MD = locate() in T
if(MD?.density)
if(!T.Enter(src)) //Uses the pass_flags to make sure we can go under tables and things, but not walls and windows
return
var/obj/structure/simple_door/SD = locate() in T
if(SD?.density)
return
if(!isturf(T) || T.is_hole || T.is_space() || T.density || locate(/obj/structure/gore/tendrils, T))
if(!isturf(T) || T.is_hole || T.is_space() || locate(/obj/structure/gore/tendrils, T))
dirs_left -= D
return