Bleeding edgy refresh (#303)
* not code stuff * other things * global vars, defines, helpers * onclick hud stuff, orphans, world.dm * controllers and datums * game folder * everything not client/mobs in modules * client folder * stage 1 mob stuff * simple animal things * silicons * carbon things * ayylmaos and monkeys * hyoomahn * icons n shit * sprite fixes * compile fixes * some fixes I cherrypicked. * qdel fixes * forgot brain refractors
This commit is contained in:
+64
-64
@@ -200,18 +200,18 @@
|
||||
return
|
||||
if(opened)
|
||||
if(has_electronics && terminal)
|
||||
user << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
|
||||
to_chat(user, "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"].")
|
||||
else
|
||||
user << "It's [ !terminal ? "not" : "" ] wired up."
|
||||
user << "The electronics are[!has_electronics?"n't":""] installed."
|
||||
to_chat(user, "It's [ !terminal ? "not" : "" ] wired up.")
|
||||
to_chat(user, "The electronics are[!has_electronics?"n't":""] installed.")
|
||||
|
||||
else
|
||||
if (stat & MAINT)
|
||||
user << "The cover is closed. Something is wrong with it. It doesn't work."
|
||||
to_chat(user, "The cover is closed. Something is wrong with it. It doesn't work.")
|
||||
else if (malfhack)
|
||||
user << "The cover is broken. It may be hard to force it open."
|
||||
to_chat(user, "The cover is broken. It may be hard to force it open.")
|
||||
else
|
||||
user << "The cover is closed."
|
||||
to_chat(user, "The cover is closed.")
|
||||
|
||||
|
||||
// update the APC icon to show the three base states
|
||||
@@ -375,10 +375,10 @@
|
||||
if (opened) // a) on open apc
|
||||
if (has_electronics==1)
|
||||
if (terminal)
|
||||
user << "<span class='warning'>Disconnect the wires first!</span>"
|
||||
to_chat(user, "<span class='warning'>Disconnect the wires first!</span>")
|
||||
return
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You are trying to remove the power control board...</span>" //lpeters - fixed grammar issues
|
||||
to_chat(user, "<span class='notice'>You are trying to remove the power control board...</span>" )
|
||||
if(do_after(user, 50*W.toolspeed, target = src))
|
||||
if (has_electronics==1)
|
||||
has_electronics = 0
|
||||
@@ -415,10 +415,10 @@
|
||||
return
|
||||
else if (!(stat & BROKEN)) // b) on closed and not broken APC
|
||||
if(coverlocked && !(stat & MAINT)) // locked...
|
||||
user << "<span class='warning'>The cover is locked and cannot be opened!</span>"
|
||||
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened!</span>")
|
||||
return
|
||||
else if (panel_open) // wires are exposed
|
||||
user << "<span class='warning'>Exposed wires prevents you from opening it!</span>"
|
||||
to_chat(user, "<span class='warning'>Exposed wires prevents you from opening it!</span>")
|
||||
return
|
||||
else
|
||||
opened = 1
|
||||
@@ -427,11 +427,11 @@
|
||||
|
||||
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
if(cell)
|
||||
user << "<span class='warning'>There is a power cell already installed!</span>"
|
||||
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
|
||||
return
|
||||
else
|
||||
if (stat & MAINT)
|
||||
user << "<span class='warning'>There is no connector for your power cell!</span>"
|
||||
to_chat(user, "<span class='warning'>There is no connector for your power cell!</span>")
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
@@ -446,46 +446,46 @@
|
||||
else if (istype(W, /obj/item/weapon/screwdriver)) // haxing
|
||||
if(opened)
|
||||
if (cell)
|
||||
user << "<span class='warning'>Close the APC first!</span>" //Less hints more mystery!
|
||||
to_chat(user, "<span class='warning'>Close the APC first!</span>") //Less hints more mystery!
|
||||
return
|
||||
else
|
||||
if (has_electronics==1)
|
||||
has_electronics = 2
|
||||
stat &= ~MAINT
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You screw the circuit electronics into place.</span>"
|
||||
to_chat(user, "<span class='notice'>You screw the circuit electronics into place.</span>")
|
||||
else if (has_electronics==2)
|
||||
has_electronics = 1
|
||||
stat |= MAINT
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You unfasten the electronics.</span>"
|
||||
to_chat(user, "<span class='notice'>You unfasten the electronics.</span>")
|
||||
else /* has_electronics==0 */
|
||||
user << "<span class='warning'>There is nothing to secure!</span>"
|
||||
to_chat(user, "<span class='warning'>There is nothing to secure!</span>")
|
||||
return
|
||||
update_icon()
|
||||
else if(emagged)
|
||||
user << "<span class='warning'>The interface is broken!</span>"
|
||||
to_chat(user, "<span class='warning'>The interface is broken!</span>")
|
||||
else
|
||||
panel_open = !panel_open
|
||||
user << "The wires have been [panel_open ? "exposed" : "unexposed"]"
|
||||
to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]")
|
||||
update_icon()
|
||||
|
||||
else if (W.GetID()) // trying to unlock the interface with an ID card
|
||||
if(emagged)
|
||||
user << "<span class='warning'>The interface is broken!</span>"
|
||||
to_chat(user, "<span class='warning'>The interface is broken!</span>")
|
||||
else if(opened)
|
||||
user << "<span class='warning'>You must close the cover to swipe an ID card!</span>"
|
||||
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
|
||||
else if(panel_open)
|
||||
user << "<span class='warning'>You must close the panel!</span>"
|
||||
to_chat(user, "<span class='warning'>You must close the panel!</span>")
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "<span class='warning'>Nothing happens!</span>"
|
||||
to_chat(user, "<span class='warning'>Nothing happens!</span>")
|
||||
else
|
||||
if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the APC interface.</span>"
|
||||
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] the APC interface.</span>")
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && opened)
|
||||
var/turf/host_turf = get_turf(src)
|
||||
@@ -493,18 +493,18 @@
|
||||
throw EXCEPTION("attackby on APC when it's not on a turf")
|
||||
return
|
||||
if (host_turf.intact)
|
||||
user << "<span class='warning'>You must remove the floor plating in front of the APC first!</span>"
|
||||
to_chat(user, "<span class='warning'>You must remove the floor plating in front of the APC first!</span>")
|
||||
return
|
||||
else if (terminal) // it already have terminal
|
||||
user << "<span class='warning'>This APC is already wired!</span>"
|
||||
to_chat(user, "<span class='warning'>This APC is already wired!</span>")
|
||||
return
|
||||
else if (has_electronics == 0)
|
||||
user << "<span class='warning'>There is nothing to wire!</span>"
|
||||
to_chat(user, "<span class='warning'>There is nothing to wire!</span>")
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(C.get_amount() < 10)
|
||||
user << "<span class='warning'>You need ten lengths of cable for APC!</span>"
|
||||
to_chat(user, "<span class='warning'>You need ten lengths of cable for APC!</span>")
|
||||
return
|
||||
user.visible_message("[user.name] adds cables to the APC frame.", \
|
||||
"<span class='notice'>You start adding cables to the APC frame...</span>")
|
||||
@@ -521,7 +521,7 @@
|
||||
s.start()
|
||||
return
|
||||
C.use(10)
|
||||
user << "<span class='notice'>You add cables to the APC frame.</span>"
|
||||
to_chat(user, "<span class='notice'>You add cables to the APC frame.</span>")
|
||||
make_terminal()
|
||||
terminal.connect_to_network()
|
||||
|
||||
@@ -530,10 +530,10 @@
|
||||
|
||||
else if (istype(W, /obj/item/weapon/electronics/apc) && opened)
|
||||
if (has_electronics!=0) // there are already electronicks inside
|
||||
user << "<span class='warning'>You cannot put the board inside, there already is one!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot put the board inside, there already is one!</span>")
|
||||
return
|
||||
else if (stat & BROKEN)
|
||||
user << "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("[user.name] inserts the power control board into [src].", \
|
||||
@@ -543,13 +543,13 @@
|
||||
if(has_electronics==0)
|
||||
has_electronics = 1
|
||||
locked = 1 //We placed new, locked board in
|
||||
user << "<span class='notice'>You place the power control board inside the frame.</span>"
|
||||
to_chat(user, "<span class='notice'>You place the power control board inside the frame.</span>")
|
||||
qdel(W)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.get_fuel() < 3)
|
||||
user << "<span class='warning'>You need more welding fuel to complete this task!</span>"
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return
|
||||
user.visible_message("[user.name] welds [src].", \
|
||||
"<span class='notice'>You start welding the APC frame...</span>", \
|
||||
@@ -572,24 +572,24 @@
|
||||
|
||||
else if (istype(W, /obj/item/wallframe/apc) && opened)
|
||||
if (!(stat & BROKEN || opened==2 || obj_integrity < max_integrity)) // There is nothing to repair
|
||||
user << "<span class='warning'>You found no reason for repairing this APC</span>"
|
||||
to_chat(user, "<span class='warning'>You found no reason for repairing this APC</span>")
|
||||
return
|
||||
if (!(stat & BROKEN) && opened==2) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
|
||||
user.visible_message("[user.name] replaces missing APC's cover.",\
|
||||
"<span class='notice'>You begin to replace APC's cover...</span>")
|
||||
if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame
|
||||
user << "<span class='notice'>You replace missing APC's cover.</span>"
|
||||
to_chat(user, "<span class='notice'>You replace missing APC's cover.</span>")
|
||||
qdel(W)
|
||||
opened = 1
|
||||
update_icon()
|
||||
return
|
||||
if (has_electronics)
|
||||
user << "<span class='warning'>You cannot repair this APC until you remove the electronics still inside!</span>"
|
||||
to_chat(user, "<span class='warning'>You cannot repair this APC until you remove the electronics still inside!</span>")
|
||||
return
|
||||
user.visible_message("[user.name] replaces the damaged APC frame with a new one.",\
|
||||
"<span class='notice'>You begin to replace the damaged APC frame...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
user << "<span class='notice'>You replace the damaged APC frame with a new one.</span>"
|
||||
to_chat(user, "<span class='notice'>You replace the damaged APC frame with a new one.</span>")
|
||||
qdel(W)
|
||||
stat &= ~BROKEN
|
||||
obj_integrity = max_integrity
|
||||
@@ -623,16 +623,16 @@
|
||||
/obj/machinery/power/apc/emag_act(mob/user)
|
||||
if(!emagged && !malfhack)
|
||||
if(opened)
|
||||
user << "<span class='warning'>You must close the cover to swipe an ID card!</span>"
|
||||
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
|
||||
else if(panel_open)
|
||||
user << "<span class='warning'>You must close the panel first!</span>"
|
||||
to_chat(user, "<span class='warning'>You must close the panel first!</span>")
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
user << "<span class='warning'>Nothing happens!</span>"
|
||||
to_chat(user, "<span class='warning'>Nothing happens!</span>")
|
||||
else
|
||||
flick("apc-spark", src)
|
||||
emagged = 1
|
||||
locked = 0
|
||||
user << "<span class='notice'>You emag the APC interface.</span>"
|
||||
to_chat(user, "<span class='notice'>You emag the APC interface.</span>")
|
||||
update_icon()
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
@@ -649,7 +649,7 @@
|
||||
src.cell = null
|
||||
user.visible_message("[user.name] removes the power cell from [src.name]!",\
|
||||
"<span class='notice'>You remove the power cell.</span>")
|
||||
//user << "You remove the power cell."
|
||||
//to_chat(user, "You remove the power cell.")
|
||||
charging = 0
|
||||
src.update_icon()
|
||||
return
|
||||
@@ -681,7 +681,7 @@
|
||||
"chargingStatus" = charging,
|
||||
"totalLoad" = lastused_total,
|
||||
"coverLocked" = coverlocked,
|
||||
"siliconUser" = user.has_unlimited_silicon_privilege,
|
||||
"siliconUser" = user.has_unlimited_silicon_privilege || user.using_power_flow_console(),
|
||||
"malfStatus" = get_malf_status(user),
|
||||
|
||||
"powerChannels" = list(
|
||||
@@ -744,13 +744,13 @@
|
||||
area.power_environ = (environ > 1)
|
||||
// if (area.name == "AI Chamber")
|
||||
// spawn(10)
|
||||
// world << " [area.name] [area.power_equip]"
|
||||
// to_chat(world, " [area.name] [area.power_equip]")
|
||||
else
|
||||
area.power_light = 0
|
||||
area.power_equip = 0
|
||||
area.power_environ = 0
|
||||
// if (area.name == "AI Chamber")
|
||||
// world << "[area.power_equip]"
|
||||
// to_chat(world, "[area.power_equip]")
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user, loud = 0) //used by attack_hand() and Topic()
|
||||
@@ -768,7 +768,7 @@
|
||||
) \
|
||||
)
|
||||
if(!loud)
|
||||
user << "<span class='danger'>\The [src] has eee disabled!</span>"
|
||||
to_chat(user, "<span class='danger'>\The [src] has eee disabled!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -779,7 +779,7 @@
|
||||
if("lock")
|
||||
if(usr.has_unlimited_silicon_privilege)
|
||||
if(emagged || (stat & (BROKEN|MAINT)))
|
||||
usr << "The APC does not respond to the command."
|
||||
to_chat(usr, "The APC does not respond to the command.")
|
||||
else
|
||||
locked = !locked
|
||||
update_icon()
|
||||
@@ -840,9 +840,9 @@
|
||||
if(get_malf_status(malf) != 1)
|
||||
return
|
||||
if(malf.malfhacking)
|
||||
malf << "You are already hacking an APC."
|
||||
to_chat(malf, "You are already hacking an APC.")
|
||||
return
|
||||
malf << "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process."
|
||||
to_chat(malf, "Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process.")
|
||||
malf.malfhack = src
|
||||
malf.malfhacking = addtimer(CALLBACK(malf, /mob/living/silicon/ai/.proc/malfhacked, src), 600, TIMER_STOPPABLE)
|
||||
|
||||
@@ -854,10 +854,10 @@
|
||||
if(!istype(malf))
|
||||
return
|
||||
if(istype(malf.loc, /obj/machinery/power/apc)) // Already in an APC
|
||||
malf << "<span class='warning'>You must evacuate your current APC first!</span>"
|
||||
to_chat(malf, "<span class='warning'>You must evacuate your current APC first!</span>")
|
||||
return
|
||||
if(!malf.can_shunt)
|
||||
malf << "<span class='warning'>You cannot shunt!</span>"
|
||||
to_chat(malf, "<span class='warning'>You cannot shunt!</span>")
|
||||
return
|
||||
if(src.z != 1)
|
||||
return
|
||||
@@ -888,7 +888,7 @@
|
||||
occupier.parent.verbs -= /mob/living/silicon/ai/proc/corereturn
|
||||
qdel(occupier)
|
||||
else
|
||||
occupier << "<span class='danger'>Primary core damaged, unable to return core processes.</span>"
|
||||
to_chat(occupier, "<span class='danger'>Primary core damaged, unable to return core processes.</span>")
|
||||
if(forced)
|
||||
occupier.loc = src.loc
|
||||
occupier.death()
|
||||
@@ -899,19 +899,19 @@
|
||||
|
||||
/obj/machinery/power/apc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
|
||||
if(card.AI)
|
||||
user << "<span class='warning'>[card] is already occupied!</span>"
|
||||
to_chat(user, "<span class='warning'>[card] is already occupied!</span>")
|
||||
return
|
||||
if(!occupier)
|
||||
user << "<span class='warning'>There's nothing in [src] to transfer!</span>"
|
||||
to_chat(user, "<span class='warning'>There's nothing in [src] to transfer!</span>")
|
||||
return
|
||||
if(!occupier.mind || !occupier.client)
|
||||
user << "<span class='warning'>[occupier] is either inactive, destroyed, or braindead!</span>"
|
||||
to_chat(user, "<span class='warning'>[occupier] is either inactive or destroyed!</span>")
|
||||
return
|
||||
if(!occupier.parent.stat)
|
||||
user << "<span class='warning'>[occupier] is refusing all attempts at transfer!</span>" //We can return to our core, no need to shunt right now
|
||||
to_chat(user, "<span class='warning'>[occupier] is refusing all attempts at transfer!</span>" )
|
||||
return
|
||||
if(transfer_in_progress)
|
||||
user << "<span class='warning'>There's already a transfer in progress!</span>"
|
||||
to_chat(user, "<span class='warning'>There's already a transfer in progress!</span>")
|
||||
return
|
||||
if(interaction != AI_TRANS_TO_CARD || occupier.stat)
|
||||
return
|
||||
@@ -923,26 +923,26 @@
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
occupier << sound('sound/misc/notice2.ogg') //To alert the AI that someone's trying to card them if they're tabbed out
|
||||
if(alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", "Yes - Transfer Me", "No - Keep Me Here") == "No - Keep Me Here")
|
||||
user << "<span class='danger'>AI denied transfer request. Process terminated.</span>"
|
||||
to_chat(user, "<span class='danger'>AI denied transfer request. Process terminated.</span>")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
transfer_in_progress = FALSE
|
||||
return
|
||||
if(user.loc != T)
|
||||
user << "<span class='danger'>Location changed. Process terminated.</span>"
|
||||
occupier << "<span class='warning'>[user] moved away! Transfer canceled.</span>"
|
||||
to_chat(user, "<span class='danger'>Location changed. Process terminated.</span>")
|
||||
to_chat(occupier, "<span class='warning'>[user] moved away! Transfer canceled.</span>")
|
||||
transfer_in_progress = FALSE
|
||||
return
|
||||
user << "<span class='notice'>AI accepted request. Transferring stored intelligence to [card]...</span>"
|
||||
occupier << "<span class='notice'>Transfer starting. You will be moved to [card] shortly.</span>"
|
||||
to_chat(user, "<span class='notice'>AI accepted request. Transferring stored intelligence to [card]...</span>")
|
||||
to_chat(occupier, "<span class='notice'>Transfer starting. You will be moved to [card] shortly.</span>")
|
||||
if(!do_after(user, 50, target = src))
|
||||
occupier << "<span class='warning'>[user] was interrupted! Transfer canceled.</span>"
|
||||
to_chat(occupier, "<span class='warning'>[user] was interrupted! Transfer canceled.</span>")
|
||||
transfer_in_progress = FALSE
|
||||
return
|
||||
if(!occupier || !card)
|
||||
transfer_in_progress = FALSE
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] transfers [occupier] to [card]!</span>", "<span class='notice'>Transfer complete! [occupier] is now stored in [card].</span>")
|
||||
occupier << "<span class='notice'>Transfer complete! You've been stored in [user]'s [card.name].</span>"
|
||||
to_chat(occupier, "<span class='notice'>Transfer complete! You've been stored in [user]'s [card.name].</span>")
|
||||
occupier.forceMove(card)
|
||||
card.AI = occupier
|
||||
occupier.parent.shunted = FALSE
|
||||
|
||||
Reference in New Issue
Block a user