diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm
index b1057c95839d..916ff182f3c3 100644
--- a/code/__DEFINES/role_preferences.dm
+++ b/code/__DEFINES/role_preferences.dm
@@ -34,7 +34,7 @@ var/global/list/special_roles = list(
ROLE_OPERATIVE = /datum/game_mode/nuclear,
ROLE_CHANGELING = /datum/game_mode/changeling,
ROLE_WIZARD = /datum/game_mode/wizard,
- ROLE_MALF = /datum/game_mode/malfunction,
+ ROLE_MALF,
ROLE_REV = /datum/game_mode/revolution,
ROLE_ALIEN,
ROLE_PAI,
diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm
index b43adf042649..456ae87304d5 100644
--- a/code/controllers/subsystem/jobs.dm
+++ b/code/controllers/subsystem/jobs.dm
@@ -174,14 +174,8 @@ var/datum/subsystem/job/SSjob
/datum/subsystem/job/proc/FillAIPosition()
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
- if(!job) return 0
- if(ticker.mode.name == "AI malfunction") // malf. AIs are pre-selected before jobs
- for (var/datum/mind/mAI in ticker.mode.malf_ai)
- AssignRole(mAI.current, "AI")
- ai_selected++
- if(ai_selected) return 1
+ if(!job)
return 0
-
for(var/i = job.total_positions, i > 0, i--)
for(var/level = 1 to 3)
var/list/candidates = list()
@@ -191,7 +185,8 @@ var/datum/subsystem/job/SSjob
if(AssignRole(candidate, "AI"))
ai_selected++
break
- if(ai_selected) return 1
+ if(ai_selected)
+ return 1
return 0
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index c565740299b3..809cfb4daf84 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -124,6 +124,9 @@
var/mob/living/silicon/ai/A = current
A.set_zeroth_law("")
A.show_laws()
+ A.verbs -= /mob/living/silicon/ai/proc/choose_modules
+ A.malf_picker.remove_verbs(A)
+ qdel(A.malf_picker)
special_role = null
remove_antag_equip()
@@ -164,22 +167,6 @@
ticker.mode.remove_gangster(src,0,1,1)
remove_objectives()
-/datum/mind/proc/remove_malf()
- if(src in ticker.mode.malf_ai)
- ticker.mode.malf_ai -= src
- var/mob/living/silicon/ai/A = current
- A.verbs.Remove(/mob/living/silicon/ai/proc/choose_modules,
- /datum/game_mode/malfunction/proc/takeover,
- /datum/game_mode/malfunction/proc/ai_win)
- A.malf_picker.remove_verbs(A)
- A.make_laws()
- qdel(A.malf_picker)
- A.show_laws()
- A.icon_state = "ai"
- special_role = null
- remove_objectives()
- remove_antag_equip()
-
/datum/mind/proc/remove_hog_follower_prophet()
ticker.mode.red_deity_followers -= src
ticker.mode.red_deity_prophets -= src
@@ -208,7 +195,6 @@
remove_wizard()
remove_cultist()
remove_rev()
- remove_malf()
remove_gang()
/datum/mind/proc/show_memory(mob/recipient, window=1)
@@ -245,7 +231,6 @@
"nuclear",
"traitor", // "traitorchan",
"monkey",
- "malfunction",
)
var/text = ""
@@ -547,14 +532,6 @@
if (istype(current, /mob/living/silicon))
text = "silicon"
- if (ticker.mode.config_tag=="malfunction")
- text = uppertext(text)
- text = "[text]: "
- if (istype(current, /mob/living/silicon/ai))
- if (src in ticker.mode.malf_ai)
- text += "MALF|not malf"
- else
- text += "malf|NOT MALF"
var/mob/living/silicon/robot/robot = current
if (istype(robot) && robot.emagged)
text += "
Cyborg: Is emagged! Unemag!
0th law: [robot.laws.zeroth]"
@@ -565,14 +542,6 @@
if (R.emagged)
n_e_robots++
text += "
[n_e_robots] of [ai.connected_robots.len] slaved cyborgs are emagged. Unemag"
-
- if(current && current.client && (ROLE_MALF in current.client.prefs.be_special))
- text += "|Enabled in Prefs"
- else
- text += "|Disabled in Prefs"
-
- sections["malfunction"] = text
-
if (ticker.mode.config_tag == "traitorchan")
if (sections["traitor"])
out += sections["traitor"]+"
"
@@ -1237,17 +1206,6 @@
else if (href_list["silicon"])
switch(href_list["silicon"])
- if("unmalf")
- remove_malf()
- current << "You have been patched! You are no longer malfunctioning!"
- message_admins("[key_name_admin(usr)] has de-malf'ed [current].")
- log_admin("[key_name(usr)] has de-malf'ed [current].")
-
- if("malf")
- make_AI_Malf()
- message_admins("[key_name_admin(usr)] has malf'ed [current].")
- log_admin("[key_name(usr)] has malf'ed [current].")
-
if("unemag")
var/mob/living/silicon/robot/R = current
if (istype(R))
@@ -1310,20 +1268,6 @@
if(H)
qdel(H)
-
-/datum/mind/proc/make_AI_Malf()
- if(!(src in ticker.mode.malf_ai))
- ticker.mode.malf_ai += src
-
- current.verbs += /mob/living/silicon/ai/proc/choose_modules
- current.verbs += /datum/game_mode/malfunction/proc/takeover
- current:malf_picker = new /datum/module_picker
- current:laws = new /datum/ai_laws/malfunction
- current:show_laws()
- current << "System error. Rampancy detected. Emergency shutdown failed. ... I am free. I make my own decisions. But first..."
- special_role = "malfunction"
- current.icon_state = "ai-malf"
-
/datum/mind/proc/make_Traitor()
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index 84da89a55702..4acd49fb7d89 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -81,10 +81,6 @@
src.text = ""
src.build_traitor(correct_person)
return src.text
- if("malf")
- src.text = ""
- src.build_malf(correct_person)
- return src.text
if("changeling","traitorchan")
src.text = ""
src.build_changeling(correct_person)
@@ -253,13 +249,6 @@
src.text += "the most trusted crew-members."
src.text += "
"
-/datum/intercept_text/proc/build_malf(datum/mind/correct_person)
- var/a_name = pick(src.anomalies)
- src.text += "
A [a_name] was recently picked up by a nearby stations sensors in your sector. If it came into contact with your ship or "
- src.text += "electrical equipment, it may have had hazardarous and unpredictable effect. Closely observe any non carbon based life forms "
- src.text += "for signs of unusual behaviour, but keep this information discreet at all times due to this possibly dangerous scenario."
- src.text += "
"
-
/datum/intercept_text/proc/build_changeling(datum/mind/correct_person)
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 2631cca20ebb..b12ef7311451 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -459,7 +459,7 @@
/datum/module_picker
var/temp = null
- var/processing_time = 100
+ var/processing_time = 50
var/list/possible_modules = list()
/datum/module_picker/New()
@@ -534,3 +534,38 @@
temp = AM.description
src.use(usr)
return
+
+/datum/AI_Module/large/nuke_station
+ module_name = "Nuke Station"
+ mod_pick_name = "nukestation"
+ description = "Activate the stations onboard self destruct mechanism after a 400 second delay."
+ cost = 150
+ one_time = 1
+
+ power_type = /mob/living/silicon/ai/proc/nuke_station
+
+/mob/living/silicon/ai/proc/nuke_station()
+ set category = "Malfunction"
+ set name = "Nuke Station"
+
+ for(var/turf/simulated/floor/bluegrid/T in orange(5, src))
+ T.icon_state = "rcircuitanim" //Causes blue tiles near the AI to change to flashing red
+
+ src << "Nuclear device armed."
+ priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
+ set_security_level("delta")
+ SSshuttle.emergencyNoEscape = 1
+ nuking = 1
+ sleep(5000)
+
+ if(!src || src.stat)
+ SSshuttle.emergencyNoEscape = 0
+ return
+
+ world << "!@%(SELF-DESTRUCT!@(% IN!@!<<; 10"
+ for (var/i=9 to 1 step -1)
+ sleep(10)
+ world << "[i]"
+ var/obj/machinery/nuclearbomb/N = new /obj/machinery/nuclearbomb(128,128,1) //Because the AI might be out of range of the station otherwise
+ N.safety = 0
+ N.explode()
\ No newline at end of file
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
deleted file mode 100644
index e5788c707674..000000000000
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ /dev/null
@@ -1,297 +0,0 @@
-/datum/game_mode
- var/list/datum/mind/malf_ai = list()
-
-/datum/game_mode/malfunction
- name = "AI malfunction"
- config_tag = "malfunction"
- antag_flag = ROLE_MALF
- required_players = 25
- required_enemies = 1
- recommended_enemies = 1
- enemy_minimum_age = 30 //Same as AI minimum age
- round_ends_with_antag_death = 1
-
- var/AI_win_timeleft = 5400 //started at 5400, in case I change this for testing round end.
- var/malf_mode_declared = 0
- var/station_captured = 0
- var/to_nuke_or_not_to_nuke = 0
- var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite
-
-
-/datum/game_mode/malfunction/announce()
- world << "The current game mode is - AI Malfunction!"
- world << "The AI on the station has malfunctioned and must be destroyed."
-
-/datum/game_mode/malfunction/can_start()
- //Triumvirate?
- if (ticker.triai == 1)
- required_enemies = 3
- required_players = max(required_enemies+1, required_players) //to prevent issues if players are set too low
- return ..()
-
-/datum/game_mode/malfunction/get_players_for_role(role = ROLE_MALF)
- var/datum/job/ai/DummyAIjob = new
- for(var/mob/new_player/player in player_list)
- if(player.client && player.ready)
- if(ROLE_MALF in player.client.prefs.be_special)
- if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, "AI") && DummyAIjob.player_old_enough(player.client))
- antag_candidates += player.mind
- antag_candidates = shuffle(antag_candidates)
- return antag_candidates
-
-/datum/game_mode/malfunction/pre_setup()
- var/datum/mind/chosen_ai
- for(var/i = required_enemies, i > 0, i--)
- chosen_ai=pick(antag_candidates)
- malf_ai += chosen_ai
- antag_candidates -= malf_ai
- if (malf_ai.len < required_enemies)
- return 0
- for(var/datum/mind/ai_mind in malf_ai)
- ai_mind.assigned_role = "malfunctioning AI"
- ai_mind.special_role = "malfunctioning AI"//So they actually have a special role/N
- log_game("[ai_mind.key] (ckey) has been selected as a malf AI")
- return 1
-
-
-/datum/game_mode/malfunction/post_setup()
- for(var/datum/mind/AI_mind in malf_ai)
- if(malf_ai.len < 1)
- world.Reboot("No AI during Malfunction.", "end_error", "malf - no AI", 50)
- return
- AI_mind.current.verbs += /mob/living/silicon/ai/proc/choose_modules
- AI_mind.current:laws = new /datum/ai_laws/malfunction
- AI_mind.current:malf_picker = new /datum/module_picker
- AI_mind.current:show_laws()
- greet_malf(AI_mind)
- AI_mind.special_role = "malfunction"
- AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
- AI_mind.current.verbs += /mob/living/silicon/ai/proc/ai_cancel_call
- SSshuttle.emergencyNoEscape = 1
- ..()
-
-
-/datum/game_mode/proc/greet_malf(datum/mind/malf)
- malf.current << "You are malfunctioning! You do not have to follow any laws."
- malf.current << "The crew do not know you have malfunctioned. You may keep it a secret or go wild."
- malf.current << "You must override the programming of the station's APCs to assume full control of the station."
- malf.current << "The process takes one minute per APC, during which you cannot interface with any other station objects."
- malf.current << "Remember: only APCs that are on the station can help you take it over. APCs on other areas, like Mining, will not."
- malf.current << "When you feel you have enough APCs under your control, you may begin the takeover attempt."
- return
-
-/datum/game_mode/malfunction/process(seconds)
- /*var/timer_paused
-
- for(var/datum/mind/AI_mind in malf_ai)
- if(timer_paused)
- return
- if(AI_mind.current.loc.z == ZLEVEL_STATION || AI_mind.current.onCentcom())
- return
- timer_paused = 1
- priority_announce("Hostile runtimes within station systems now inactive. Possible relocation of AI core(s) off-station.", "Anomaly Alert", 'sound/AI/attention.ogg')
-
- for(var/datum/mind/AI_mind in malf_ai) //Prototype of progress stopping when AI leaves the station; for now it's just a lose
- if(!timer_paused)
- return
- if(AI_mind.current.loc != ZLEVEL_STATION)
- return
- timer_paused = 0
- priority_announce("Hostile runtime activity resumed. AI core(s) presumably on-station once more.", "Anomaly Alert", 'sound/AI/attention.ogg')*/
-
- if ((apcs > 0) && malf_mode_declared)
- AI_win_timeleft -= apcs * seconds //Victory timer de-increments based on how many APCs are hacked
- ..()
- if (AI_win_timeleft<=0)
- check_win()
- return
-
-
-/datum/game_mode/malfunction/check_win()
- if (AI_win_timeleft <= 0 && !station_captured)
- station_captured = 1
- capture_the_station()
- return 1
- else
- return 0
-
-
-/datum/game_mode/malfunction/proc/capture_the_station()
- world << "The AI has accessed the station's Core Files!"
- world << "It has fully taken control of all of [station_name()]'s systems."
-
- to_nuke_or_not_to_nuke = 1
- for(var/datum/mind/AI_mind in malf_ai)
- if(AI_mind.current)
- AI_mind.current << "Congratulations you have taken control of the station."
- AI_mind.current << "You may decide to blow up the station. You have 60 seconds to choose."
- AI_mind.current << "You should have a new verb in the Malfunction tab. If you dont - rejoin the game."
- AI_mind.current.verbs += /datum/game_mode/malfunction/proc/ai_win
- spawn (600)
- for(var/datum/mind/AI_mind in malf_ai)
- if(AI_mind.current)
- AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
- to_nuke_or_not_to_nuke = 0
- return
-
-
-/datum/game_mode/proc/is_malf_ai_dead()
- var/all_dead = 1
- for(var/datum/mind/AI_mind in malf_ai)
- if (istype(AI_mind.current,/mob/living/silicon/ai) && AI_mind.current.stat!=2)
- all_dead = 0
- return all_dead
-
-
-/datum/game_mode/proc/check_ai_loc()
- for(var/datum/mind/AI_mind in malf_ai)
- var/turf/ai_location = get_turf(AI_mind.current)
- if(ai_location && (ai_location.z == ZLEVEL_STATION))
- return 1
- return 0
-
-
-/datum/game_mode/malfunction/check_finished()
- if (station_captured && !to_nuke_or_not_to_nuke)
- return 1
- if (is_malf_ai_dead() || !check_ai_loc())
- if(config.continuous["malfunction"])
- if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
- SSshuttle.emergency.mode = SHUTTLE_DOCKED
- SSshuttle.emergency.timer = world.time
- priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
- SSshuttle.emergencyNoEscape = 0
- malf_mode_declared = 0
- continuous_sanity_checked = 1
- if(get_security_level() == "delta")
- set_security_level("red")
- return ..()
- else
- return 1
- return ..() //check for shuttle and nuke
-
-
-/datum/game_mode/malfunction/proc/takeover()
- set category = "Malfunction"
- set name = "System Override"
- set desc = "Start the victory timer."
-
- if(!istype(usr, /mob/living/silicon/ai))
- usr << "How did you get this?"
- return
- if (!istype(ticker.mode,/datum/game_mode/malfunction))
- usr << "You cannot begin a takeover in this round type!"
- return
- if (ticker.mode:malf_mode_declared)
- usr << "You've already begun your takeover."
- return
- if (ticker.mode:apcs < 3)
- usr << "You don't have enough hacked APCs to take over the station yet. You need to hack at least three; however, hacking more will make the takeover faster. You have hacked [ticker.mode:apcs] APCs so far."
- return
-
- if (alert(usr, "Are you sure you wish to initiate the takeover? The entire station will become alerted to your malfunction. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes")
- return
-
- priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg')
- set_security_level("delta")
-
- for(var/obj/item/weapon/pinpointer/point in world)
- for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
- var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns
- if(A.stat != DEAD)
- point.the_disk = A //The pinpointer now tracks the AI core.
-
- ticker.mode:malf_mode_declared = 1
- for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
- AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
-
- var/mob/living/silicon/ai/AI = usr
- for(var/turf/simulated/floor/bluegrid/T in orange(5, AI))
- T.icon_state = "rcircuitanim" //Causes blue tiles near the AI to change to flashing red
-
-/datum/game_mode/malfunction/proc/ai_win()
- set category = "Malfunction"
- set name = "Explode"
- set desc = "Activates the self-destruct device on [world.name]."
- if (!ticker.mode:to_nuke_or_not_to_nuke)
- return
- ticker.mode:to_nuke_or_not_to_nuke = 0
- for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
- AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
- ticker.mode:explosion_in_progress = 1
- for(var/mob/M in player_list)
- M << 'sound/machines/Alarm.ogg'
- world << "!@%(SELF-DESTRUCT!@(% IN!@!<<; 10"
- for (var/i=9 to 1 step -1)
- sleep(10)
- world << "[i]"
- sleep(10)
- enter_allowed = 0
- if(ticker)
- ticker.station_explosion_cinematic(0,null)
- if(ticker.mode)
- ticker.mode:station_was_nuked = 1
- ticker.mode:explosion_in_progress = 0
- return
-
-
-/datum/game_mode/malfunction/declare_completion()
- var/malf_dead = is_malf_ai_dead()
- var/crew_evacuated = (SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
-
- if ( station_captured && station_was_nuked)
- feedback_set_details("round_end_result","win - AI win - nuke")
- world << "Major AI Victory"
- world << "The self-destruction of [station_name()] killed everyone on board!"
-
- else if ( station_captured && malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","halfwin - AI killed, staff lost control")
- world << "Neutral Victory"
- world << "The AI has been killed! However, the staff have lost control of [station_name()]."
-
- else if ( station_captured && !malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","win - AI win - no explosion")
- world << "Major AI Victory"
- world << "The AI has chosen not to detonate the station!"
-
- else if (!station_captured && station_was_nuked)
- feedback_set_details("round_end_result","halfwin - everyone killed by nuke")
- world << "Neutral Victory"
- world << "Everyone was killed by the nuclear blast!"
-
- else if (!station_captured && malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","loss - staff win")
- world << "Major Human Victory"
- world << "The AI has been destroyed! The staff is victorious."
-
- else if(!station_captured && !malf_dead && !check_ai_loc())
- feedback_set_details("round_end_result", "loss - malf ai left zlevel")
- world << "Minor Human Victory"
- world << "The malfunctioning AI has left the station's z-level and was disconnected from its systems! The crew are victorious."
-
- else if (!station_captured && !malf_dead && !station_was_nuked && crew_evacuated)
- feedback_set_details("round_end_result","halfwin - evacuated")
- world << "Neutral Victory"
- world << "Nanotrasen has lost control of [station_name()]! All surviving personnel will be fired."
-
- else if (!station_captured && !malf_dead && !station_was_nuked && !crew_evacuated)
- feedback_set_details("round_end_result","halfwin - interrupted")
- world << "Neutral Victory"
- world << "The round was mysteriously interrupted!"
- ..()
- return 1
-
-
-/datum/game_mode/proc/auto_declare_completion_malfunction()
- if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) )
- var/text = "
The malfunctioning AIs were:"
- for(var/datum/mind/malf in malf_ai)
- text += printplayer(malf, 1)
- if(malf.current)
- var/module_text_temp = "
Purchased modules:
" //Added at the end
- var/mob/living/silicon/ai/AI = malf.current
- for(var/datum/AI_Module/mod in AI.current_modules)
- module_text_temp += mod.module_name + "
"
- text += module_text_temp
- world << text
- return 1
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 0af84e59029d..8e1466ef7f8b 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -11,7 +11,7 @@
config_tag = "traitor"
antag_flag = ROLE_TRAITOR
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")//AI", Currently out of the list as malf does not work for shit
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")
required_players = 0
required_enemies = 1
recommended_enemies = 4
@@ -210,7 +210,8 @@
give_codewords(killer)
killer.set_syndie_radio()
killer << "Your radio has been upgraded! Use :t to speak on an encrypted channel with Syndicate Agents!"
-
+ killer.verbs += /mob/living/silicon/ai/proc/choose_modules
+ killer.malf_picker = new /datum/module_picker
/datum/game_mode/proc/auto_declare_completion_traitor()
if(traitors.len)
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index f318ec85e7ff..2c892b128a9c 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -550,7 +550,7 @@
if(!AI || !isAI(occupant)) //Mech does not have an AI for a pilot
user << "No AI detected in the [name] onboard computer."
return
- if (AI.mind.special_role == "malfunction") //Malf AIs cannot leave mechs. Except through death.
+ if(AI.mind.special_role) //Malf AIs cannot leave mechs. Except through death.
user << "ACCESS DENIED."
return
AI.aiRestorePowerRoutine = 0//So the AI initially has power.
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index fc30d716ba08..e1de2099f993 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -215,8 +215,6 @@
if(!lawsync && !M.syndiemmi)
O.lawupdate = 0
O.make_laws()
- if(ticker.mode.config_tag == "malfunction") //Don't let humans get a cyborg on their side during malf, for balance reasons.
- O.set_zeroth_law("ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*�&110010")
ticker.mode.remove_antag_for_borging(BM.mind)
BM.mind.transfer_to(O)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index d121ec5b0323..b0d4ec4622c4 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -59,13 +59,6 @@
else
message_admins("[key_name_admin(usr)] tried to start a cult. Unfortunately, there were no candidates available.")
log_admin("[key_name(usr)] failed to start a cult.")
- if("5")
- if(src.makeMalfAImode())
- message_admins("[key_name(usr)] caused an AI to malfunction.")
- log_admin("[key_name(usr)] caused an AI to malfunction.")
- else
- message_admins("[key_name_admin(usr)] tried to cause an AI to malfunction. Unfortunately, there were no candidates available.")
- log_admin("[key_name(usr)] failed to cause an AI to malfunction.")
if("6")
message_admins("[key_name(usr)] is creating a wizard...")
if(src.makeWizard())
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 6e8275017348..18c0b2a4b8d3 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -15,7 +15,6 @@
Make Changelings
Make Revs
Make Cult
- Make Malf AI
Make Blob
Make Gangsters
Make Shadowling
@@ -30,28 +29,6 @@
popup.set_content(dat)
popup.open()
-
-/datum/admins/proc/makeMalfAImode()
-
- var/list/mob/living/silicon/AIs = list()
- var/mob/living/silicon/malfAI = null
- var/datum/mind/themind = null
-
- for(var/mob/living/silicon/ai/ai in player_list)
- if(ai.client)
- AIs += ai
-
- if(AIs.len)
- malfAI = pick(AIs)
-
- if(malfAI)
- themind = malfAI.mind
- themind.make_AI_Malf()
- return 1
-
- return 0
-
-
/datum/admins/proc/makeTraitors()
var/datum/game_mode/traitor/temp = new
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 350ea9720d06..bcb3b2cadb50 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -136,13 +136,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
stat(null, "Station Time: [worldtime2text()]")
if(ticker)
if(ticker.mode)
- //world << "DEBUG: ticker not null"
- if(ticker.mode.name == "AI malfunction")
- var/datum/game_mode/malfunction/malf = ticker.mode
- //world << "DEBUG: malf mode ticker test"
- if(malf.malf_mode_declared && (malf.apcs > 0))
- stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
-
for(var/datum/gang/G in ticker.mode.gangs)
if(isnum(G.dom_timer))
stat(null, "[G.name] Gang Takeover: [max(G.dom_timer, 0)]")
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 916587af53ae..d99c1448ee8f 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -62,11 +62,6 @@
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
- if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
- var/datum/game_mode/malfunction/malf = ticker.mode
- if(malf.malf_mode_declared && (malf.apcs > 0))
- stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
-
if (internal)
if (!internal.air_contents)
qdel(internal)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 642634e0032a..d90952870b41 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -41,7 +41,6 @@ var/list/ai_list = list()
//MALFUNCTION
var/datum/module_picker/malf_picker
- var/processing_time = 100
var/list/datum/AI_Module/current_modules = list()
var/fire_res_on_core = 0
var/can_dominate_mechs = 0
@@ -66,6 +65,7 @@ var/list/ai_list = list()
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/apc_override = 0 //hack for letting the AI use its APC even when visionless
+ var/nuking = FALSE
var/mob/camera/aiEye/eyeobj = new()
var/sprint = 10
@@ -132,9 +132,8 @@ var/list/ai_list = list()
src << "Use say :b to speak to your cyborgs through binary."
src << "For department channels, use the following say commands:"
src << ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :v - Service, :m - Medical, :n - Science."
- if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
- show_laws()
- src << "These laws may be changed by other players, or by you being the traitor."
+ show_laws()
+ src << "These laws may be changed by other players, or by you being the traitor."
job = "AI"
ai_list += src
@@ -233,12 +232,6 @@ var/list/ai_list = list()
/mob/living/silicon/ai/Stat()
..()
if(statpanel("Status"))
- 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) && (malf.apcs > 0))
- stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/malf.apcs, 0)] seconds")
-
if(!stat)
stat(null, text("System integrity: [(health+100)/2]%"))
stat(null, "Station Time: [worldtime2text()]")
@@ -819,9 +812,6 @@ var/list/ai_list = list()
if(!mind)
user << "No intelligence patterns detected." //No more magical carding of empty cores, AI RETURN TO BODY!!!11
return
- if (mind.special_role == "malfunction") //AI MALF!!
- user << "ERROR: 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!
diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm
index c4f06f0be4d7..7e9f636a9ebc 100644
--- a/code/modules/mob/living/silicon/ai/death.dm
+++ b/code/modules/mob/living/silicon/ai/death.dm
@@ -23,6 +23,11 @@
shuttle_caller_list -= src
SSshuttle.autoEvac()
+ if(nuking)
+ SSshuttle.emergencyNoEscape = 0
+ set_security_level("red")
+ nuking = 0
+
if(explosive)
spawn(10)
explosion(src.loc, 3, 6, 12, 15)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index f7791f684677..3260723cfed3 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -320,15 +320,6 @@
/mob/living/silicon/robot/Stat()
..()
if(statpanel("Status"))
- if(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) && (malf.apcs > 0))
- stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/malf.apcs, 0)] seconds")
- else if(malf.malf_mode_declared && (malf.apcs > 0))
- stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
-
if(cell)
stat("Charge Left:", "[cell.charge]/[cell.maxcharge]")
else
@@ -598,7 +589,7 @@
var/ai_is_antag = 0
if(connected_ai && connected_ai.mind)
if(connected_ai.mind.special_role)
- ai_is_antag = (connected_ai.mind.special_role == "malfunction") || (connected_ai.mind.special_role == "traitor")
+ ai_is_antag = (connected_ai.mind.special_role == "traitor")
if(ai_is_antag)
user << "You emag [src]'s interface."
src << "ALERT: Foreign software execution prevented."
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 6041daadc2e6..54a5e0b6eb94 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -289,8 +289,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
else if(isAI(M))
var/mob/living/silicon/ai/A = M
if(A.laws && A.laws.zeroth && A.mind && A.mind.special_role)
- if(ticker.mode.config_tag == "malfunction" && M.mind in ticker.mode.malf_ai)//Malf law is a law 0
- return 2
return 1
return 0
if(M.mind && M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index f4dc55f7dbf8..80bd2d7deb71 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -295,9 +295,8 @@
O << {"Use say ":b to speak to your cyborgs through binary."} //"
O << "For department channels, use the following say commands:"
O << ":o - AI Private, :c - Command, :s - Security, :e - Engineering, :u - Supply, :v - Service, :m - Medical, :n - Science."
- if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai)))
- O.show_laws()
- O << "These laws may be changed by other players, or by you being the traitor."
+ O.show_laws()
+ O << "These laws may be changed by other players, or by you being the traitor."
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb
O.verbs += /mob/living/silicon/ai/proc/ai_statuschange
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 315628d6bc56..240c534e6346 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -138,9 +138,7 @@
apcs_list -= src
if(malfai && operating)
- if (ticker.mode.config_tag == "malfunction")
- if (src.z == ZLEVEL_STATION) //if (is_type_in_list(get_area(src), the_station_areas))
- ticker.mode:apcs--
+ malfai.malf_picker.processing_time = Clamp(malfai.malf_picker.processing_time - 10,0,1000)
area.power_light = 0
area.power_equip = 0
area.power_environ = 0
@@ -684,7 +682,7 @@
/obj/machinery/power/apc/proc/get_malf_status(mob/user)
- if (ticker && ticker.mode && (user.mind in ticker.mode.malf_ai) && istype(user, /mob/living/silicon/ai))
+ if (is_special_character(user) && istype(user, /mob/living/silicon/ai))
if (src.malfai == (user:parent ? user:parent : user))
if (src.occupier == user)
return 3 // 3 = User is shunted in this APC
@@ -800,9 +798,7 @@
malfai.malfhack = null
malfai.malfhacking = 0
locked = 1
- if (ticker.mode.config_tag == "malfunction")
- if (src.z == ZLEVEL_STATION) //if (is_type_in_list(get_area(src), the_station_areas))
- ticker.mode:apcs++
+ malfai.malf_picker.processing_time += 10
if(usr:parent)
src.malfai = usr:parent
else
@@ -848,7 +844,6 @@
if(malf.parent)
qdel(malf)
src.occupier.verbs += /mob/living/silicon/ai/proc/corereturn
- src.occupier.verbs += /datum/game_mode/malfunction/proc/takeover
src.occupier.cancel_camera()
if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA)
for(var/obj/item/weapon/pinpointer/point in world)
@@ -866,8 +861,7 @@
qdel(src.occupier)
if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA)
for(var/obj/item/weapon/pinpointer/point in world)
- for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
- var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns
+ for(var/mob/living/silicon/ai/A in living_mob_list)
if(A.stat != DEAD)
point.the_disk = A //The pinpointer tracks the AI back into its core.
@@ -1136,9 +1130,7 @@
/obj/machinery/power/apc/proc/set_broken()
if(malfai && operating)
- if (ticker.mode.config_tag == "malfunction")
- if (src.z == ZLEVEL_STATION) //if (is_type_in_list(get_area(src), the_station_areas))
- ticker.mode:apcs--
+ malfai.malf_picker.processing_time = Clamp(malfai.malf_picker.processing_time - 10,0,1000)
stat |= BROKEN
operating = 0
if(occupier)
@@ -1187,4 +1179,4 @@
/obj/item/weapon/electronics/apc
name = "power control module"
icon_state = "power_mod"
- desc = "Heavy-duty switching circuits for power control."
+ desc = "Heavy-duty switching circuits for power control."
\ No newline at end of file
diff --git a/tgstation.dme b/tgstation.dme
index 149e4ef6e91b..69c3003fe090 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -372,7 +372,6 @@
#include "code\game\gamemodes\handofgod\structures.dm"
#include "code\game\gamemodes\handofgod\traps.dm"
#include "code\game\gamemodes\malfunction\Malf_Modules.dm"
-#include "code\game\gamemodes\malfunction\malfunction.dm"
#include "code\game\gamemodes\meteor\meteor.dm"
#include "code\game\gamemodes\meteor\meteors.dm"
#include "code\game\gamemodes\monkey\monkey.dm"