mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Airlock and APC changes.
- Added a debugger device that can figure out when an object has been hacked/emagged - Hacked APCs no longer display blue screen - You can now disassemble emagged airlocks, they will yield a fried airlock electronic.
This commit is contained in:
@@ -696,7 +696,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
|
||||
if (in_range)
|
||||
if (!( human.restrained() || human.lying ))
|
||||
if (W)
|
||||
attackby(W,human)
|
||||
var/was_used = 0
|
||||
if(W)
|
||||
was_used = W.is_used_on(src, human)
|
||||
if(!was_used)
|
||||
attackby(W,human)
|
||||
if (W)
|
||||
W.afterattack(src, human)
|
||||
else
|
||||
|
||||
@@ -1198,7 +1198,7 @@ About the new airlock wires panel:
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
if( beingcrowbarred && (density && welded && !operating && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
|
||||
if( beingcrowbarred && (density && welded && operating != 1 && src.p_open && (!src.arePowerSystemsOn() || stat & NOPOWER) && !src.locked) )
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly.")
|
||||
if(do_after(user,40))
|
||||
@@ -1243,6 +1243,8 @@ About the new airlock wires panel:
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
if(operating == -1)
|
||||
ae.icon_state = "door_electronics_smoked"
|
||||
|
||||
del(src)
|
||||
return
|
||||
@@ -1250,7 +1252,7 @@ About the new airlock wires panel:
|
||||
user << "\blue The airlock's motors resist your efforts to force it."
|
||||
else if(locked)
|
||||
user << "\blue The airlock's bolts prevent it from being forced."
|
||||
else if( !welded && !operating )
|
||||
else if( !welded && operating != 1 )
|
||||
if(density)
|
||||
if(beingcrowbarred == 0) //being fireaxe'd
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
|
||||
44
code/game/objects/items/devices/debugger.dm
Normal file
44
code/game/objects/items/devices/debugger.dm
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/device/debugger
|
||||
name = "multitool"
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
||||
icon_state = "multitool"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2.0
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
m_amt = 50
|
||||
g_amt = 20
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
|
||||
if(istype(O, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = O
|
||||
if(A.emagged || A.malfhack)
|
||||
usr << "\red There is a software error with the device."
|
||||
else
|
||||
usr << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
if(istype(O, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = O
|
||||
if(D.operating == -1)
|
||||
usr << "\red There is a software error with the device."
|
||||
else
|
||||
usr << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
else if(istype(O, /obj/machinery))
|
||||
var/obj/machinery/A = O
|
||||
if(A.emagged)
|
||||
usr << "\red There is a software error with the device."
|
||||
else
|
||||
usr << "\blue The device's software appears to be fine."
|
||||
return 1
|
||||
@@ -16,6 +16,8 @@
|
||||
var/damtype = "brute"
|
||||
var/force = 0
|
||||
|
||||
/obj/item/proc/is_used_on(obj/O, mob/user)
|
||||
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
|
||||
@@ -349,7 +349,7 @@ obj/structure/door_assembly
|
||||
src.state = 0
|
||||
src.name = "Secured Airlock Assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
|
||||
user.drop_item()
|
||||
|
||||
@@ -187,10 +187,7 @@
|
||||
else
|
||||
icon_state = basestate
|
||||
else if (opened == 2)
|
||||
if ((stat & BROKEN) || malfhack )
|
||||
icon_state = "[basestate]-b-nocover"
|
||||
else /* if (emagged)*/
|
||||
icon_state = "[basestate]-nocover"
|
||||
icon_state = "[basestate]-nocover"
|
||||
else if (stat & BROKEN)
|
||||
icon_state = "apc-b"
|
||||
else if(emagged || malfai)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 36 KiB |
BIN
icons/obj/hacktool.dmi
Normal file
BIN
icons/obj/hacktool.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 394 B |
Reference in New Issue
Block a user