mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Added a decoy AI that spawns in the AI core chamber on Malfunction rounds, to reduce metagaming.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@39 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
6
code/defines/mob/living/silicon/decoy.dm
Normal file
6
code/defines/mob/living/silicon/decoy.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
/mob/living/silicon/decoy
|
||||
name = "AI"
|
||||
voice_name = "synthesized voice"
|
||||
icon = 'mob.dmi'//
|
||||
icon_state = "ai"
|
||||
anchored = 1 // -- TLE
|
||||
@@ -22,6 +22,8 @@
|
||||
for (var/mob/living/silicon/ai/aiplayer in world)
|
||||
malf_ai += aiplayer.mind
|
||||
|
||||
|
||||
|
||||
/*if(malf_ai.len < 1)
|
||||
world << "Uh oh, its malfunction and there is no AI! Please report this."
|
||||
world << "Rebooting world in 5 seconds."
|
||||
|
||||
@@ -52,4 +52,8 @@
|
||||
M.icon_state = "ai-crash"
|
||||
src.icon_state = "aicard-full"
|
||||
O << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
user << "<b>Transfer succeeded</b>: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
user << "<b>Transfer succeeded</b>: [O.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
|
||||
M.death()
|
||||
user << "<b>ERROR ERROR ERROR</b>"
|
||||
9
code/modules/mob/living/silicon/decoy/death.dm
Normal file
9
code/modules/mob/living/silicon/decoy/death.dm
Normal file
@@ -0,0 +1,9 @@
|
||||
/mob/living/silicon/decoy/death(gibbed)
|
||||
src.icon_state = "ai-crash"
|
||||
spawn(rand(10, 30))
|
||||
explosion(src.loc, 3, 6, 12, 15)
|
||||
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
O.mode = 2
|
||||
return ..(gibbed)
|
||||
0
code/modules/mob/living/silicon/decoy/decoy.dm
Normal file
0
code/modules/mob/living/silicon/decoy/decoy.dm
Normal file
14
code/modules/mob/living/silicon/decoy/life.dm
Normal file
14
code/modules/mob/living/silicon/decoy/life.dm
Normal file
@@ -0,0 +1,14 @@
|
||||
/mob/living/silicon/decoy/Life()
|
||||
if (src.stat == 2)
|
||||
return
|
||||
else
|
||||
if (src.health <= -100.0)
|
||||
death()
|
||||
return
|
||||
|
||||
/mob/living/silicon/decoy/updatehealth()
|
||||
if (src.nodamage == 0)
|
||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
@@ -108,6 +108,7 @@
|
||||
O:malf_picker = new /datum/game_mode/malfunction/AI_Module/module_picker
|
||||
O.show_laws()
|
||||
O << "<b>Kill all.</b>"
|
||||
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
|
||||
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb
|
||||
O.verbs += /mob/living/silicon/ai/proc/ai_camera_track
|
||||
@@ -135,6 +136,11 @@
|
||||
O.name = newname
|
||||
|
||||
world << text("<b>[O.real_name] is the AI!</b>")
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
for (var/obj/landmark/start/A in world)
|
||||
if (A.name == "AI")
|
||||
var/mob/living/silicon/decoy/D = new /mob/living/silicon/decoy(A.loc)
|
||||
D.name = O.name
|
||||
del(src)
|
||||
|
||||
return O
|
||||
|
||||
Reference in New Issue
Block a user