mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Updates camera assemblies to balloonify & welder_act. Fixes 11 year old bug. (#68847)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -121,17 +121,24 @@
|
||||
else if(I == proxy_module)
|
||||
proxy_module = null
|
||||
|
||||
/obj/structure/camera_assembly/welder_act(mob/living/user, obj/item/tool)
|
||||
if(state != STATE_WRENCHED && state != STATE_WELDED)
|
||||
return
|
||||
. = TRUE
|
||||
if(!tool.tool_start_check(user, amount=3))
|
||||
return
|
||||
user.balloon_alert_to_viewers("[state == STATE_WELDED ? "un" : null]welding...")
|
||||
audible_message(span_hear("You hear welding."))
|
||||
if(!tool.use_tool(src, user, 2 SECONDS, amount=3, volume = 50))
|
||||
user.balloon_alert_to_viewers("stopped [state == STATE_WELDED ? "un" : null]welding!")
|
||||
return
|
||||
state = ((state == STATE_WELDED) ? STATE_WRENCHED : STATE_WELDED)
|
||||
set_anchored(state == STATE_WELDED)
|
||||
user.balloon_alert_to_viewers(state == STATE_WELDED ? "welded" : "unwelded")
|
||||
|
||||
|
||||
/obj/structure/camera_assembly/attackby(obj/item/W, mob/living/user, params)
|
||||
switch(state)
|
||||
if(STATE_WRENCHED)
|
||||
if(W.tool_behaviour == TOOL_WELDER)
|
||||
if(weld(W, user))
|
||||
to_chat(user, span_notice("You weld [src] securely into place."))
|
||||
set_anchored(TRUE)
|
||||
state = STATE_WELDED
|
||||
return
|
||||
|
||||
if(STATE_WELDED)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
@@ -140,17 +147,7 @@
|
||||
state = STATE_WIRED
|
||||
else
|
||||
to_chat(user, span_warning("You need two lengths of cable to wire a camera!"))
|
||||
return
|
||||
return
|
||||
|
||||
else if(W.tool_behaviour == TOOL_WELDER)
|
||||
|
||||
if(weld(W, user))
|
||||
to_chat(user, span_notice("You unweld [src] from its place."))
|
||||
state = STATE_WRENCHED
|
||||
set_anchored(TRUE)
|
||||
return
|
||||
|
||||
if(STATE_WIRED) // Upgrades!
|
||||
if(istype(W, /obj/item/stack/sheet/mineral/plasma)) //emp upgrade
|
||||
if(emp_module)
|
||||
@@ -270,13 +267,6 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/camera_assembly/proc/weld(obj/item/weldingtool/W, mob/living/user)
|
||||
if(!W.tool_start_check(user, amount=3))
|
||||
return FALSE
|
||||
to_chat(user, span_notice("You start to weld [src]..."))
|
||||
if(W.use_tool(src, user, 20, amount=3, volume = 50))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/camera_assembly/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
Reference in New Issue
Block a user