mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
@@ -112,6 +112,7 @@
|
||||
var/scanning = 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach(obj/mecha/M)
|
||||
|
||||
@@ -663,9 +663,11 @@
|
||||
AI.ai_restore_power()//So the AI initially has power.
|
||||
AI.control_disabled = 1
|
||||
AI.radio_enabled = 0
|
||||
AI.disconnect_shell()
|
||||
RemoveActions(AI, TRUE)
|
||||
occupant = null
|
||||
AI.forceMove(card)
|
||||
card.AI = AI
|
||||
occupant = null
|
||||
AI.controlled_mech = null
|
||||
AI.remote_control = null
|
||||
icon_state = initial(icon_state)+"-open"
|
||||
@@ -686,10 +688,12 @@
|
||||
if(!AI)
|
||||
to_chat(user, "<span class='warning'>There is no AI currently installed on this device.</span>")
|
||||
return
|
||||
else if(AI.stat || !AI.client)
|
||||
if(AI.deployed_shell) //Recall AI if shelled so it can be checked for a client
|
||||
AI.disconnect_shell()
|
||||
if(AI.stat || !AI.client)
|
||||
to_chat(user, "<span class='warning'>[AI.name] is currently unresponsive, and cannot be uploaded.</span>")
|
||||
return
|
||||
else if(occupant || dna_lock) //Normal AIs cannot steal mechs!
|
||||
if(occupant || dna_lock) //Normal AIs cannot steal mechs!
|
||||
to_chat(user, "<span class='warning'>Access denied. [name] is [occupant ? "currently occupied" : "secured with a DNA lock"].")
|
||||
return
|
||||
AI.control_disabled = 0
|
||||
@@ -715,7 +719,10 @@
|
||||
to_chat(AI, "[AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" \
|
||||
: "<span class='notice'>You have been uploaded to a mech's onboard computer."]")
|
||||
to_chat(AI, "<span class='reallybig boldnotice'>Use Middle-Mouse to activate mech functions and equipment. Click normally for AI interactions.</span>")
|
||||
GrantActions(AI, !AI.can_dominate_mechs)
|
||||
if(interaction == AI_TRANS_FROM_CARD)
|
||||
GrantActions(AI, FALSE) //No eject/return to core action for AI uploaded by card
|
||||
else
|
||||
GrantActions(AI, !AI.can_dominate_mechs)
|
||||
|
||||
|
||||
//An actual AI (simple_animal mecha pilot) entering the mech
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
var/obj/mecha/chassis
|
||||
|
||||
/datum/action/innate/mecha/Grant(mob/living/L, obj/mecha/M)
|
||||
chassis = M
|
||||
if(M)
|
||||
chassis = M
|
||||
..()
|
||||
|
||||
/datum/action/innate/mecha/Destroy()
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
return 0
|
||||
var/obj/mecha/M = src.loc
|
||||
var/cell_charge = M.get_charge()
|
||||
var/answer = {"<b>Name:</b> [M.name]<br>
|
||||
<b>Integrity:</b> [M.obj_integrity/M.max_integrity*100]%<br>
|
||||
<b>Cell charge:</b> [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"]<br>
|
||||
<b>Airtank:</b> [M.return_pressure()]kPa<br>
|
||||
<b>Pilot:</b> [M.occupant||"None"]<br>
|
||||
<b>Location:</b> [get_area(M)||"Unknown"]<br>
|
||||
<b>Active equipment:</b> [M.selected||"None"]<br>"}
|
||||
var/answer = {"<b>Name:</b> [M.name]
|
||||
<b>Integrity:</b> [M.obj_integrity/M.max_integrity*100]%
|
||||
<b>Cell charge:</b> [isnull(cell_charge)?"Not found":"[M.cell.percent()]%"]
|
||||
<b>Airtank:</b> [M.return_pressure()]kPa
|
||||
<b>Pilot:</b> [M.occupant||"None"]
|
||||
<b>Location:</b> [get_area(M)||"Unknown"]
|
||||
<b>Active equipment:</b> [M.selected||"None"] "}
|
||||
if(istype(M, /obj/mecha/working/ripley))
|
||||
var/obj/mecha/working/ripley/RM = M
|
||||
answer += "<b>Used cargo space:</b> [RM.cargo.len/RM.cargo_capacity*100]%<br>"
|
||||
|
||||
Reference in New Issue
Block a user