Added an option to allow an intelicarded AI to interact with electronic devices. This currently reaches anywhere the AI can see, the range might get toned down.

The little yellow light on the intelicard turns green when the AI is allowed to interact with things.

Removed the malfunction timer, as apparently it makes it too hard on the AI. This will likely get replaced with something different (and more IC) later.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@136 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-09-21 21:16:08 +00:00
parent 6ed8d50dab
commit 53904b1c40
5 changed files with 31 additions and 10 deletions
+14 -4
View File
@@ -174,13 +174,17 @@
return DblClick()
/atom/DblClick() //TODO: DEFERRED: REWRITE
// world << "checking if this shit gets called at all"
if (world.time <= usr:lastDblClick+2)
//world << "BLOCKED atom.DblClick() on [src] by [usr] : src.type is [src.type]"
// world << "BLOCKED atom.DblClick() on [src] by [usr] : src.type is [src.type]"
return
else
//world << "atom.DblClick() on [src] by [usr] : src.type is [src.type]"
// world << "atom.DblClick() on [src] by [usr] : src.type is [src.type]"
usr:lastDblClick = world.time
if (istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
if (ai.control_disabled)
return
..()
@@ -205,7 +209,12 @@
return
if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) ))))))
return
if (istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
if (ai.control_disabled)
return
else
return
var/t5 = in_range(src, usr) || src.loc == usr
@@ -218,6 +227,7 @@
if (istype(src, /datum/organ) && src in usr.contents)
return
// world << "according to dblclick(), t5 is [t5]"
if (((t5 || (W && (W.flags & 16))) && !( istype(src, /obj/screen) )))
if (usr.next_move < world.time)
usr.prev_move = usr.next_move
@@ -76,8 +76,8 @@
/datum/game_mode/malfunction/process()
AI_win_timeleft--
if(AI_win_timeleft == 1200) // Was 1790
malf_mode_declared = 1
// if(AI_win_timeleft == 1200) // Was 1790
// malf_mode_declared = 1
check_win()
/datum/game_mode/malfunction/check_win()
+12 -1
View File
@@ -40,6 +40,7 @@
M.icon_state = "ai"
src.icon_state = "aicard"
src.name = "inteliCard"
src.overlays = null
return
else
if (M.real_name != "Inactive AI")
@@ -92,6 +93,16 @@
src.attack_self(usr)
sleep(10)
if (href_list["wireless"])
for(var/mob/living/silicon/ai/A in src)
A.control_disabled = !A.control_disabled
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
if (A.control_disabled)
src.overlays -= image('pda.dmi', "aicard-on")
else
src.overlays += image('pda.dmi', "aicard-on")
src.attack_self(usr)
attack_self(mob/user)
user.machine = src
@@ -121,7 +132,7 @@
if (A.stat == 2)
dat += "<b>AI nonfunctional</b>"
else
dat += {"<A href='byond://?src=\ref[src];wipe=1'>Wipe AI</A>"}
dat += {"<A href='byond://?src=\ref[src];wipe=1'>Wipe AI</A> <A href='byond://?src=\ref[src];wireless=1'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</A>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
return
@@ -150,9 +150,9 @@
stat(null, "Intent: [src.a_intent]")
stat(null, "Move Mode: [src.m_intent]")
if(ticker.mode.name == "AI malfunction")
if(ticker.mode:malf_mode_declared)
stat(null, "Time left: [ ticker.mode:AI_win_timeleft]")
// if(ticker.mode.name == "AI malfunction")
// if(ticker.mode:malf_mode_declared)
// stat(null, "Time left: [ ticker.mode:AI_win_timeleft]")
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB