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.
No Implant Specifics"} - return dat + return dat diff --git a/code/game/objects/structures/gore/tendrils.dm b/code/game/objects/structures/gore/tendrils.dm index bb87d1b1fc7..acf7d862c76 100644 --- a/code/game/objects/structures/gore/tendrils.dm +++ b/code/game/objects/structures/gore/tendrils.dm @@ -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 diff --git a/code/modules/mob/abstract/new_player/sprite_accessories.dm b/code/modules/mob/abstract/new_player/sprite_accessories.dm index 99913cf4c04..a6336655673 100644 --- a/code/modules/mob/abstract/new_player/sprite_accessories.dm +++ b/code/modules/mob/abstract/new_player/sprite_accessories.dm @@ -1407,11 +1407,11 @@ Follow by example and make good judgement based on length which list to include icon_state = "horny" headtails - name = "Headtails" + name = "Head tails" icon_state = "headtails" headtails_2 - name = "Headtails 2" + name = "Head tails 2" icon_state = "headtails2" tiny_eye diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 0f6426115cd..4cf57b175fc 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -379,9 +379,13 @@ var/list/slot_equipment_priority = list( \ to_chat(src, SPAN_NOTICE("You offer \the [I] to \the [target].")) do_give(H) return TRUE + + var/turf/T = get_turf(target) + if(T.contains_dense_objects() && !istype(target, /obj/structure/table)) //Stop at dense objects, like walls and windows. Allow placing on tables. + return TRUE //Takes off throw mode remove_from_mob(I) make_item_drop_sound(I) - I.forceMove(get_turf(target)) + I.forceMove(T) return TRUE remove_from_mob(item) diff --git a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm index dadf505ad28..7c681ab57a2 100644 --- a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm +++ b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm @@ -184,7 +184,7 @@ /obj/item/anodevice/proc/UpdateSprite() if(!inserted_battery) - icon_state = "anodev" + icon_state = initial(icon_state) return var/p = (inserted_battery.stored_charge/inserted_battery.capacity)*100 p = min(p, 100) diff --git a/html/changelogs/doxxmedearly-smallfixes.yml b/html/changelogs/doxxmedearly-smallfixes.yml new file mode 100644 index 00000000000..cd6a8747cd5 --- /dev/null +++ b/html/changelogs/doxxmedearly-smallfixes.yml @@ -0,0 +1,11 @@ +author: Doxxmedearly +delete-after: True +changes: + - bugfix: "You can no longer put items in walls by throwing on help intent." + - bugfix: "Diona can now take the headtails 'hair' option again." + - bugfix: "Anomaly power utilizers no longer go invisible when a battery is removed." + - bugfix: "Morph turfs no longer spread through windows or doors, unless the door is open." + - bugfix: "You can now throw items over railing again." + - bugfix: "Freedom implants now allow you to select a trigger emote, instead of randomly selecting one you may not be able to use." + - tweak: "Freedom implants are now more obvious when they're out of uses." + - tweak: "You can now secure extinguisher refill canisters with a screwdriver, giving a way for borgs and drones to refill their extinguishers." \ No newline at end of file