Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] pipebomb #2213

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading