#Beta: added code phrases for traitors which consist of the code phrase and the code response (which consist of a sequence of words). They are meant to flow into a regular conversation in the sequence provided. There is also a small chance that a traitor may not know either phrase or response, or both.

For an example, let's say the phrase is: culture, wine, admit. The response is: massive, tired, doctor's delight. A traitor may begin a conversation with something like: "A man of culture always drinks wine, I must admit. What do you think?" The response to that: "When I am massively tired, I drink doctor's delight. Otherwise, I abstain." The example is best referenced in the Bar, or any place where drinks are available. With enough creativity and linguistical acumen, it may be used elsewhere.
The point here is to make conversation seem as natural as possible while providing traitors a means to recognize each other. The words do no have to be exact, either. Quarter Master may be QM and the Captain may be Cap'n. Traitors should still recognize what is being communicated--or not.
#Deactivated AI cores are no longer mobs. This is mostly cosmetic. You cannot gib a deactivated AI since it will be an object, not a mob. It will also not announce arrivals since it's an object, not a mob (this is an improvement, in my opinion).
#Some code tweaks to AIs. They will now auto-start with a random name instead of their default-chosen name (which is still changeable).
#Intelicards should no longer constantly refresh the window when they are being wiped.

#Added new mech sprite.

#Resin walls should no longer delete the person inside when killed in certain ways. Hulks will easily break free from resin if placed inside.
#Ninjas can now download the AI onto spiderOS, provided Drain is on. SpiderOS works with AI cores, AI cards, and restoration terminals. Make sure Drain is on when you click on either the object (core/terminal) or the suit (aicard). AIs with law zero may get to have some fun, depending on circumstances.
#Toggle Drain renamed to Toggle Interaction. It now serves as general trigger for special ninja interactions.
#Added energy net power to ninjas. Prototype for HerpA and whatever he may want to do with it but it's pretty much finished. The energy net can be destroyed by the person trapped (or others) and will teleport them to the prison after 30 seconds.
#Ninjas can now slice cameras apart per request.

