From 47ab7104b1f57f594f2b7e061027e78462d772bb Mon Sep 17 00:00:00 2001 From: Len Kagamine Date: Sun, 25 Aug 2024 23:54:13 -0400 Subject: [PATCH] [Request] GARY! THERES A BOM... (Exposion) (#3125) * WIP- Maybe not working Just gotta push for a saftey measure * mm funny bomb Strip go boom. * Icon and minor tweaks Fixes nothing but bomb [pun intended] icons by CannibalHunter --- .../code/modules/clothing/under/bomb_vest.dm | 100 ++++++++++++++++++ monkestation/icons/obj/clothing/bomb_vest.dmi | Bin 0 -> 845 bytes tgstation.dme | 1 + 3 files changed, 101 insertions(+) create mode 100644 monkestation/code/modules/clothing/under/bomb_vest.dm create mode 100644 monkestation/icons/obj/clothing/bomb_vest.dmi diff --git a/monkestation/code/modules/clothing/under/bomb_vest.dm b/monkestation/code/modules/clothing/under/bomb_vest.dm new file mode 100644 index 000000000000..3c751f72e213 --- /dev/null +++ b/monkestation/code/modules/clothing/under/bomb_vest.dm @@ -0,0 +1,100 @@ +/obj/item/clothing/bomb_vest + name = "bomb vest" + desc = "A bomb that can be strapped to peoples chest. Cant be taken off by the user..." + + icon = 'monkestation/icons/obj/clothing/bomb_vest.dmi' + worn_icon = 'monkestation/icons/obj/clothing/bomb_vest.dmi' + icon_state = "obj_off" + worn_icon_state = "worn_off" + + body_parts_covered = CHEST + slot_flags = ITEM_SLOT_OCLOTHING + + var/obj/item/transfer_valve/boombox //The TTV that goes boom + + var/ready_to_blow = FALSE +/obj/item/clothing/bomb_vest/Destroy() + QDEL_NULL(boombox) + return ..() +/obj/item/clothing/bomb_vest/Move() + . = ..() + if(boombox) + boombox.Move() + +/obj/item/clothing/bomb_vest/MouseDrop(atom/over_object) + var/mob/M = usr + + if(M.contents.Find(src)) + return //Nuh-uh + . = ..() + +/obj/item/clothing/bomb_vest/mob_can_equip(mob/living/M, slot, disable_warning, bypass_equip_delay_self, ignore_equipped) + if(!slot && ready_to_blow) + return FALSE + . = ..() + + +/obj/item/clothing/bomb_vest/Initialize(mapload) + . = ..() + boombox = new(src) + RegisterSignal(src, COMSIG_ITEM_PRE_UNEQUIP, PROC_REF(on_unequipped)) + +/obj/item/clothing/bomb_vest/doStrip(mob/stripper, mob/owner) + if(prob(25) && ready_to_blow && boombox) + boombox.process_activation(null) //Uh oh, boom time. + . = ..() +/obj/item/clothing/bomb_vest/proc/on_unequipped() + SIGNAL_HANDLER + var/mob/M = usr + if(M && ready_to_blow) + if(M.contents.Find(src)) + return COMPONENT_ITEM_BLOCK_UNEQUIP + return + +/obj/item/clothing/bomb_vest/attackby(obj/item/W, mob/user, params) + if(user.contents.Find(src)) + return //Nope. + if(W.tool_behaviour == TOOL_WRENCH) + if(ready_to_blow) + ready_to_blow = FALSE + icon_state = "obj_off" + worn_icon_state = "worn_off" + to_chat(user, span_warning("You disarm the [src]!")) + else + ready_to_blow = TRUE + icon_state = "obj_on" + worn_icon_state = "worn_on" + to_chat(user, span_warning("You arm the [src]!")) + return + if(istype(W,/obj/item/assembly)) + boombox.attackby(W,user) + return TRUE + if(W.tool_behaviour == TOOL_WIRECUTTER) + boombox.forceMove(user) + boombox = null + Destroy() + return + if(istype(W, /obj/item/tank)) + if(boombox.tank_one && boombox.tank_two) + to_chat(user, span_warning("There are already two tanks attached, remove one first!")) + return + if(!boombox.tank_one) + if(!user.transferItemToLoc(W, src)) + return + boombox.tank_one = W + to_chat(user, span_notice("You attach the tank to the [src].")) + else if(!boombox.tank_two) + if(!user.transferItemToLoc(W, src)) + return + boombox.tank_two = W + to_chat(user, span_notice("You attach the tank to the [src].")) + return + +/datum/crafting_recipe/bomb_vest + name = "Bomb Vest" + desc = "Crudely straps an EMPTY tank transfer valve to someones chest. Can't be un-equiped by the wearer once armed with a wrench. Otherwise, works like a normal Tank Transfer Valve." + + result = /obj/item/clothing/bomb_vest + + reqs = list(/obj/item/transfer_valve = 1,/obj/item/stack/cable_coil = 5,/obj/item/stack/sheet/iron = 2) + diff --git a/monkestation/icons/obj/clothing/bomb_vest.dmi b/monkestation/icons/obj/clothing/bomb_vest.dmi new file mode 100644 index 0000000000000000000000000000000000000000..4a3b0cd1c8a4d19dec0665e7816bc2a4c6ed32a1 GIT binary patch literal 845 zcmV-T1G4;yP)QoSz`($W?V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRL zOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5DL*MIK0hr@iHkEOv#1y-V#vjrR+N~V3SpzF z%fqhB3@DnKlUNC4n(7$Bp(z*|;)4kD%kzu!P#t1|-60T#dDzuqcL|rWf~%hkICubR zZcT$TRghZ%00J>dL_t(|ob8&uP69y`g)cuQmWVHa#s`4l15k)H1&{y@4Qye*Qd*dh z(EA7`gdQ7T&c%kkGs9elI~$Rlk8KXKXNKMC3}=V{02f2;_bN_P=7pUcEED*sML{)XY|#>h!`lPV_XG_lne&*3JEGftqNN zy!49H)cxY`EVjz!En&=&L`*nR-I|0b~``8PBruQhwcw-(k;KAj|T4#Y?Ab_ zI%R)gG1(qg$M^vN008hOX!F15Zz%J>=-1|d(XY+_f?uEi1wWmT|Hsn)Vcg+2DD%JH zPwMr z)c(Lh-2T8MdVgRNyFak7|Njp=KVd5xYOIh~6In04|Cj XOzua|6h8O+00000NkvXXu0mjfRR^7* literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index 2cb806c0be8e..3aa1d8db78b6 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6720,6 +6720,7 @@ #include "monkestation\code\modules\clothing\suits\costume.dm" #include "monkestation\code\modules\clothing\suits\toggles.dm" #include "monkestation\code\modules\clothing\under\_under.dm" +#include "monkestation\code\modules\clothing\under\bomb_vest.dm" #include "monkestation\code\modules\clothing\under\costume.dm" #include "monkestation\code\modules\clothing\under\undersuit.dm" #include "monkestation\code\modules\clothing\under\accessories\medals.dm"