From 58d796bfaca4d6594f3c86204e6981c076c6675e Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:19:15 -0400 Subject: [PATCH] p2 / 3 (not yet functional) ((stupid fucking assembly holders)) --- .../SandRuins/whitesands_cave_base.dmm | 8 ++++---- code/game/objects/items/grenades/plastic.dm | 9 +++++++-- code/modules/assembly/holder.dm | 14 +++++++++++++- code/modules/assembly/proximity.dm | 10 ++++++++++ .../ruins/sandplanet_ruin_code/cave_base.dm | 18 +++++++++++++----- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/_maps/RandomRuins/SandRuins/whitesands_cave_base.dmm b/_maps/RandomRuins/SandRuins/whitesands_cave_base.dmm index d21b66e79755..460daa5e747e 100644 --- a/_maps/RandomRuins/SandRuins/whitesands_cave_base.dmm +++ b/_maps/RandomRuins/SandRuins/whitesands_cave_base.dmm @@ -104,6 +104,10 @@ /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer2, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt/dust, +/obj/item/disk/holodisk/ruin/cave_base/one{ + pixel_x = -3; + pixel_y = -6 + }, /turf/open/floor/plating/asteroid/whitesands/dried, /area/overmap_encounter/planetoid/cave/explored) "dP" = ( @@ -1456,10 +1460,6 @@ pixel_y = -22 }, /obj/effect/decal/cleanable/dirt/dust, -/obj/item/disk/holodisk/ruin/cave_base/one{ - pixel_x = -3; - pixel_y = -6 - }, /turf/open/floor/plasteel/dark, /area/ruin/whitesands/cave_base) "FN" = ( diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index cf3b9277a3f3..c636da812c5b 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -67,7 +67,12 @@ //assembly stuff /obj/item/grenade/c4/receive_signal() - addtimer(CALLBACK(src, PROC_REF(prime)), det_time*10) + if(!active) + active = TRUE + icon_state = "[item_state]2" + balloon_alert_to_viewers("[src] begins ticking!") + addtimer(CALLBACK(src, PROC_REF(prime)), det_time*10) + return /obj/item/grenade/c4/attack_self(mob/user) var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num|null @@ -141,4 +146,4 @@ /obj/item/grenade/c4/satchel_charge/receive_signal() . = ..() - balloon_alert_to_viewers("[src] begins ticking!") + diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 8dbb1dc98b61..cdb2f8991406 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -11,6 +11,7 @@ throw_speed = 2 throw_range = 7 + ///set both of these or neither. var/obj/item/assembly/a_left = null var/obj/item/assembly/a_right = null @@ -21,6 +22,18 @@ ) AddElement(/datum/element/connect_loc, loc_connections) + //if we want to spawn an holder pre-configured. + if(a_left && a_right) + var/obj/item/assembly/left = new a_left(src) + var/obj/item/assembly/right = new a_right(src) + //i love byond + a_left = null + a_right = null + assemble(left, right, null) + a_left.secured = TRUE + a_right.secured = TRUE + update_appearance() + /obj/item/assembly_holder/ComponentInitialize() . = ..() var/static/rotation_flags = ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_FLIP | ROTATION_VERBS @@ -29,7 +42,6 @@ /obj/item/assembly_holder/IsAssemblyHolder() return TRUE - /obj/item/assembly_holder/proc/assemble(obj/item/assembly/A, obj/item/assembly/A2, mob/user) attach(A,user) attach(A2,user) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 08b603058563..13dabe29d75d 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -7,7 +7,9 @@ drop_sound = 'sound/items/handling/component_drop.ogg' pickup_sound = 'sound/items/handling/component_pickup.ogg' var/scanning = FALSE + ///is the assembly arming itself? var/timing = FALSE + ///seconds until the assembly arms itself var/time = 10 var/sensitivity = 1 var/hearing_range = 3 @@ -153,3 +155,11 @@ value = round(time + value) time = clamp(value, 0, 600) . = TRUE + +/obj/item/assembly/prox_sensor/preset + sensitivity = 1 + hearing_range = 3 + +/obj/item/assembly/prox_sensor/preset/Initialize() + . = ..() + toggle_scan(!scanning) diff --git a/code/modules/ruins/sandplanet_ruin_code/cave_base.dm b/code/modules/ruins/sandplanet_ruin_code/cave_base.dm index ef12912e49a4..24b1a1024e70 100644 --- a/code/modules/ruins/sandplanet_ruin_code/cave_base.dm +++ b/code/modules/ruins/sandplanet_ruin_code/cave_base.dm @@ -8,20 +8,28 @@ /obj/item/grenade/c4/satchel_charge/cave_base/Initialize() . = ..() AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE, INVISIBILITY_OBSERVER, use_anchor = TRUE) - //replace with a signaller// - wires.attach_assembly_init(/obj/item/assembly/voice/preset/cave_base) + wires.attach_assembly_init(/obj/item/assembly/signaler/preset/cave_base) - //add prox sensor / signaller assembly because fuck me i guess +/obj/item/assembly_holder/premade/cave_base + a_left = /obj/item/assembly/signaler/preset/cave_base + a_right = /obj/item/assembly/prox_sensor/preset/cave_base - //oh my god jc. a bomb +/obj/item/grenade/c4/cave_base - //main area needs to have the Big Bomb substituted for a C4. +/obj/item/grenade/c4/cave_base/Initialize() + . = ..() + AddElement(/datum/element/undertile, TRAIT_T_RAY_VISIBLE, INVISIBILITY_OBSERVER, use_anchor = TRUE) + wires.attach_assembly_init(/obj/item/assembly/voice/preset/cave_base) +/obj/item/assembly/signaler/preset/cave_base + code = 44 + frequency = 1451 /obj/item/assembly/voice/preset/cave_base mode = 1 recorded = "Goodbye~" +/obj/item/assembly/prox_sensor/preset/cave_base //pre-netted cams /obj/machinery/camera/cave_base