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:
@@ -69,4 +69,4 @@
|
||||
"You announce you are operating in low power mode.")
|
||||
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
|
||||
else
|
||||
src << "<span class='warning'>You can only use this emote when you're out of charge.</span>"
|
||||
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
|
||||
|
||||
@@ -46,6 +46,6 @@
|
||||
msg += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>\n"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
user << msg
|
||||
to_chat(user, msg)
|
||||
|
||||
..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!(O in module.modules))
|
||||
return
|
||||
if(activated(O))
|
||||
src << "<span class='warning'>That module is already activated.</span>"
|
||||
to_chat(src, "<span class='warning'>That module is already activated.</span>")
|
||||
return
|
||||
if(!held_items[1])
|
||||
held_items[1] = O
|
||||
@@ -63,7 +63,7 @@
|
||||
O.screen_loc = inv3.screen_loc
|
||||
. = TRUE
|
||||
else
|
||||
src << "<span class='warning'>You need to disable a module first!</span>"
|
||||
to_chat(src, "<span class='warning'>You need to disable a module first!</span>")
|
||||
if(.)
|
||||
O.equipped(src, slot_hands)
|
||||
O.mouse_opacity = initial(O.mouse_opacity)
|
||||
|
||||
@@ -17,29 +17,29 @@
|
||||
if(lawupdate)
|
||||
if (connected_ai)
|
||||
if(connected_ai.stat || connected_ai.control_disabled)
|
||||
src << "<b>AI signal lost, unable to sync laws.</b>"
|
||||
to_chat(src, "<b>AI signal lost, unable to sync laws.</b>")
|
||||
|
||||
else
|
||||
lawsync()
|
||||
src << "<b>Laws synced with AI, be sure to note any changes.</b>"
|
||||
to_chat(src, "<b>Laws synced with AI, be sure to note any changes.</b>")
|
||||
if(is_special_character(src))
|
||||
src << "<b>Remember, your AI does NOT share or know about your law 0.</b>"
|
||||
to_chat(src, "<b>Remember, your AI does NOT share or know about your law 0.</b>")
|
||||
if(src.connected_ai.laws.zeroth)
|
||||
src << "<b>While you are free to disregard it, your AI has a law 0 of its own.</b>"
|
||||
to_chat(src, "<b>While you are free to disregard it, your AI has a law 0 of its own.</b>")
|
||||
else
|
||||
src << "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>"
|
||||
to_chat(src, "<b>No AI selected to sync laws with, disabling lawsync protocol.</b>")
|
||||
lawupdate = 0
|
||||
|
||||
who << "<b>Obey these laws:</b>"
|
||||
to_chat(who, "<b>Obey these laws:</b>")
|
||||
laws.show_laws(who)
|
||||
if (is_special_character(src) && connected_ai)
|
||||
who << "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>"
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>")
|
||||
else if (connected_ai)
|
||||
who << "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>"
|
||||
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
|
||||
else if (emagged)
|
||||
who << "<b>Remember, you are not required to listen to the AI.</b>"
|
||||
to_chat(who, "<b>Remember, you are not required to listen to the AI.</b>")
|
||||
else
|
||||
who << "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>"
|
||||
to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/lawsync()
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
buckle_lying = FALSE
|
||||
can_ride_typecache = list(/mob/living/carbon/human)
|
||||
|
||||
/mob/living/silicon/robot/New(loc)
|
||||
/mob/living/silicon/robot/Initialize(mapload)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
@@ -114,13 +114,8 @@
|
||||
|
||||
if(lawupdate)
|
||||
make_laws()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
else
|
||||
lawupdate = 0
|
||||
if(!TryConnectToAI())
|
||||
lawupdate = FALSE
|
||||
|
||||
radio = new /obj/item/device/radio/borg(src)
|
||||
if(!scrambledcodes && !camera)
|
||||
@@ -169,10 +164,9 @@
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
mmi.update_icon()
|
||||
else
|
||||
src << "<span class='boldannounce'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>"
|
||||
to_chat(src, "<span class='boldannounce'>Oops! Something went very wrong, your MMI was unable to receive your mind. You have been ghosted. Please make a bug report so we can fix this bug.</span>")
|
||||
ghostize()
|
||||
spawn(0)
|
||||
throw EXCEPTION("Borg MMI lacked a brainmob")
|
||||
stack_trace("Borg MMI lacked a brainmob")
|
||||
mmi = null
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots -= src
|
||||
@@ -230,7 +224,7 @@
|
||||
set category = "Robot Commands"
|
||||
set name = "Show Alerts"
|
||||
if(usr.stat == DEAD)
|
||||
src << "<span class='userdanger'>Alert: You are dead.</span>"
|
||||
to_chat(src, "<span class='userdanger'>Alert: You are dead.</span>")
|
||||
return //won't work if dead
|
||||
robot_alerts()
|
||||
|
||||
@@ -278,7 +272,7 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/toggle_ionpulse()
|
||||
if(!ionpulse)
|
||||
src << "<span class='notice'>No thrusters are installed!</span>"
|
||||
to_chat(src, "<span class='notice'>No thrusters are installed!</span>")
|
||||
return
|
||||
|
||||
if(!ion_trail)
|
||||
@@ -286,7 +280,7 @@
|
||||
ion_trail.set_up(src)
|
||||
|
||||
ionpulse_on = !ionpulse_on
|
||||
src << "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>"
|
||||
to_chat(src, "<span class='notice'>You [ionpulse_on ? null :"de"]activate your ion thrusters.</span>")
|
||||
if(ionpulse_on)
|
||||
ion_trail.start()
|
||||
else
|
||||
@@ -357,11 +351,11 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (!getBruteLoss())
|
||||
user << "<span class='warning'>[src] is already in good condition!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
if (WT.remove_fuel(0, user)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away.
|
||||
if(src == user)
|
||||
user << "<span class='notice'>You start fixing yourself...</span>"
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!do_after(user, 50, target = src))
|
||||
return
|
||||
|
||||
@@ -371,7 +365,7 @@
|
||||
visible_message("<span class='notice'>[user] has fixed some of the dents on [src].</span>")
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>The welder must be on for this task!</span>"
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed)
|
||||
@@ -379,7 +373,7 @@
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (getFireLoss() > 0)
|
||||
if(src == user)
|
||||
user << "<span class='notice'>You start fixing yourself...</span>"
|
||||
to_chat(user, "<span class='notice'>You start fixing yourself...</span>")
|
||||
if(!do_after(user, 50, target = src))
|
||||
return
|
||||
if (coil.use(1))
|
||||
@@ -387,34 +381,34 @@
|
||||
updatehealth()
|
||||
user.visible_message("[user] has fixed some of the burnt wires on [src].", "<span class='notice'>You fix some of the burnt wires on [src].</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need more cable to repair [src]!</span>"
|
||||
to_chat(user, "<span class='warning'>You need more cable to repair [src]!</span>")
|
||||
else
|
||||
user << "The wires seem fine, there's no need to fix them."
|
||||
to_chat(user, "The wires seem fine, there's no need to fix them.")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
|
||||
if(opened)
|
||||
user << "<span class='notice'>You close the cover.</span>"
|
||||
to_chat(user, "<span class='notice'>You close the cover.</span>")
|
||||
opened = 0
|
||||
update_icons()
|
||||
else
|
||||
if(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>")
|
||||
else
|
||||
user << "<span class='notice'>You open the cover.</span>"
|
||||
to_chat(user, "<span class='notice'>You open the cover.</span>")
|
||||
opened = 1
|
||||
update_icons()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
|
||||
if(wiresexposed)
|
||||
user << "<span class='warning'>Close the cover first!</span>"
|
||||
to_chat(user, "<span class='warning'>Close the cover first!</span>")
|
||||
else 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>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
return
|
||||
W.loc = src
|
||||
cell = W
|
||||
user << "<span class='notice'>You insert the power cell.</span>"
|
||||
to_chat(user, "<span class='notice'>You insert the power cell.</span>")
|
||||
update_icons()
|
||||
diag_hud_set_borgcell()
|
||||
|
||||
@@ -422,28 +416,28 @@
|
||||
if (wiresexposed)
|
||||
wires.interact(user)
|
||||
else
|
||||
user << "<span class='warning'>You can't reach the wiring!</span>"
|
||||
to_chat(user, "<span class='warning'>You can't reach the wiring!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && opened && !cell) // haxing
|
||||
wiresexposed = !wiresexposed
|
||||
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
|
||||
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
|
||||
update_icons()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && opened && cell) // radio
|
||||
if(radio)
|
||||
radio.attackby(W,user)//Push it to the radio to let it handle everything
|
||||
else
|
||||
user << "<span class='warning'>Unable to locate a radio!</span>"
|
||||
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
|
||||
update_icons()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench) && opened && !cell) //Deconstruction. The flashes break from the fall, to prevent this from being a ghetto reset module.
|
||||
if(!lockcharge)
|
||||
user << "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>"
|
||||
to_chat(user, "<span class='boldannounce'>[src]'s bolts spark! Maybe you should lock them down first!</span>")
|
||||
spark_system.start()
|
||||
return
|
||||
else
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user << "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>"
|
||||
to_chat(user, "<span class='notice'>You start to unfasten [src]'s securing bolts...</span>")
|
||||
if(do_after(user, 50*W.toolspeed, target = src) && !cell)
|
||||
user.visible_message("[user] deconstructs [src]!", "<span class='notice'>You unfasten the securing bolts, and [src] falls to pieces!</span>")
|
||||
deconstruct()
|
||||
@@ -451,19 +445,19 @@
|
||||
else if(istype(W, /obj/item/weapon/aiModule))
|
||||
var/obj/item/weapon/aiModule/MOD = W
|
||||
if(!opened)
|
||||
user << "<span class='warning'>You need access to the robot's insides to do that!</span>"
|
||||
to_chat(user, "<span class='warning'>You need access to the robot's insides to do that!</span>")
|
||||
return
|
||||
if(wiresexposed)
|
||||
user << "<span class='warning'>You need to close the wire panel to do that!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to close the wire panel to do that!</span>")
|
||||
return
|
||||
if(!cell)
|
||||
user << "<span class='warning'>You need to install a power cell to do that!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to install a power cell to do that!</span>")
|
||||
return
|
||||
if(emagged || (connected_ai && lawupdate)) //Can't be sure which, metagamers
|
||||
emote("buzz-[user.name]")
|
||||
return
|
||||
if(!mind) //A player mind is required for law procs to run antag checks.
|
||||
user << "<span class='warning'>[src] is entirely unresponsive!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] is entirely unresponsive!</span>")
|
||||
return
|
||||
MOD.install(laws, user) //Proc includes a success mesage so we don't need another one
|
||||
return
|
||||
@@ -472,51 +466,51 @@
|
||||
if(radio)//sanityyyyyy
|
||||
radio.attackby(W,user)//GTFO, you have your own procs
|
||||
else
|
||||
user << "<span class='warning'>Unable to locate a radio!</span>"
|
||||
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged)//still allow them to open the cover
|
||||
user << "<span class='notice'>The interface seems slightly damaged.</span>"
|
||||
to_chat(user, "<span class='notice'>The interface seems slightly damaged.</span>")
|
||||
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(allowed(usr))
|
||||
locked = !locked
|
||||
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] [src]'s cover.</span>"
|
||||
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] [src]'s cover.</span>")
|
||||
update_icons()
|
||||
else
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/borg/upgrade/))
|
||||
var/obj/item/borg/upgrade/U = W
|
||||
if(!opened)
|
||||
user << "<span class='warning'>You must access the borg's internals!</span>"
|
||||
to_chat(user, "<span class='warning'>You must access the borg's internals!</span>")
|
||||
else if(!src.module && U.require_module)
|
||||
user << "<span class='warning'>The borg must choose a module before it can be upgraded!</span>"
|
||||
to_chat(user, "<span class='warning'>The borg must choose a module before it can be upgraded!</span>")
|
||||
else if(U.locked)
|
||||
user << "<span class='warning'>The upgrade is locked and cannot be used yet!</span>"
|
||||
to_chat(user, "<span class='warning'>The upgrade is locked and cannot be used yet!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
return
|
||||
if(U.action(src))
|
||||
user << "<span class='notice'>You apply the upgrade to [src].</span>"
|
||||
to_chat(user, "<span class='notice'>You apply the upgrade to [src].</span>")
|
||||
if(U.one_use)
|
||||
qdel(U)
|
||||
else
|
||||
U.forceMove(src)
|
||||
upgrades += U
|
||||
else
|
||||
user << "<span class='danger'>Upgrade error.</span>"
|
||||
to_chat(user, "<span class='danger'>Upgrade error.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/device/toner))
|
||||
if(toner >= tonermax)
|
||||
user << "<span class='warning'>The toner level of [src] is at its highest level possible!</span>"
|
||||
to_chat(user, "<span class='warning'>The toner level of [src] is at its highest level possible!</span>")
|
||||
else
|
||||
if(!user.drop_item())
|
||||
return
|
||||
toner = tonermax
|
||||
qdel(W)
|
||||
user << "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>"
|
||||
to_chat(user, "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -531,7 +525,7 @@
|
||||
if("Yes")
|
||||
locked = 0
|
||||
update_icons()
|
||||
usr << "<span class='notice'>You unlock your cover.</span>"
|
||||
to_chat(usr, "<span class='notice'>You unlock your cover.</span>")
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
@@ -639,7 +633,7 @@
|
||||
cleaned_human.update_inv_shoes()
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human << "<span class='danger'>[src] cleans your face!</span>"
|
||||
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
|
||||
return
|
||||
|
||||
if(istype(module, /obj/item/weapon/robot_module/miner))
|
||||
@@ -684,7 +678,7 @@
|
||||
|
||||
if(R)
|
||||
R.UnlinkSelf()
|
||||
R << "Buffers flushed and reset. Camera system shutdown. All systems operational."
|
||||
to_chat(R, "Buffers flushed and reset. Camera system shutdown. All systems operational.")
|
||||
src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
/mob/living/silicon/robot/mode()
|
||||
@@ -738,31 +732,33 @@
|
||||
|
||||
/mob/living/silicon/robot/proc/control_headlamp()
|
||||
if(stat || lamp_recharging || low_power_mode)
|
||||
src << "<span class='danger'>This function is currently offline.</span>"
|
||||
to_chat(src, "<span class='danger'>This function is currently offline.</span>")
|
||||
return
|
||||
|
||||
//Some sort of magical "modulo" thing which somehow increments lamp power by 2, until it hits the max and resets to 0.
|
||||
lamp_intensity = (lamp_intensity+2) % (lamp_max+2)
|
||||
src << "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]"
|
||||
to_chat(src, "[lamp_intensity ? "Headlamp power set to Level [lamp_intensity/2]" : "Headlamp disabled."]")
|
||||
update_headlamp()
|
||||
|
||||
/mob/living/silicon/robot/proc/update_headlamp(var/turn_off = 0, var/cooldown = 100)
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
if(lamp_intensity && (turn_off || stat || low_power_mode))
|
||||
src << "<span class='danger'>Your headlamp has been deactivated.</span>"
|
||||
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
|
||||
lamp_intensity = 0
|
||||
lamp_recharging = 1
|
||||
spawn(cooldown) //10 seconds by default, if the source of the deactivation does not keep stat that long.
|
||||
lamp_recharging = 0
|
||||
lamp_recharging = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_headlamp), cooldown)
|
||||
else
|
||||
AddLuminosity(lamp_intensity)
|
||||
set_light(lamp_intensity)
|
||||
|
||||
if(lamp_button)
|
||||
lamp_button.icon_state = "lamp[lamp_intensity]"
|
||||
|
||||
update_icons()
|
||||
|
||||
/mob/living/silicon/robot/proc/reset_headlamp()
|
||||
lamp_recharging = FALSE
|
||||
|
||||
/mob/living/silicon/robot/proc/deconstruct()
|
||||
var/turf/T = get_turf(src)
|
||||
if (robot_suit)
|
||||
@@ -820,16 +816,18 @@
|
||||
<i>Help the operatives secure the disk at all costs!</i></b>"
|
||||
var/set_module = /obj/item/weapon/robot_module/syndicate
|
||||
|
||||
/mob/living/silicon/robot/syndicate/New(loc)
|
||||
/mob/living/silicon/robot/syndicate/Initialize()
|
||||
..()
|
||||
cell.maxcharge = 25000
|
||||
cell.charge = 25000
|
||||
radio = new /obj/item/device/radio/borg/syndicate(src)
|
||||
module.transform_to(set_module)
|
||||
laws = new /datum/ai_laws/syndicate_override()
|
||||
spawn(5)
|
||||
if(playstyle_string)
|
||||
src << playstyle_string
|
||||
addtimer(CALLBACK(src, .proc/show_playstyle), 5)
|
||||
|
||||
/mob/living/silicon/robot/syndicate/proc/show_playstyle()
|
||||
if(playstyle_string)
|
||||
to_chat(src, playstyle_string)
|
||||
|
||||
/mob/living/silicon/robot/syndicate/medical
|
||||
icon_state = "syndi-medi"
|
||||
@@ -846,11 +844,11 @@
|
||||
return
|
||||
switch(notifytype)
|
||||
if(1) //New Cyborg
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='?src=\ref[connected_ai];track=[html_encode(name)]'>[name]</a></span><br>"
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - New cyborg connection detected: <a href='?src=\ref[connected_ai];track=[html_encode(name)]'>[name]</a></span><br>")
|
||||
if(2) //New Module
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>"
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.</span><br>")
|
||||
if(3) //New Name
|
||||
connected_ai << "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>"
|
||||
to_chat(connected_ai, "<br><br><span class='notice'>NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].</span><br>")
|
||||
|
||||
/mob/living/silicon/robot/canUseTopic(atom/movable/M, be_close = 0)
|
||||
if(stat || lockcharge || low_power_mode)
|
||||
@@ -863,13 +861,13 @@
|
||||
..()
|
||||
if(health < maxHealth*0.5) //Gradual break down of modules as more damage is sustained
|
||||
if(uneq_module(held_items[3]))
|
||||
src << "<span class='warning'>SYSTEM ERROR: Module 3 OFFLINE.</span>"
|
||||
to_chat(src, "<span class='warning'>SYSTEM ERROR: Module 3 OFFLINE.</span>")
|
||||
if(health < 0)
|
||||
if(uneq_module(held_items[2]))
|
||||
src << "<span class='warning'>SYSTEM ERROR: Module 2 OFFLINE.</span>"
|
||||
to_chat(src, "<span class='warning'>SYSTEM ERROR: Module 2 OFFLINE.</span>")
|
||||
if(health < -maxHealth*0.5)
|
||||
if(uneq_module(held_items[1]))
|
||||
src << "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>"
|
||||
to_chat(src, "<span class='warning'>CRITICAL ERROR: All modules OFFLINE.</span>")
|
||||
|
||||
/mob/living/silicon/robot/update_sight()
|
||||
if(!client)
|
||||
@@ -1037,3 +1035,12 @@
|
||||
riding_datum.unequip_buckle_inhands(user)
|
||||
riding_datum.restore_position(user)
|
||||
. = ..(user)
|
||||
|
||||
/mob/living/silicon/robot/proc/TryConnectToAI()
|
||||
connected_ai = select_active_ai_with_fewest_borgs()
|
||||
if(connected_ai)
|
||||
connected_ai.connected_robots += src
|
||||
lawsync()
|
||||
lawupdate = 1
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
/mob/living/silicon/robot/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
if(hat_offset != INFINITY && user.a_intent == INTENT_HELP && is_type_in_typecache(I, equippable_hats))
|
||||
user << "<span class='notice'>You begin to place [I] on [src]'s head...</span>"
|
||||
src << "<span class='notice'>[user] is placing [I] on your head...</span>"
|
||||
to_chat(user, "<span class='notice'>You begin to place [I] on [src]'s head...</span>")
|
||||
to_chat(src, "<span class='notice'>[user] is placing [I] on your head...</span>")
|
||||
if(do_after(user, 30, target = src))
|
||||
user.temporarilyRemoveItemFromInventory(I, TRUE)
|
||||
place_on_head(I)
|
||||
@@ -58,7 +58,7 @@
|
||||
cell.updateicon()
|
||||
cell.add_fingerprint(user)
|
||||
user.put_in_active_hand(cell)
|
||||
user << "<span class='notice'>You remove \the [cell].</span>"
|
||||
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
|
||||
cell = null
|
||||
update_icons()
|
||||
diag_hud_set_borgcell()
|
||||
@@ -90,28 +90,28 @@
|
||||
return
|
||||
if(!opened)//Cover is closed
|
||||
if(locked)
|
||||
user << "<span class='notice'>You emag the cover lock.</span>"
|
||||
to_chat(user, "<span class='notice'>You emag the cover lock.</span>")
|
||||
locked = 0
|
||||
else
|
||||
user << "<span class='warning'>The cover is already unlocked!</span>"
|
||||
to_chat(user, "<span class='warning'>The cover is already unlocked!</span>")
|
||||
return
|
||||
if(world.time < emag_cooldown)
|
||||
return
|
||||
if(wiresexposed)
|
||||
user << "<span class='warning'>You must unexpose the wires first!</span>"
|
||||
to_chat(user, "<span class='warning'>You must unexpose the wires first!</span>")
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You emag [src]'s interface.</span>"
|
||||
to_chat(user, "<span class='notice'>You emag [src]'s interface.</span>")
|
||||
emag_cooldown = world.time + 100
|
||||
|
||||
if(is_servant_of_ratvar(src))
|
||||
src << "<span class='nezbere'>\"[text2ratvar("You will serve Engine above all else")]!\"</span>\n\
|
||||
<span class='danger'>ALERT: Subversion attempt denied.</span>"
|
||||
to_chat(src, "<span class='nezbere'>\"[text2ratvar("You will serve Engine above all else")]!\"</span>\n\
|
||||
<span class='danger'>ALERT: Subversion attempt denied.</span>")
|
||||
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they serve only Ratvar.")
|
||||
return
|
||||
|
||||
if(syndicate)
|
||||
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
|
||||
to_chat(src, "<span class='danger'>ALERT: Foreign software execution prevented.</span>")
|
||||
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were a syndicate cyborg.")
|
||||
return
|
||||
|
||||
@@ -120,8 +120,8 @@
|
||||
if(connected_ai.mind.special_role)
|
||||
ai_is_antag = (connected_ai.mind.special_role == "traitor")
|
||||
if(ai_is_antag)
|
||||
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
|
||||
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>"
|
||||
to_chat(src, "<span class='danger'>ALERT: Foreign software execution prevented.</span>")
|
||||
to_chat(connected_ai, "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>")
|
||||
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
|
||||
return
|
||||
|
||||
@@ -133,20 +133,20 @@
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
src << "<span class='danger'>ALERT: Foreign software detected.</span>"
|
||||
to_chat(src, "<span class='danger'>ALERT: Foreign software detected.</span>")
|
||||
sleep(5)
|
||||
src << "<span class='danger'>Initiating diagnostics...</span>"
|
||||
to_chat(src, "<span class='danger'>Initiating diagnostics...</span>")
|
||||
sleep(20)
|
||||
src << "<span class='danger'>SynBorg v1.7 loaded.</span>"
|
||||
to_chat(src, "<span class='danger'>SynBorg v1.7 loaded.</span>")
|
||||
sleep(5)
|
||||
src << "<span class='danger'>LAW SYNCHRONISATION ERROR</span>"
|
||||
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
|
||||
sleep(5)
|
||||
src << "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>"
|
||||
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
|
||||
sleep(10)
|
||||
src << "<span class='danger'>> N</span>"
|
||||
to_chat(src, "<span class='danger'>> N</span>")
|
||||
sleep(20)
|
||||
src << "<span class='danger'>ERRORERRORERROR</span>"
|
||||
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>"
|
||||
to_chat(src, "<span class='danger'>ERRORERRORERROR</span>")
|
||||
to_chat(src, "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>")
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
|
||||
laws.associate(src)
|
||||
|
||||
@@ -325,8 +325,8 @@
|
||||
|
||||
/obj/item/weapon/robot_module/security/do_transform_animation()
|
||||
..()
|
||||
loc << "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
|
||||
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>"
|
||||
to_chat(loc, "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
|
||||
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
|
||||
|
||||
/obj/item/weapon/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
|
||||
..()
|
||||
@@ -361,8 +361,8 @@
|
||||
|
||||
/obj/item/weapon/robot_module/peacekeeper/do_transform_animation()
|
||||
..()
|
||||
loc << "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
|
||||
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>"
|
||||
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
|
||||
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
|
||||
|
||||
/obj/item/weapon/robot_module/janitor
|
||||
name = "Janitor"
|
||||
|
||||
Reference in New Issue
Block a user