mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-26 09:21:56 +00:00
Malf AI update
This commit is contained in:
@@ -55,6 +55,7 @@ var/list/ai_verbs_default = list(
|
||||
var/ioncheck[1]
|
||||
var/lawchannel = "Common" // Default channel on which to state laws
|
||||
var/icon/holo_icon//Default is assigned when AI is created.
|
||||
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
|
||||
var/obj/item/device/pda/ai/aiPDA = null
|
||||
var/obj/item/device/multitool/aiMulti = null
|
||||
var/custom_sprite = 0 //For our custom sprites
|
||||
@@ -66,9 +67,10 @@ var/list/ai_verbs_default = list(
|
||||
var/processing_time = 100
|
||||
var/list/datum/AI_Module/current_modules = list()
|
||||
var/fire_res_on_core = 0
|
||||
|
||||
var/can_dominate_mechs = 0
|
||||
var/control_disabled = 0 // Set to 1 to stop AI from interacting via Click() -- TLE
|
||||
var/malfhacking = 0 // More or less a copy of the above var, so that malf AIs can hack and still get new cyborgs -- NeoFite
|
||||
var/malf_cooldown = 0 //Cooldown var for malf modules
|
||||
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
@@ -533,6 +535,14 @@ var/list/ai_verbs_default = list(
|
||||
botcall()
|
||||
return
|
||||
|
||||
if (href_list["ai_take_control"]) //Mech domination
|
||||
var/obj/mecha/M = locate(href_list["ai_take_control"])
|
||||
if(controlled_mech)
|
||||
src << "You are already loaded into an onboard computer!"
|
||||
return
|
||||
if(M)
|
||||
M.transfer_ai(AI_MECH_HACK,src, usr) //Called om the mech itself.
|
||||
|
||||
else if (href_list["faketrack"])
|
||||
var/mob/target = locate(href_list["track"]) in mob_list
|
||||
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
|
||||
@@ -980,6 +990,24 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
/mob/living/silicon/ai/proc/is_in_chassis()
|
||||
return istype(loc, /turf)
|
||||
|
||||
/mob/living/silicon/ai/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
|
||||
if(!..())
|
||||
return
|
||||
if(interaction == AI_TRANS_TO_CARD)//The only possible interaction. Upload AI mob to a card.
|
||||
if(!mind)
|
||||
user << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
|
||||
return
|
||||
if (mind.special_role == "malfunction") //AI MALF!!
|
||||
user << "<span class='boldannounce'>ERROR</span>: Remote transfer interface disabled."//Do ho ho ho~
|
||||
return
|
||||
new /obj/structure/AIcore/deactivated(loc)//Spawns a deactivated terminal at AI location.
|
||||
aiRestorePowerRoutine = 0//So the AI initially has power.
|
||||
control_disabled = 1//Can't control things remotely if you're stuck in a card!
|
||||
aiRadio.disabledAi = 1 //No talking on the built-in radio for you either!
|
||||
loc = card//Throw AI into the card.
|
||||
src << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
user << "<span class='boldnotice'>Transfer successful</span>: [name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
#undef AI_CHECK_WIRELESS
|
||||
#undef AI_CHECK_RADIO
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
loc = T.loc
|
||||
if (istype(loc, /area))
|
||||
//stage = 4
|
||||
if (!loc.power_equip && !istype(src.loc,/obj/item))
|
||||
if (!loc.power_equip && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
|
||||
//stage = 5
|
||||
blind = 1
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
src.see_in_dark = 0
|
||||
src.see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if (((!loc.power_equip) || istype(T, /turf/space)) && !istype(src.loc,/obj/item))
|
||||
if (((!loc.power_equip) || istype(T, /turf/space)) && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
|
||||
if (src:aiRestorePowerRoutine==0)
|
||||
src:aiRestorePowerRoutine = 1
|
||||
|
||||
|
||||
@@ -191,8 +191,6 @@
|
||||
|
||||
if(world.time < move_delay) return
|
||||
|
||||
if(isAI(mob)) return AIMove(n,direct,mob)
|
||||
|
||||
if(!isliving(mob)) return mob.Move(n,direct)
|
||||
|
||||
if(moving) return 0
|
||||
@@ -211,10 +209,6 @@
|
||||
var/mob/spirit/currentSpirit = mob
|
||||
return currentSpirit.Spirit_Move(direct)
|
||||
|
||||
// handle possible AI movement
|
||||
if(isAI(mob))
|
||||
return AIMove(n,direct,mob)
|
||||
|
||||
if(mob.notransform) return//This is sota the goto stop mobs from moving var
|
||||
|
||||
if(isliving(mob))
|
||||
@@ -235,6 +229,9 @@
|
||||
if(mob.remote_control) //we're controlling something, our movement is relayed to it
|
||||
return mob.remote_control.relaymove(mob, direct)
|
||||
|
||||
if(isAI(mob))
|
||||
return AIMove(n,direct,mob)
|
||||
|
||||
if(!mob.canmove)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user