Skip to content

Commit

Permalink
[MIRROR] pipebomb (#1214)
Browse files Browse the repository at this point in the history
* pipebomb (#81529)

## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/70376633/2c2a8ddf-d210-468b-9403-f7de4fa1fd9b)

removes IEDs, these are its replacement


![image](https://github.com/tgstation/tgstation/assets/70376633/95cc67d7-ed41-481b-9b9d-f31897fdb46d)

this recipe produces a finished pipebomb

you can craft pipes (of the atmos kind) with some metal
then you can make it into a pair of halved pipes with a welder
then you stuff in items for extra effect (optional, only works if it
does something)
then you put in welding fuel OR gunpowder (no other options as of now,
gunpowder is a better explosive)
cable finishes that part
after that, you can attach an unsecured assembly to finish the bomb

also this is the math for the explosion, power is decided by fuel

![image](https://github.com/tgstation/tgstation/assets/70376633/95ac3101-a2af-4bdc-9730-6c9c20195b59)

using it in-hand activates the assembly, using it off-hand allows you to
configure the assembly

## Why It's Good For The Game

IEDs suck and stuff and this would be a better upgrade/replacement
because with assemblies you could make a circuit sentient pipebomb or
gift a pipebomb via cargo or something and gimmicks i guess
## Changelog
:cl:
add: Pipebombs
del: Improvised Firebombs
/:cl:

* pipebomb

---------

Co-authored-by: jimmyl <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 1, 2024
1 parent ce94a60 commit e63d0ac
Show file tree
Hide file tree
Showing 8 changed files with 299 additions and 67 deletions.
10 changes: 1 addition & 9 deletions code/datums/components/crafting/atmospheric.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/datum/crafting_recipe/pipe
name = "Smart pipe fitting"
tool_behaviors = list(TOOL_WRENCH)
result = /obj/item/pipe/quaternary/pipe
result = /obj/item/pipe/quaternary/pipe/crafted
reqs = list(/obj/item/stack/sheet/iron = 1)
time = 0.5 SECONDS
category = CAT_ATMOSPHERIC
Expand All @@ -38,14 +38,6 @@
)
blacklist = list(/obj/item/analyzer/ranged)

/datum/crafting_recipe/pipe/on_craft_completion(mob/user, atom/result)
var/obj/item/pipe/crafted_pipe = result
crafted_pipe.pipe_type = /obj/machinery/atmospherics/pipe/smart
crafted_pipe.pipe_color = COLOR_VERY_LIGHT_GRAY
crafted_pipe.p_init_dir = ALL_CARDINALS
crafted_pipe.setDir(SOUTH)
crafted_pipe.update()

/datum/crafting_recipe/layer_adapter
name = "Layer manifold fitting"
tool_behaviors = list(TOOL_WRENCH, TOOL_WELDER)
Expand Down
16 changes: 8 additions & 8 deletions code/datums/components/crafting/chemistry.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/datum/crafting_recipe/improv_explosive
name = "IED"
result = /obj/item/grenade/iedcasing
name = "Improvised Explosive"
result = /obj/item/grenade/iedcasing/spawned
tool_behaviors = list(TOOL_WELDER, TOOL_SCREWDRIVER)
reqs = list(
/datum/reagent/fuel = 50,
/obj/item/stack/cable_coil = 1,
/obj/item/assembly/igniter = 1,
/obj/item/reagent_containers/cup/soda_cans = 1,
/datum/reagent/fuel = 20,
/obj/item/stack/cable_coil = 15,
/obj/item/assembly/timer = 1,
/obj/item/pipe/quaternary/pipe = 1,
)
parts = list(/obj/item/reagent_containers/cup/soda_cans = 1)
time = 1.5 SECONDS
time = 6 SECONDS
category = CAT_CHEMISTRY

/datum/crafting_recipe/molotov
Expand Down
27 changes: 27 additions & 0 deletions code/game/machinery/pipe/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ Buildable meters
/obj/item/pipe/quaternary/pipe
icon_state_preview = "manifold4w"
pipe_type = /obj/machinery/atmospherics/pipe/smart
/obj/item/pipe/quaternary/pipe/crafted

/obj/item/pipe/quaternary/pipe/crafted/Initialize(mapload, _pipe_type, _dir, obj/machinery/atmospherics/make_from, device_color, device_init_dir = SOUTH)
. = ..()
pipe_type = /obj/machinery/atmospherics/pipe/smart
pipe_color = COLOR_VERY_LIGHT_GRAY
p_init_dir = ALL_CARDINALS
setDir(SOUTH)
update()

/obj/item/pipe/quaternary/he_pipe
icon_state_preview = "he_manifold4w"
pipe_type = /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w
Expand Down Expand Up @@ -251,6 +261,23 @@ Buildable meters

qdel(src)

/obj/item/pipe/welder_act(mob/living/user, obj/item/welder)
. = ..()
if(istype(pipe_type, /obj/machinery/atmospherics/components))
return TRUE
if(!welder.tool_start_check(user, amount=2))
return TRUE
add_fingerprint(user)

if(welder.use_tool(src, user, 2 SECONDS, volume=2))
new /obj/item/sliced_pipe(drop_location())
user.visible_message( \
"[user] welds \the [src] in two.", \
span_notice("You weld \the [src] in two."), \
span_hear("You hear welding."))

qdel(src)

/**
* Attempt to automatically resolve a pipe conflict by reconfiguring any smart pipes involved.
*
Expand Down
Loading

0 comments on commit e63d0ac

Please sign in to comment.