Skip to content

Commit

Permalink
[Request] GARY! THERES A BOM... (Exposion) (#3125)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
V2LenKagamine authored Aug 26, 2024
1 parent 1e9765f commit 47ab710
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
100 changes: 100 additions & 0 deletions monkestation/code/modules/clothing/under/bomb_vest.dm
Original file line number Diff line number Diff line change
@@ -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)

Binary file added monkestation/icons/obj/clothing/bomb_vest.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 47ab710

Please sign in to comment.