Skip to content

Commit

Permalink
Added a decoy AI that spawns in the AI core chamber on Malfunction ro…
Browse files Browse the repository at this point in the history
…unds, to reduce metagaming.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@39 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
[email protected] committed Sep 1, 2010
1 parent 42b972c commit c9c2f3c
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
6 changes: 6 additions & 0 deletions code/defines/mob/living/silicon/decoy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/mob/living/silicon/decoy
name = "AI"
voice_name = "synthesized voice"
icon = 'mob.dmi'//
icon_state = "ai"
anchored = 1 // -- TLE
2 changes: 2 additions & 0 deletions code/game/gamemodes/malfunction/malfunction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
6 changes: 5 additions & 1 deletion code/game/objects/devices/aicard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 9 additions & 0 deletions code/modules/mob/living/silicon/decoy/death.dm
Original file line number Diff line number Diff line change
@@ -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)
Empty file.
14 changes: 14 additions & 0 deletions code/modules/mob/living/silicon/decoy/life.dm
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions code/modules/mob/transform_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c9c2f3c

Please sign in to comment.