mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Wire hacking recode from /tg/.
Conflicts: baystation12.dme code/__HELPERS/mobs.dm code/defines/obj/weapon.dm code/game/machinery/alarm.dm code/game/machinery/doors/airlock.dm code/game/machinery/machinery.dm code/game/machinery/vending.dm code/game/objects/items/devices/paicard.dm code/game/objects/items/weapons/explosives.dm code/global.dm code/modules/assembly/signaler.dm code/modules/mob/living/silicon/mommi/life.dm code/modules/mob/living/silicon/mommi/mommi.dm code/modules/mob/living/silicon/robot/robot.dm code/modules/mob/living/silicon/robot/wires.dm
This commit is contained in:
@@ -97,7 +97,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
|
||||
if(A.secondsElectrified != -1)
|
||||
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [A.name] at [A.x] [A.y] [A.z]</font>")
|
||||
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
|
||||
A.secondsElectrified = -1
|
||||
else
|
||||
if(A.secondsElectrified == -1)
|
||||
@@ -163,7 +163,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
|
||||
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
|
||||
if(A.secondsElectrified==0)
|
||||
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Electrified the [A.name] at [A.x] [A.y] [A.z]</font>")
|
||||
add_logs(usr, A, "electrified", admin=0, addition="at [A.x],[A.y],[A.z]")
|
||||
A.secondsElectrified = 30
|
||||
spawn(10)
|
||||
if(A)
|
||||
|
||||
@@ -47,8 +47,8 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
//world << "Syphon Wire Cut"
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
if (A.alarm_area.atmosalert(2))
|
||||
A.post_alert(2)
|
||||
//if (A.alarm_area.atmosalert(2))
|
||||
// A.post_alert(2)
|
||||
A.update_icon()
|
||||
|
||||
/datum/wires/alarm/UpdatePulsed(var/index)
|
||||
@@ -89,6 +89,6 @@ var/const/AALARM_WIRE_AALARM = 16
|
||||
|
||||
if(AALARM_WIRE_AALARM)
|
||||
// world << "Aalarm wire pulsed"
|
||||
if (A.alarm_area.atmosalert(0))
|
||||
A.post_alert(0)
|
||||
//if (A.alarm_area.atmosalert(0))
|
||||
// A.post_alert(0)
|
||||
A.update_icon()
|
||||
|
||||
@@ -29,15 +29,16 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
A.locked = 0
|
||||
|
||||
spawn(300)
|
||||
A.locked = 1
|
||||
A.updateDialog()
|
||||
if(A)
|
||||
A.locked = 1
|
||||
A.updateDialog()
|
||||
|
||||
if (APC_WIRE_MAIN_POWER1, APC_WIRE_MAIN_POWER2)
|
||||
if(A.shorted == 0)
|
||||
A.shorted = 1
|
||||
|
||||
spawn(1200)
|
||||
if(!IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
|
||||
if(A && !IsIndexCut(APC_WIRE_MAIN_POWER1) && !IsIndexCut(APC_WIRE_MAIN_POWER2))
|
||||
A.shorted = 0
|
||||
A.updateDialog()
|
||||
|
||||
@@ -46,7 +47,7 @@ var/const/APC_WIRE_AI_CONTROL = 8
|
||||
A.aidisabled = 1
|
||||
|
||||
spawn(10)
|
||||
if(!IsIndexCut(APC_WIRE_AI_CONTROL))
|
||||
if(A && !IsIndexCut(APC_WIRE_AI_CONTROL))
|
||||
A.aidisabled = 0
|
||||
A.updateDialog()
|
||||
|
||||
|
||||
@@ -3,11 +3,21 @@
|
||||
holder_type = /mob/living/silicon/robot
|
||||
wire_count = 5
|
||||
|
||||
var/const/BORG_WIRE_LAWCHECK = 1
|
||||
var/const/BORG_WIRE_MAIN_POWER = 2 // The power wires do nothing whyyyyyyyyyyyyy
|
||||
/* /tg/ ordering doesn't work for us, we need lawsync at the end for MoMMIs.
|
||||
var/const/BORG_WIRE_LAWCHECK = 1
|
||||
var/const/BORG_WIRE_MAIN_POWER = 2 // The power wires do nothing whyyyyyyyyyyyyy
|
||||
var/const/BORG_WIRE_LOCKED_DOWN = 4
|
||||
var/const/BORG_WIRE_AI_CONTROL = 8
|
||||
var/const/BORG_WIRE_CAMERA = 16
|
||||
var/const/BORG_WIRE_AI_CONTROL = 8
|
||||
var/const/BORG_WIRE_CAMERA = 16
|
||||
*/
|
||||
|
||||
// /vg/ ordering
|
||||
|
||||
var/const/BORG_WIRE_MAIN_POWER = 1 // The power wires do nothing whyyyyyyyyyyyyy
|
||||
var/const/BORG_WIRE_LOCKED_DOWN = 2
|
||||
var/const/BORG_WIRE_CAMERA = 4
|
||||
var/const/BORG_WIRE_AI_CONTROL = 8 // Not used on MoMMIs
|
||||
var/const/BORG_WIRE_LAWCHECK = 16 // Not used on MoMMIs
|
||||
|
||||
/datum/wires/robot/GetInteractWindow()
|
||||
|
||||
@@ -76,4 +86,10 @@ var/const/BORG_WIRE_CAMERA = 16
|
||||
return wires_status & BORG_WIRE_CAMERA
|
||||
|
||||
/datum/wires/robot/proc/LockedCut()
|
||||
return wires_status & BORG_WIRE_LOCKED_DOWN
|
||||
return wires_status & BORG_WIRE_LOCKED_DOWN
|
||||
|
||||
/datum/wires/robot/proc/CanLawCheck()
|
||||
return wires_status & BORG_WIRE_LAWCHECK
|
||||
|
||||
/datum/wires/robot/proc/AIHasControl()
|
||||
return wires_status & BORG_WIRE_AI_CONTROL
|
||||
@@ -11,6 +11,8 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
|
||||
|
||||
/datum/wires/syndicatebomb/UpdatePulsed(var/index)
|
||||
var/obj/machinery/syndicatebomb/P = holder
|
||||
if(P.degutted)
|
||||
return
|
||||
switch(index)
|
||||
if(WIRE_BOOM)
|
||||
if (P.active)
|
||||
@@ -47,6 +49,8 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
|
||||
|
||||
/datum/wires/syndicatebomb/UpdateCut(var/index, var/mended)
|
||||
var/obj/machinery/syndicatebomb/P = holder
|
||||
if(P.degutted)
|
||||
return
|
||||
switch(index)
|
||||
if(WIRE_EXPLODE)
|
||||
if(!mended)
|
||||
|
||||
Reference in New Issue
Block a user