#Added a few more type checking procs (isliving, islarva, isobserver, ishivemainframe).
#Mobs that are anchored will no longer be able to move (AIs will still move as normal). You will also not be able to grab them.
#Incorporeal Move now works properly for regular mobs once more.
#Marauders from CentCom can now launch directly from their bay. Start the shuttle and wait on a mass driver. On that note, mechs can now go through portals and launch through mass drivers.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1558 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-05-09 09:45:56 +00:00
parent 6b3ff55761
commit ab87c76da1
35 changed files with 9737 additions and 7789 deletions
+13 -13
View File
@@ -11,33 +11,33 @@
emote("deathgasp") //let the world KNOW WE ARE DEAD
//For ninjas exploding when they die./N
if (istype(src.wear_suit, /obj/item/clothing/suit/space/space_ninja)&&src.wear_suit:initialize)
var/location = src.loc
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:initialize)
var/location = loc
explosion(location, 1, 2, 3, 4)
//src.flags = 0
//reagents.handle_reactions() //No magic stomach for corpses.
src.canmove = 0
canmove = 0
if(src.client)
src.blind.layer = 0
src.lying = 1
lying = 1
var/h = src.hand
src.hand = 0
hand = 0
drop_item()
src.hand = 1
hand = 1
drop_item()
src.hand = h
if (istype(src.wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank))
var/obj/item/clothing/suit/armor/a_i_a_ptank/A = src.wear_suit
bombers += "[src.key] has detonated a suicide bomb. Temp = [A.part4.air_contents.temperature-T0C]."
hand = h
if (istype(wear_suit, /obj/item/clothing/suit/armor/a_i_a_ptank))
var/obj/item/clothing/suit/armor/a_i_a_ptank/A = wear_suit
bombers += "[key] has detonated a suicide bomb. Temp = [A.part4.air_contents.temperature-T0C]."
// world << "Detected that [src.key] is wearing a bomb" debug stuff
if(A.status && prob(90))
// world << "Bomb has ignited?"
A.part4.ignite()
if (src.client)
if (client)
spawn(10)
if(src.client && src.stat == 2)
src.verbs += /mob/proc/ghostize
if(client && src.stat == 2)
verbs += /mob/proc/ghostize
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
if(mind)
+45 -32
View File
@@ -1,47 +1,52 @@
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B)
src.anchored = 1
src.canmove = 0
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
PickName
name = pick(ai_names)
for (var/mob/living/silicon/ai/A in world)
if (A.real_name == name)
goto PickName//It'll get stuck in an infinite loop if all default names are chosen but that's... a remote possibility.
real_name = name
anchored = 1
canmove = 0
src.loc = loc
if(L)
if (istype(L, /datum/ai_laws))
src.laws_object = L
laws_object = L
else
src.laws_object = new /datum/ai_laws/asimov
laws_object = new /datum/ai_laws/asimov
src.verbs += /mob/living/silicon/ai/proc/show_laws_verb
verbs += /mob/living/silicon/ai/proc/show_laws_verb
if (istype(loc, /turf))
src.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
src.verbs += /mob/living/silicon/ai/proc/ai_camera_track
src.verbs += /mob/living/silicon/ai/proc/ai_camera_list
verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
verbs += /mob/living/silicon/ai/proc/ai_camera_track
verbs += /mob/living/silicon/ai/proc/ai_camera_list
//Added ai_network_change by Mord_Sith
src.verbs += /mob/living/silicon/ai/proc/ai_network_change
src.verbs += /mob/living/silicon/ai/proc/lockdown
src.verbs += /mob/living/silicon/ai/proc/disablelockdown
src.verbs += /mob/living/silicon/ai/proc/ai_statuschange
if (!B)
src.name = "Inactive AI"
src.real_name = "Inactive AI"
src.icon_state = "ai-empty"
else
if (B.brain.brainmob.mind)
B.brain.brainmob.mind.transfer_to(src)
verbs += /mob/living/silicon/ai/proc/ai_network_change
verbs += /mob/living/silicon/ai/proc/lockdown
verbs += /mob/living/silicon/ai/proc/disablelockdown
verbs += /mob/living/silicon/ai/proc/ai_statuschange
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
new/obj/AIcore/deactivated(loc)//New empty terminal.
del(src)//Delete AI.
return
else
if (B.brain.brainmob.mind)
B.brain.brainmob.mind.transfer_to(src)
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
src << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
src << "To use something, simply double-click it."
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
src << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
src << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
src << "To use something, simply double-click it."
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
src.show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
src.job = "AI"
spawn(0)
ainame(src)
src.show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
src.job = "AI"
spawn(0)
ainame(src)
/mob/living/silicon/ai/Stat()
..()
@@ -278,6 +283,14 @@
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
/mob/living/silicon/ai/attack_hand(mob/living/carbon/M as mob)
if(ishuman(M))//Checks to see if they are ninja
if(istype(M:gloves, /obj/item/clothing/gloves/space_ninja)&&M:gloves:candrain&&!M:gloves:draining)
if(M:wear_suit:control)
M:wear_suit:aicard.attack(src,M)
else
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
return
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
+129 -92
View File
@@ -28,6 +28,11 @@
return 1
return 0
/proc/islarva(A)
if(istype(A, /mob/living/carbon/alien/larva))
return 1
return 0
/proc/ismonkey(A)
if(A && istype(A, /mob/living/carbon/monkey))
return 1
@@ -43,6 +48,11 @@
return 1
return 0
/proc/ishivemainframe(A)
if(A && istype(A, /mob/living/silicon/hive_mainframe))
return 1
return 0
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
@@ -58,6 +68,16 @@
return 1
return 0
/proc/isliving(A)
if(istype(A, /mob/living))
return 1
return 0
proc/isobserver(A)
if(istype(A, /mob/dead/observer))
return 1
return 0
/proc/hsl2rgb(h, s, l)
return
@@ -306,6 +326,8 @@
return null
/obj/item/weapon/grab/proc/synch()
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
del(src)
if (src.assailant.r_hand == src)
src.hud1.screen_loc = ui_rhand
else
@@ -1655,72 +1677,87 @@
return
/client/Move(n, direct)
if(src.mob.control_object) // Hacking in something to control objects -- TLE
if(src.mob.control_object.density)
step(src.mob.control_object,direct)
src.mob.control_object.dir = direct
if(mob.control_object) // Hacking in something to control objects -- TLE
if(mob.control_object.density)
step(mob.control_object,direct)
mob.control_object.dir = direct
else
src.mob.control_object.loc = get_step(src.mob.control_object,direct)
if(istype(src.mob, /mob/dead/observer))
return src.mob.Move(n,direct)
if (src.moving)
mob.control_object.loc = get_step(mob.control_object,direct)
if(isobserver(mob))
return mob.Move(n,direct)
if (moving)
return 0
if (world.time < src.move_delay)
if (world.time < move_delay)
return
if (!( src.mob ))
if (!( mob ))
return
if (src.mob.stat==2)
if (mob.stat==2)
return
if (mob.incorporeal_move)//For Ninja crazy porting powers. Moves either 1 or 2 tiles.
var/turf/mobloc = get_turf(mob.loc)
if(prob(50))
var/locx
var/locy
switch(direct)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+2)
if(locy>world.maxy)
return
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-2)
if(locy<1)
return
if(EAST)
locy = mobloc.y
locx = (mobloc.x+2)
if(locx>world.maxx)
return
if(WEST)
locy = mobloc.y
locx = (mobloc.x-2)
if(locx<1)
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,'mob.dmi',mob,"shadow")
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,'mob.dmi',mob,"shadow")
mob.loc = get_step(mob, direct)
mob.dir = direct
return
if(istype(src.mob, /mob/living/silicon/ai))
//This breaks AI hologram movement but that was never finished anyway.
if(isAI(mob))
return AIMove(n,direct,src.mob)
if(istype(src.mob, /mob/living/silicon/hive_mainframe))
return MainframeMove(n,direct,src.mob)
if (src.mob.monkeyizing)
if(ishivemainframe(mob))
return MainframeMove(n,direct,mob)
if(mob.anchored)/*If mob is not AI and is anchored. This means most anchored mobs will not be able to move.
This is a fix for ninja energy_net to where mobs can not move but can still act to destroy it.
If needed, this should be changed in the appropriate manner. I think the only time you would need to anchor a mob
is when they are not meant to move.*/
return
var/is_monkey = istype(src.mob, /mob/living/carbon/monkey)
if (mob.incorporeal_move)
var/turf/mobloc = get_turf(mob.loc)
switch(mob.incorporeal_move)//1 is for all mobs. 2 is for ninjas only.
if(1)
mob.loc = get_step(mob, direct)
mob.dir = direct
if(2)
//For Ninja crazy porting powers. Moves either 1 or 2 tiles.
if(prob(50))
var/locx
var/locy
switch(direct)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+2)
if(locy>world.maxy)
return
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-2)
if(locy<1)
return
if(EAST)
locy = mobloc.y
locx = (mobloc.x+2)
if(locx>world.maxx)
return
if(WEST)
locy = mobloc.y
locx = (mobloc.x-2)
if(locx<1)
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,'mob.dmi',mob,"shadow")
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,'mob.dmi',mob,"shadow")
mob.loc = get_step(mob, direct)
mob.dir = direct
return
if (mob.monkeyizing)
return
var/is_monkey = ismonkey(mob)
if (locate(/obj/item/weapon/grab, locate(/obj/item/weapon/grab, src.mob.grabbed_by.len)))
var/list/grabbing = list( )
if (istype(src.mob.l_hand, /obj/item/weapon/grab))
@@ -1749,20 +1786,20 @@
del(G)
else
return
if (src.mob.canmove)
if (mob.canmove)
if(src.mob.m_intent == "face")
src.mob.dir = direct
if(mob.m_intent == "face")
mob.dir = direct
var/j_pack = 0
if ((istype(src.mob.loc, /turf/space)))
if (!( src.mob.restrained() ))
if ((istype(mob.loc, /turf/space)))
if (!( mob.restrained() ))
if (!( (locate(/obj/grille) in oview(1, src.mob)) || (locate(/turf/simulated) in oview(1, src.mob)) || (locate(/obj/lattice) in oview(1, src.mob)) ))
if (istype(src.mob.back, /obj/item/weapon/tank/jetpack))
var/obj/item/weapon/tank/jetpack/J = src.mob.back
j_pack = J.allow_thrust(0.01, src.mob)
if(j_pack)
src.mob.inertia_dir = 0
mob.inertia_dir = 0
if (!( j_pack ))
return 0
else
@@ -1771,51 +1808,51 @@
return 0
if (isturf(src.mob.loc))
src.move_delay = world.time
if (isturf(mob.loc))
move_delay = world.time
if ((j_pack && j_pack < 1))
src.move_delay += 5
switch(src.mob.m_intent)
move_delay += 5
switch(mob.m_intent)
if("run")
if (src.mob.drowsyness > 0)
src.move_delay += 6
src.move_delay += 1
if (mob.drowsyness > 0)
move_delay += 6
move_delay += 1
if("face")
src.mob.dir = direct
mob.dir = direct
return
if("walk")
src.move_delay += 7
move_delay += 7
src.move_delay += src.mob.movement_delay()
move_delay += mob.movement_delay()
if (src.mob.restrained())
if (mob.restrained())
for(var/mob/M in range(src.mob, 1))
if (((M.pulling == src.mob && (!( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, src.mob.grabbed_by.len)))
if (((M.pulling == mob && (!( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, src.mob.grabbed_by.len)))
src << "\blue You're restrained! You can't move!"
return 0
src.moving = 1
moving = 1
if (locate(/obj/item/weapon/grab, src.mob))
src.move_delay = max(src.move_delay, world.time + 7)
var/list/L = src.mob.ret_grab()
move_delay = max(move_delay, world.time + 7)
var/list/L = mob.ret_grab()
if (istype(L, /list))
if (L.len == 2)
L -= src.mob
L -= mob
var/mob/M = L[1]
if ((get_dist(src.mob, M) <= 1 || M.loc == src.mob.loc))
var/turf/T = src.mob.loc
if ((get_dist(mob, M) <= 1 || M.loc == mob.loc))
var/turf/T = mob.loc
. = ..()
if (isturf(M.loc))
var/diag = get_dir(src.mob, M)
var/diag = get_dir(mob, M)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(src.mob, M) > 1 || diag))
if ((get_dist(mob, M) > 1 || diag))
step(M, get_dir(M.loc, T))
else
for(var/mob/M in L)
M.other_mobs = 1
if (src.mob != M)
if (mob != M)
M.animate_movement = 3
for(var/mob/M in L)
spawn( 0 )
@@ -1826,17 +1863,17 @@
M.animate_movement = 2
return
else
if(src.mob.confused)
step(src.mob, pick(cardinal))
if(mob.confused)
step(mob, pick(cardinal))
else
. = ..()
src.moving = null
moving = null
return .
else
if (isobj(src.mob.loc) || ismob(src.mob.loc))
var/atom/O = src.mob.loc
if (src.mob.canmove)
return O.relaymove(src.mob, direct)
if (isobj(mob.loc) || ismob(mob.loc))
var/atom/O = mob.loc
if (mob.canmove)
return O.relaymove(mob, direct)
else
return
return
+2 -1
View File
@@ -86,6 +86,7 @@ mob/new_player
src << browse_rsc('sos_10.png')
src << browse_rsc('sos_11.png')
src << browse_rsc('sos_12.png')
src << browse_rsc('sos_13.png')
//End PDA Resource Initialisation =====================================================>
@@ -281,7 +282,7 @@ mob/new_player
if (ticker.current_state == GAME_STATE_PLAYING)
var/list/mob/living/silicon/ai/ailist = list()
for (var/mob/living/silicon/ai/A in world)
if (!A.stat && A.name != "Inactive AI")
if (!A.stat)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
+3 -11
View File
@@ -70,16 +70,11 @@
/mob/proc/AIize()
src.client.screen.len = null
var/mob/living/silicon/ai/O = new /mob/living/silicon/ai( src.loc )
O.icon_state = "ai"
client.screen.len = null
var/mob/living/silicon/ai/O = new /mob/living/silicon/ai(loc, /datum/ai_laws/asimov,,1)//No MMI but safety is in effect.
O.invisibility = 0
O.canmove = 0
O.name = src.name
O.real_name = src.real_name
O.anchored = 1
O.aiRestorePowerRoutine = 0
O.lastKnownIP = src.client.address
O.lastKnownIP = client.address
mind.transfer_to(O)
O.mind.original = O
@@ -113,8 +108,6 @@
O << "To use something, simply double-click it."
O << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
O.laws_object = new /datum/ai_laws/asimov
O.show_laws()
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
@@ -151,7 +144,6 @@
spawn(50)
world << sound('newAI.ogg')
del(src)
return O