Skip to content

Commit

Permalink
p2 / 3 (not yet functional) ((stupid fucking assembly holders))
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Oct 3, 2024
1 parent cba2d39 commit 58d796b
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
8 changes: 4 additions & 4 deletions _maps/RandomRuins/SandRuins/whitesands_cave_base.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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" = (
Expand Down Expand Up @@ -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" = (
Expand Down
9 changes: 7 additions & 2 deletions code/game/objects/items/grenades/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -141,4 +146,4 @@

/obj/item/grenade/c4/satchel_charge/receive_signal()
. = ..()
balloon_alert_to_viewers("[src] begins ticking!")

14 changes: 13 additions & 1 deletion code/modules/assembly/holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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)
Expand Down
10 changes: 10 additions & 0 deletions code/modules/assembly/proximity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
18 changes: 13 additions & 5 deletions code/modules/ruins/sandplanet_ruin_code/cave_base.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58d796b

Please sign in to comment.