Merge branch 'master' of https://github.com/PolarisSS13/Polaris into Precursotech_Tools

This commit is contained in:
Mechoid
2019-04-13 20:01:31 -07:00
61 changed files with 921 additions and 409 deletions
+9 -12
View File
@@ -59,15 +59,15 @@
var/user = usr
if (href_list["wipe"])
var/confirm = alert("Are you sure you want to disable this core's power? This cannot be undone once started.", "Confirm Shutdown", "Yes", "No")
var/confirm = alert("Are you sure you want to disable this core's power? This cannot be undone once started.", "Confirm Shutdown", "No", "Yes")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
add_attack_logs(user,carded_ai,"Purged from AI Card")
flush = 1
carded_ai.suiciding = 1
to_chat(carded_ai, "Your power has been disabled!")
while (carded_ai && carded_ai.stat != 2)
if(carded_ai.controlling_drone && prob(carded_ai.oxyloss)) //You feel it creeping? Eventually will reach 100, resulting in the second half of the AI's remaining life being lonely.
carded_ai.controlling_drone.release_ai_control("Unit lost. Integrity too low to maintain connection.")
while (carded_ai && carded_ai.stat != DEAD)
if(carded_ai.deployed_shell && prob(carded_ai.oxyloss)) //You feel it creeping? Eventually will reach 100, resulting in the second half of the AI's remaining life being lonely.
carded_ai.disconnect_shell("Disconnecting from remote shell due to insufficent power.")
carded_ai.adjustOxyLoss(2)
carded_ai.updatehealth()
sleep(10)
@@ -80,8 +80,8 @@
carded_ai.control_disabled = text2num(href_list["wireless"])
to_chat(carded_ai, "<span class='warning'>Your wireless interface has been [carded_ai.control_disabled ? "disabled" : "enabled"]!</span>")
to_chat(user, "<span class='notice'>You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface.</span>")
if(carded_ai.control_disabled && carded_ai.controlling_drone)
carded_ai.controlling_drone.release_ai_control("Unit control terminated at intellicore port.")
if(carded_ai.control_disabled && carded_ai.deployed_shell)
carded_ai.disconnect_shell("Disconnecting from remote shell due to [src] wireless access interface being disabled.")
update_icon()
return 1
@@ -98,7 +98,7 @@
icon_state = "aicard"
/obj/item/device/aicard/proc/grab_ai(var/mob/living/silicon/ai/ai, var/mob/living/user)
if(!ai.client && !ai.controlling_drone)
if(!ai.client && !ai.deployed_shell)
to_chat(user, "<span class='danger'>ERROR:</span> AI [ai.name] is offline. Unable to transfer.")
return 0
@@ -112,9 +112,7 @@
return 0
user.visible_message("\The [user] starts transferring \the [ai] into \the [src]...", "You start transferring \the [ai] into \the [src]...")
to_chat(ai, "<span class='danger'>\The [user] is transferring you into \the [src]!</span>")
if(ai.controlling_drone)
to_chat(ai.controlling_drone, "<span class='danger'>\The [user] is transferring you into \the [src]!</span>")
show_message(span("critical", "\The [user] is transferring you into \the [src]!"))
if(do_after(user, 100))
if(istype(ai.loc, /turf/))
@@ -130,8 +128,7 @@
ai.control_disabled = 1
ai.aiRestorePowerRoutine = 0
carded_ai = ai
if(ai.controlling_drone)
ai.controlling_drone.release_ai_control("Unit control lost.")
ai.disconnect_shell("Disconnected from remote shell due to core intelligence transfer.") //If the AI is controlling a borg, force the player back to core!
if(ai.client)
to_chat(ai, "You have been transferred into a mobile core. Remote access lost.")
+28 -29
View File
@@ -168,28 +168,29 @@
if(!istype(loc,/turf))
to_chat(user, "<span class='warning'>You can't put \the [W] in, the frame has to be standing on the ground to be perfectly precise.</span>")
return
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [W] into the frame would sort of defeat the purpose.</span>")
return
if(!M.brainmob.key)
var/ghost_can_reenter = 0
if(M.brainmob.mind)
for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
ghost_can_reenter = 1 //May come in use again at another point.
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; though it may be able to auto-resuscitate.</span>") //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
return
if(!ghost_can_reenter)
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; there's no point.</span>")
if(!istype(W, /obj/item/device/mmi/inert))
if(!M.brainmob)
to_chat(user, "<span class='warning'>Sticking an empty [W] into the frame would sort of defeat the purpose.</span>")
return
if(!M.brainmob.key)
var/ghost_can_reenter = 0
if(M.brainmob.mind)
for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
ghost_can_reenter = 1 //May come in use again at another point.
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; though it may be able to auto-resuscitate.</span>") //Jamming a ghosted brain into a borg is likely detrimental, and may result in some problems.
return
if(!ghost_can_reenter)
to_chat(user, "<span class='notice'>\The [W] is completely unresponsive; there's no point.</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [W] into the frame would sort of defeat the purpose.</span>")
return
if(M.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>Sticking a dead [W] into the frame would sort of defeat the purpose.</span>")
return
if(jobban_isbanned(M.brainmob, "Cyborg"))
to_chat(user, "<span class='warning'>This [W] does not seem to fit.</span>")
return
if(jobban_isbanned(M.brainmob, "Cyborg"))
to_chat(user, "<span class='warning'>This [W] does not seem to fit.</span>")
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
if(!O) return
@@ -197,20 +198,18 @@
user.drop_item()
O.mmi = W
O.post_mmi_setup()
O.invisibility = 0
O.custom_name = created_name
O.updatename("Default")
M.brainmob.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
if(M.brainmob)
M.brainmob.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
for(var/datum/language/L in M.brainmob.languages)
O.add_language(L.name)
O.job = "Cyborg"
for(var/datum/language/L in M.brainmob.languages)
O.add_language(L.name)
O.cell = chest.cell
O.cell.loc = O
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
@@ -25,17 +25,9 @@
require_module = 1
/obj/item/borg/upgrade/reset/action(var/mob/living/silicon/robot/R)
if(..()) return 0
R.uneq_all()
R.modtype = initial(R.modtype)
R.hands.icon_state = initial(R.hands.icon_state)
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
R.module.Reset(R)
qdel(R.module)
R.module = null
R.updatename("Default")
if(..())
return 0
R.module_reset()
return 1
/obj/item/borg/upgrade/rename