mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-26 21:46:51 +01:00
Merge master into dev.
This commit is contained in:
@@ -679,11 +679,16 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
//////////
|
||||
|
||||
/mob/proc/sting_can_reach(mob/M as mob, sting_range = 1)
|
||||
if(M.loc == src.loc) return 1 //target and source are in the same thing
|
||||
if(!isturf(src.loc) || !isturf(M.loc)) return 0 //One is inside, the other is outside something.
|
||||
if(AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, sting_range)) //If a path exists, good!
|
||||
return 1
|
||||
return 0
|
||||
if(M.loc == src.loc)
|
||||
return 1 //target and source are in the same thing
|
||||
if(!isturf(src.loc) || !isturf(M.loc))
|
||||
src << "<span class='warning'>We cannot reach \the [M] with a sting!</span>"
|
||||
return 0 //One is inside, the other is outside something.
|
||||
// Maximum queued turfs set to 25; I don't *think* anything raises sting_range above 2, but if it does the 25 may need raising
|
||||
if(!AStar(src.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, max_nodes=25, max_node_depth=sting_range)) //If we can't find a path, fail
|
||||
src << "<span class='warning'>We cannot find a path to sting \the [M] by!</span>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities)
|
||||
/mob/proc/changeling_sting(var/required_chems=0, var/verb_path)
|
||||
|
||||
@@ -921,8 +921,13 @@ table tr:first-child th:first-child { border: none;}
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (wiresexposed && ((istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters))))
|
||||
return attack_hand(user)
|
||||
if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
|
||||
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
@@ -1309,7 +1314,7 @@ FIRE ALARM
|
||||
/obj/machinery/firealarm/proc/delayed_reset()
|
||||
var/area/A = get_area(src)
|
||||
if (!A) return
|
||||
|
||||
|
||||
src = null
|
||||
spawn(600)
|
||||
A.firereset()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// Allows remote operation of electrical systems on station (SMESs and Breaker Boxes)
|
||||
|
||||
/obj/machinery/computer/rcon
|
||||
name = "\improper RCON remote control console"
|
||||
name = "\improper RCON console"
|
||||
desc = "Console used to remotely control machinery on the station."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "ai-fixer"
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "rcon.tmpl", "RCON Control Console", 600, 400)
|
||||
ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
@@ -330,7 +330,7 @@ About the new airlock wires panel:
|
||||
return ((src.aiControlDisabled==1) && (!hackProof) && (!src.isAllPowerLoss()));
|
||||
|
||||
/obj/machinery/door/airlock/proc/arePowerSystemsOn()
|
||||
if (stat & NOPOWER)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
return (src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0)
|
||||
|
||||
@@ -451,7 +451,7 @@ About the new airlock wires panel:
|
||||
if(density)
|
||||
flick("door_spark", src)
|
||||
if("deny")
|
||||
if(density && !(stat & (BROKEN|NOPOWER)))
|
||||
if(density && src.arePowerSystemsOn())
|
||||
flick("door_deny", src)
|
||||
return
|
||||
|
||||
@@ -900,12 +900,7 @@ About the new airlock wires panel:
|
||||
var/obj/item/weapon/pai_cable/cable = C
|
||||
cable.plugin(src, user)
|
||||
else if(!repairing && istype(C, /obj/item/weapon/crowbar))
|
||||
var/beingcrowbarred = null
|
||||
if(istype(C, /obj/item/weapon/crowbar) )
|
||||
beingcrowbarred = 1 //derp, Agouri
|
||||
else
|
||||
beingcrowbarred = 0
|
||||
if( beingcrowbarred && src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
|
||||
if(src.p_open && (operating < 0 || (!operating && welded && !src.arePowerSystemsOn() && density && (!src.locked || (stat & BROKEN)))) )
|
||||
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))
|
||||
@@ -936,7 +931,7 @@ About the new airlock wires panel:
|
||||
|
||||
del(src)
|
||||
return
|
||||
else if(arePowerSystemsOn() && !(stat & BROKEN))
|
||||
else if(arePowerSystemsOn())
|
||||
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."
|
||||
@@ -946,22 +941,22 @@ About the new airlock wires panel:
|
||||
else
|
||||
spawn(0) close(1)
|
||||
|
||||
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && (!arePowerSystemsOn() || (stat & BROKEN)))
|
||||
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
|
||||
if(locked)
|
||||
user << "\blue The airlock's bolts prevent it from being forced."
|
||||
else if( !welded && !operating )
|
||||
if(density)
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
if(F.wielded)
|
||||
spawn(0) open(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
user << "\red You need to be wielding \the [C] to do that."
|
||||
else
|
||||
var/obj/item/weapon/twohanded/fireaxe/F = C
|
||||
if(F:wielded)
|
||||
if(F.wielded)
|
||||
spawn(0) close(1)
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
user << "\red You need to be wielding \the [C] to do that."
|
||||
|
||||
else
|
||||
..()
|
||||
@@ -1007,7 +1002,9 @@ About the new airlock wires panel:
|
||||
if(operating || welded || locked)
|
||||
return
|
||||
if(!forced)
|
||||
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_DOOR_BOLTS) )
|
||||
//despite the name, this wire is for general door control.
|
||||
//Bolts are already covered by the check for locked, above
|
||||
if( !arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR) )
|
||||
return
|
||||
if(safe)
|
||||
for(var/turf/turf in locs)
|
||||
@@ -1131,9 +1128,6 @@ About the new airlock wires panel:
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/airlock/proc/hasPower()
|
||||
return ((src.secondsMainPowerLost==0 || src.secondsBackupPowerLost==0) && !(stat & (NOPOWER|BROKEN)))
|
||||
|
||||
/obj/machinery/door/airlock/proc/prison_open()
|
||||
src.unlock()
|
||||
src.open()
|
||||
|
||||
@@ -8,11 +8,6 @@ obj/machinery/door/airlock
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/cur_command = null //the command the door is currently attempting to complete
|
||||
|
||||
obj/machinery/door/airlock/proc/can_radio()
|
||||
if(!arePowerSystemsOn())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/machinery/door/airlock/process()
|
||||
..()
|
||||
if (arePowerSystemsOn())
|
||||
@@ -21,8 +16,6 @@ obj/machinery/door/airlock/process()
|
||||
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
|
||||
if (!arePowerSystemsOn()) return //no power
|
||||
|
||||
if (!can_radio()) return //no radio
|
||||
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
|
||||
|
||||
@@ -70,7 +70,7 @@ datum/track/New(var/title_name, var/audio)
|
||||
return
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
usr << "\the [src] doesn't appear to function."
|
||||
usr << "\The [src] doesn't appear to function."
|
||||
return
|
||||
|
||||
if(href_list["change_track"])
|
||||
@@ -109,7 +109,7 @@ datum/track/New(var/title_name, var/audio)
|
||||
|
||||
/obj/machinery/media/jukebox/interact(mob/user)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
usr << "\the [src] doesn't appear to function."
|
||||
usr << "\The [src] doesn't appear to function."
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
@@ -141,9 +141,10 @@
|
||||
if(isliving(src.loc))
|
||||
return
|
||||
user.next_move = max(user.next_move+2,world.time + 2)
|
||||
src.pickup(user)
|
||||
add_fingerprint(user)
|
||||
user.put_in_active_hand(src)
|
||||
if(src.loc == user)
|
||||
src.pickup(user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
return
|
||||
|
||||
..()
|
||||
take_damage(Proj.damage * 4)
|
||||
take_damage(Proj.damage)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user