mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Malf AI Rework
This commit is contained in:
@@ -226,13 +226,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
statpanel("Status")
|
||||
if(client.statpanel == "Status")
|
||||
show_stat_station_time()
|
||||
if(ticker)
|
||||
if(ticker.mode)
|
||||
// to_chat(world, "DEBUG: ticker not null")
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
// to_chat(world, "DEBUG: malf mode ticker test")
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
show_stat_emergency_shuttle_eta()
|
||||
|
||||
/mob/dead/observer/verb/reenter_corpse()
|
||||
|
||||
@@ -249,10 +249,6 @@
|
||||
|
||||
show_stat_station_time()
|
||||
|
||||
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
|
||||
if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
|
||||
show_stat_emergency_shuttle_eta()
|
||||
|
||||
if(client.statpanel == "Status")
|
||||
|
||||
@@ -60,9 +60,10 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
//MALFUNCTION
|
||||
var/datum/module_picker/malf_picker
|
||||
var/processing_time = 100
|
||||
var/list/datum/AI_Module/current_modules = list()
|
||||
var/can_dominate_mechs = 0
|
||||
var/shunted = 0 //1 if the AI is currently shunted. Used to differentiate between shunted and ghosted/braindead
|
||||
|
||||
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
|
||||
@@ -70,7 +71,6 @@ var/list/ai_verbs_default = list(
|
||||
var/obj/machinery/power/apc/malfhack = null
|
||||
var/explosive = 0 //does the AI explode when it dies?
|
||||
|
||||
|
||||
var/mob/living/silicon/ai/parent = null
|
||||
var/camera_light_on = 0
|
||||
var/list/obj/machinery/camera/lit_cameras = list()
|
||||
@@ -84,6 +84,8 @@ var/list/ai_verbs_default = list(
|
||||
var/mob/living/simple_animal/bot/Bot
|
||||
var/turf/waypoint //Holds the turf of the currently selected waypoint.
|
||||
var/waypoint_mode = 0 //Waypoint mode is for selecting a turf via clicking.
|
||||
var/nuking = 0
|
||||
var/obj/machinery/doomsday_device/doomsday_device
|
||||
|
||||
var/obj/machinery/hologram/holopad/holo = null
|
||||
var/mob/camera/aiEye/eyeobj = new()
|
||||
@@ -219,9 +221,8 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
to_chat(src, radio_text)
|
||||
|
||||
if(!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
|
||||
show_laws()
|
||||
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
|
||||
show_laws()
|
||||
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
|
||||
|
||||
job = "AI"
|
||||
|
||||
@@ -246,6 +247,7 @@ var/list/ai_verbs_default = list(
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
qdel(eyeobj) // No AI, no Eye
|
||||
malfhack = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -336,16 +338,6 @@ var/list/ai_verbs_default = list(
|
||||
// to_chat(usr, "You can only change your display once!")
|
||||
//return
|
||||
|
||||
|
||||
// displays the malf_ai information if the AI is the malf
|
||||
/mob/living/silicon/ai/show_malf_ai()
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for(var/datum/mind/malfai in malf.malf_ai)
|
||||
if(mind == malfai) // are we the evil one?
|
||||
if(malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
|
||||
// this verb lets the ai see the stations manifest
|
||||
/mob/living/silicon/ai/proc/ai_roster()
|
||||
set name = "Show Crew Manifest"
|
||||
@@ -957,6 +949,10 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
to_chat(src, "Camera lights activated.")
|
||||
|
||||
/mob/living/silicon/ai/proc/set_syndie_radio()
|
||||
if(aiRadio)
|
||||
aiRadio.make_syndie()
|
||||
|
||||
/mob/living/silicon/ai/proc/sensor_mode()
|
||||
set name = "Set Sensor Augmentation"
|
||||
set desc = "Augment visual feed with internal sensor overlays."
|
||||
@@ -1102,11 +1098,6 @@ var/list/ai_verbs_default = list(
|
||||
if(interaction == AI_TRANS_TO_CARD)//The only possible interaction. Upload AI mob to a card.
|
||||
if(!mind)
|
||||
to_chat(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 == SPECIAL_ROLE_MALF) //AI MALF!!
|
||||
to_chat(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.
|
||||
@@ -1147,4 +1138,33 @@ var/list/ai_verbs_default = list(
|
||||
rendered = "<i><span class='game say'>Relayed Speech: <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span></i>"
|
||||
else
|
||||
rendered = "<i><span class='game say'>Relayed Speech: <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span></i>"
|
||||
show_message(rendered, 2)
|
||||
show_message(rendered, 2)
|
||||
|
||||
/mob/living/silicon/ai/proc/malfhacked(obj/machinery/power/apc/apc)
|
||||
malfhack = null
|
||||
malfhacking = 0
|
||||
clear_alert("hackingapc")
|
||||
|
||||
if(!istype(apc) || qdeleted(apc) || apc.stat & BROKEN)
|
||||
to_chat(src, "<span class='danger'>Hack aborted. The designated APC no longer exists on the power network.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
else if(apc.aidisabled)
|
||||
to_chat(src, "<span class='danger'>Hack aborted. [apc] is no longer responding to our systems.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
else
|
||||
malf_picker.processing_time += 10
|
||||
|
||||
apc.malfai = parent || src
|
||||
apc.malfhack = TRUE
|
||||
apc.locked = TRUE
|
||||
|
||||
playsound(get_turf(src), 'sound/machines/ding.ogg', 50, 1)
|
||||
to_chat(src, "Hack complete. [apc] is now under your exclusive control.")
|
||||
apc.update_icon()
|
||||
|
||||
/mob/living/silicon/ai/proc/add_malf_picker()
|
||||
to_chat(src, "In the top right corner of the screen you will find the Malfunctions tab, where you can purchase various abilities, from upgraded surveillance to station ending doomsday devices.")
|
||||
to_chat(src, "You are also capable of hacking APCs, which grants you more points to spend on your Malfunction powers. The drawback is that a hacked APC will give you away if spotted by the crew. Hacking an APC takes 60 seconds.")
|
||||
view_core() //A BYOND bug requires you to be viewing your core before your verbs update
|
||||
verbs += /mob/living/silicon/ai/proc/choose_modules
|
||||
malf_picker = new /datum/module_picker
|
||||
@@ -14,6 +14,21 @@
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
|
||||
if(nuking)
|
||||
set_security_level("red")
|
||||
nuking = 0
|
||||
for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
|
||||
point.the_disk = null //Point back to the disk.
|
||||
|
||||
if(doomsday_device)
|
||||
doomsday_device.timing = 0
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
|
||||
qdel(doomsday_device)
|
||||
|
||||
if(explosive)
|
||||
spawn(10)
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
msg += "It looks slightly charred.\n"
|
||||
else
|
||||
msg += "<B>Its casing is melted and heat-warped!</B>\n"
|
||||
|
||||
if(src.stat == UNCONSCIOUS)
|
||||
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
|
||||
if(!shunted && !client)
|
||||
msg += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
|
||||
@@ -15,10 +15,6 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
set category = "OOC"
|
||||
set desc = "Wipe your core. This is functionally equivalent to cryo or robotic storage, freeing up your job slot."
|
||||
|
||||
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
|
||||
to_chat(usr, "<span class='danger'>You cannot use this verb in malfunction. If you need to leave, please adminhelp.</span>")
|
||||
return
|
||||
|
||||
// Guard against misclicks, this isn't the sort of thing we want happening accidentally
|
||||
if(alert("WARNING: This will immediately wipe your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?",
|
||||
"Wipe Core", "No", "No", "Yes") != "Yes")
|
||||
|
||||
@@ -507,20 +507,6 @@ var/list/robot_verbs_default = list(
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// this function shows information about the malf_ai gameplay type in the status screen
|
||||
/mob/living/silicon/robot/show_malf_ai()
|
||||
..()
|
||||
if(ticker && ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for(var/datum/mind/malfai in malf.malf_ai)
|
||||
if(connected_ai)
|
||||
if(connected_ai.mind == malfai)
|
||||
if(malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
else if(ticker.mode:malf_mode_declared)
|
||||
stat(null, "Time left: [max(ticker.mode:AI_win_timeleft/(ticker.mode:apcs/3), 0)]")
|
||||
return 0
|
||||
|
||||
// this function displays the cyborgs current cell charge in the stat panel
|
||||
/mob/living/silicon/robot/proc/show_cell_power()
|
||||
if(cell)
|
||||
|
||||
@@ -143,18 +143,12 @@
|
||||
stat(null, text("Systems nonfunctional"))
|
||||
|
||||
|
||||
// This is a pure virtual function, it should be overwritten by all subclasses
|
||||
/mob/living/silicon/proc/show_malf_ai()
|
||||
return 0
|
||||
|
||||
|
||||
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
|
||||
/mob/living/silicon/Stat()
|
||||
if(statpanel("Status"))
|
||||
show_stat_station_time()
|
||||
show_stat_emergency_shuttle_eta()
|
||||
show_system_integrity()
|
||||
show_malf_ai()
|
||||
..()
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
@@ -56,7 +56,6 @@ proc/isNonCrewAntag(A)
|
||||
SPECIAL_ROLE_CHANGELING,
|
||||
SPECIAL_ROLE_ERT,
|
||||
SPECIAL_ROLE_HEAD_REV,
|
||||
SPECIAL_ROLE_MALF,
|
||||
SPECIAL_ROLE_REV,
|
||||
SPECIAL_ROLE_SHADOWLING,
|
||||
SPECIAL_ROLE_SHADOWLING_THRALL,
|
||||
|
||||
Reference in New Issue
Block a user