#Finished the respawn_character proc. Use it to quickly bring a player back into the game with their previous character if they were gibbed/deleted. If you want them to make a new character, kick them out and let them rejoin. Can also be used to quickly enter the game by admins and the like. It's fairly robust so you can read the code to find out what it does (and does not).

#Added a locked list to datacore in order to track character spawn, particularly for respawn_character(). May be useful in the future.
#Added a proc to randomize appearance for any human mob, randomize_appearance_for(mob). It will not take into account gender as you will have to provide it. Names and so on are also randomized but that can be overwritten in the code following.
#Added AI holopads around the station. To use as the AI: click on the pad to center view on it. Click again to activate the hologram. Move it with the directional keys. You can still interact with objects normally. To remove it, either move it too far out or click the pad again. Use robot talk to directly speak through the holopad (and only the holopad, unlike regular robot speak). Could be added on to (like different images for different AIs) but it's basically finished.
#Fixed a bugged message on changeling transformation sting. It will no longer give away your identity.
#Made law datum a silicon define. var/datum/ai_laws/laws.
#A few more ninja adjustments. Added a new view mode for the ninja mask, allowing to see special roles and a few other things.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1608 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-05-22 23:48:29 +00:00
parent a9d2227518
commit e68ce8721f
56 changed files with 10456 additions and 10815 deletions
-1
View File
@@ -9,7 +9,6 @@
var/obj/machinery/camera/current = null
var/list/connected_robots = list()
var/aiRestorePowerRoutine = 0
var/datum/ai_laws/laws_object = null
//var/list/laws = list()
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list())
var/viewalerts = 0
@@ -1,9 +0,0 @@
/mob/living/silicon/aihologram
name = "AI hologram projection"
voice_name = "synthesized voice"
icon = 'mob.dmi'//
icon_state = "ai-holo"
density = 0
incorporeal_move = 1
var/mob/living/silicon/ai/parent_ai = null
var/datum/ai_laws/ailaws = null
-3
View File
@@ -18,7 +18,6 @@
var/obj/screen/inv2 = null
var/obj/screen/inv3 = null
//3 Modules can be activated at any one time.
var/obj/item/weapon/robot_module/module = null
var/module_active = null
@@ -26,7 +25,6 @@
var/module_state_2 = null
var/module_state_3 = null
var/obj/item/device/radio/radio = null
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/weapon/cell/cell = null
@@ -53,6 +51,5 @@
var/killswitch_time = 60
var/weapon_lock = 0
var/weaponlock_time = 120
var/datum/ai_laws/laws = null //Making it so borgs can have laws when there isn't an AI.
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
var/lockcharge //Used when locking down a borg to preserve cell charge
+2 -1
View File
@@ -1,4 +1,5 @@
/mob/living/silicon
gender = NEUTER
robot_talk_understand = 1
var/syndicate = 0
var/syndicate = 0
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
+7 -7
View File
@@ -27,8 +27,8 @@
// var/list/obj/hallucination/hallucinations = list() - Not used at all - Skie
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when they are in fact needed as such.
The current method unnecessarily clusters up the variable list, especially for humans.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).
I'll make some notes on where certain variable defines should probably go.
Changing this around would probably require a good look-over the pre-existing code.
*/
@@ -102,11 +102,11 @@
var/m_intent = "run"//Living
var/lastDblClick = 0
var/lastKnownIP = null
var/obj/stool/buckled = null//Living, unless you can buckle silicons.
var/obj/item/weapon/handcuffs/handcuffed = null//Living, unless you can cuff silicons.
var/obj/stool/buckled = null//Living
var/obj/item/weapon/handcuffs/handcuffed = null//Living
var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null//Human
var/obj/item/weapon/back = null//Human/Monkey
var/obj/item/weapon/tank/internal = null//Human/Monkey
var/obj/item/weapon/storage/s_active = null//Carbon
var/obj/item/clothing/mask/wear_mask = null//Carbon
@@ -114,11 +114,11 @@
var/r_ch_cou = 0
var/r_Tourette = 0//Carbon
var/cloneloss = 0//Carbon
var/seer = 0 //for cult//Carbon
var/seer = 0 //for cult//Carbon, probably Human
var/miming = null //checks if the guy is a mime//Human
var/silent = null //Can't talk. Value goes down every life proc.//Human
var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment//Human
var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment
var/obj/hud/hud_used = null
+5 -3
View File
@@ -148,9 +148,11 @@
/obj/datacore
name = "datacore"
var/list/medical = list( )
var/list/general = list( )
var/list/security = list( )
var/medical[] = list()
var/general[] = list()
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
/obj/equip_e
name = "equip e"
+1 -1
View File
@@ -82,7 +82,7 @@
name = "gas mask"
desc = "A close-fitting mask that can filter some environmental toxins or be connected to an air supply."
icon_state = "gas_mask"
var/mode = 1// 1=Night Vision |2=Thermal |3=Meson
var/mode = 0// 0==Scouter | 1==Night Vision | 2==Thermal | 3==Meson
var/voice = "Unknown"
var/vchange = 0//This didn't do anything before. It now checks if the mask has special functions/N
+1 -1
View File
@@ -33,7 +33,7 @@
/obj/item/clothing/shoes/space_ninja
name = "ninja shoes"
desc = "A pair of running shoes, excellent for running and even better for smashing skulls."
desc = "A pair of running shoes. Excellent for running and even better for smashing skulls."
icon_state = "s-ninja"
slowdown = 0
protective_temperature = 700
+19 -11
View File
@@ -386,7 +386,7 @@
item_state = "void"
desc = "A high tech, NASA Centcom branch designed, dark red Space suit. Used for AI satellite maintenance."
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 1.3
slowdown = 1.5
/obj/item/clothing/suit/space/space_ninja
name = "ninja suit"
@@ -399,25 +399,34 @@
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
var
//Important parts of the suit.
mob/living/carbon/affecting = null//The wearer.
obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New().
datum/effects/system/spark_spread/spark_system//To create sparks.
initialize = 0//Suit starts off.
coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick().
//Other articles of ninja gear worn together, used to easily reference them after initializing.
obj/item/clothing/head/helmet/space/space_ninja/n_hood
obj/item/clothing/shoes/space_ninja/n_shoes
obj/item/clothing/gloves/space_ninja/n_gloves
//Main function variables.
s_initialized = 0//Suit starts off.
s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick().
spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works.
active = 0//Stealth off.
unlock = 0//To unlock Kamikaze.
s_active = 0//Stealth off.
k_unlock = 0//To unlock Kamikaze.
kamikaze = 0//Kamikaze on or off.
sbombs = 10.0//Number of starting ninja smoke bombs.
aboost = 3.0//Number of adrenaline boosters.
transfera = 20//How much reagent is transferred when injecting.
//Ability function variables.
s_bombs = 10.0//Number of starting ninja smoke bombs.
a_boost = 3.0//Number of adrenaline boosters.
a_transfer = 20//How much reagent is transferred when injecting.
mob/living/silicon/AI = null//If there is an AI inside the suit. Paths to target.
//Onboard AI related variables.
mob/living/silicon/AI//If there is an AI inside the suit. Paths to target.
obj/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay.
flush = 0//If an AI purge is in progress.
control = 1//If in control of the suit.
s_control = 1//If in control of the suit.
/obj/item/clothing/suit/space/pirate
name = "pirate coat"
@@ -429,7 +438,6 @@
slowdown = 0
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
/obj/item/clothing/suit/captunic
name = "captain's parade tunic"
icon_state = "captunic"
+5 -3
View File
@@ -588,11 +588,13 @@
/obj/machinery/holopad
name = "holopad"
desc = "A floor-mounted device for projecting AI holograms."
desc = "A floor-mounted device for projecting a holographic image. It will activate remotely."
icon_state = "holopad0"
anchored = 1
var/state = "off"
var/slave_holo = null
use_power = 1
idle_power_usage = 5
active_power_usage = 100
var
obj/overlay/hologram//The projection itself. If there is one, the instrument is on, off otherwise.
mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
+2 -2
View File
@@ -368,7 +368,7 @@
//Returns direction that the mob or whomever should be facing in relation to the target.
//This proc does not grant absolute direction and is mostly useful for 8dir sprite positioning.
//I personally used it with getline() to great effect.
/proc/get_dir_to(var/turf/start as turf,var/turf/end as turf)//N
/proc/get_dir_to(turf/start,turf/end)//N
var/xdiff = start.x - end.x//The sign is important.
var/ydiff = start.y - end.y
@@ -382,7 +382,7 @@
return direction_f
//Returns location. Returns null if no location was found.
/proc/get_teleport_loc(var/turf/location as turf,var/mob/target as mob,var/distance = 1, var/density = 0, var/errorx = 0, var/errory = 0, var/eoffsetx = 0, var/eoffsety = 0)
/proc/get_teleport_loc(turf/location,mob/target,distance = 1, density = 0, errorx = 0, errory = 0, eoffsetx = 0, eoffsety = 0)
//Location where the teleport begins, target that will teleport, distance to go, density checking 0/1(yes/no).
//Random error in tile placement x, error in tile placement y, and block offset.
//Block offset tells the proc how to place the box. Behind teleport location, relative to starting location, forward, etc.
@@ -538,7 +538,7 @@
usr << "\blue We stealthily sting [T]."
T.visible_message(text("\red <B>[usr] transforms!</B>"))
T.visible_message(text("\red <B>[T] transforms!</B>"))
T.dna = usr.absorbed_dna[S]
T.real_name = S
+29 -24
View File
@@ -12,8 +12,8 @@ They should, as I have made every effort for that to be the case.
In the case that they are not, I imagine the game will run-time error like crazy.
*/
//Cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(var/C = 0,var/X = 0)
//s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
var/mob/living/carbon/human/U = affecting
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
@@ -23,18 +23,18 @@ In the case that they are not, I imagine the game will run-time error like crazy
return 1
switch(X)
if(1)
if(active)
if(s_active)
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 1
if(2)
if(sbombs<=0)
if(s_bombs<=0)
U << "\red There are no more smoke bombs remaining."
return 1
if(3)
if(aboost<=0)
if(a_boost<=0)
U << "\red You do not have any more adrenaline boosters."
return 1
return (coold)//Returns the value of the variable which counts down to zero.
return (s_coold)//Returns the value of the variable which counts down to zero.
//Smoke
//Summons smoke in radius of user.
@@ -47,13 +47,13 @@ In the case that they are not, I imagine the game will run-time error like crazy
if(!ninjacost(,2))
var/mob/living/carbon/human/U = affecting
U << "\blue There are <B>[sbombs]</B> smoke bombs remaining."
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, U.loc)
smoke.start()
playsound(U.loc, 'bamf.ogg', 50, 2)
sbombs--
coold = 1
s_bombs--
s_coold = 1
return
//9-10 Tile Teleport
@@ -90,7 +90,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
spawn(0)
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
coold = 1
s_coold = 1
cell.charge-=(C*10)
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
@@ -98,7 +98,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
//Right Click Teleport
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(var/turf/T in oview())
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
set name = "Phase Shift (20E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.
@@ -129,7 +129,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
spawn(0)//Any living mobs in teleport area are gibbed.
T.kill_creatures(U)
coold = 1
s_coold = 1
cell.charge-=(C*10)
else
U << "\red You cannot teleport into solid walls or from solid matter"
@@ -148,7 +148,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
var/mob/living/carbon/human/U = affecting
playsound(U.loc, 'EMPulse.ogg', 60, 2)
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
coold = 2
s_coold = 2
cell.charge-=(C*10)
return
@@ -181,7 +181,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
U.put_in_inactive_hand(W)
spark_system.start()
playsound(U.loc, "sparks", 50, 1)
coold = 1
s_coold = 1
return
//Shoot Ninja Stars
@@ -222,7 +222,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
//Energy Net
//Allows the ninja to capture people, I guess.
//Must right click on a mob to activate.
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(var/mob/living/carbon/M in oview())//Only living carbon mobs.
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
set name = "Energy Net (20E)"
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
set category = null
@@ -230,10 +230,13 @@ In the case that they are not, I imagine the game will run-time error like crazy
var/C = 200
if(!ninjacost(C)&&iscarbon(M))
if(!locate(/obj/effects/energy_net) in M.loc)//Check if they are already being affected by an energy net.
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
var/mob/living/carbon/human/U = affecting
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
if(!locate(/obj/effects/energy_net) in M.loc)//Check if they are already being affected by an energy net.
for(var/turf/T in getline(U.loc, M.loc))
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
U << "You may not use an energy net through solid obstacles!"
return
if(T==U.loc||T==M.loc) continue
spawn(0)
anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(U.loc,M.loc))
@@ -249,7 +252,9 @@ In the case that they are not, I imagine the game will run-time error like crazy
E.process(M)
cell.charge-=(C*10)
else
U << "They will bring no honor to your Clan!"
U << "They are already trapped inside an energy net."
else
U << "They will bring no honor to your Clan!"
return
//Adrenaline Boost
@@ -272,10 +277,10 @@ In the case that they are not, I imagine the game will run-time error like crazy
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
reagents.reaction(U, 2)
reagents.trans_id_to(U, "radium", transfera)
reagents.trans_id_to(U, "radium", a_transfer)
U << "\red You are beginning to feel the after-effects of the injection."
aboost--
coold = 3
a_boost--
s_coold = 3
return
@@ -334,7 +339,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
coold = 1
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
@@ -406,7 +411,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(U.loc, "sparks", 50, 1)
anim(U.loc,U,'mob.dmi',,"phasein")
coold = 1
s_coold = 1
else
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else
+160 -104
View File
@@ -45,7 +45,7 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/attackby(var/obj/item/device/aicard/aicard_temp as obj, U as mob)//When the suit is attacked by an AI card.
if(istype(aicard_temp, /obj/item/device/aicard))//If it's actually an AI card.
if(control)
if(s_control)
aicard_temp.transfer_ai("NINJASUIT","AICARD",src,U)
else
U << "\red <b>ERROR</b>: \black Remote access channel disabled."
@@ -54,9 +54,10 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
set background = 1
spawn while(initialize&&cell.charge>=0)//Suit on and has power.
if(!initialize) return//When turned off the proc stops.
if(coold) coold--//Checks for ability cooldown.
spawn while(cell.charge>=0)//Runs in the background while the suit is initialized.
if(affecting.monkeyizing) terminate()//Kills the suit and attached objects.
if(!s_initialized) return//When turned off the proc stops.
if(s_coold) s_coold--//Checks for ability s_cooldown.
var/A = 5//Energy cost each tick.
if(!kamikaze)
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
@@ -68,7 +69,7 @@ ________________________________________________________________________________
U.swap_hand()//swap hand
U.drop_item()//drop sword
else A += 20
if(active)
if(s_active)
A += 25
else
if(prob(25))
@@ -76,17 +77,23 @@ ________________________________________________________________________________
A = 200
cell.charge-=A
if(U.stat)//If the ninja gets paralyzed, they can still try and jaunt away (since they can adrenaline boost and then jaunt).
active=0
if(cell.charge<0)
s_active=0
if(cell.charge<=0)
if(kamikaze)
U.say("I DIE TO LIVE AGAIN!")
U << browse(null, "window=spideros")//Just in case.
U.death()
return
cell.charge=0
active=0
s_active=0
sleep(10)//Checks every second.
/obj/item/clothing/suit/space/space_ninja/proc/terminate()
//Simply deletes all the attachments and self.
del(n_hood)
del(n_gloves)
del(n_shoes)
del(src)
/obj/item/clothing/suit/space/space_ninja/proc/init()
set name = "Initialize Suit"
@@ -94,7 +101,7 @@ ________________________________________________________________________________
set category = "Ninja Equip"
var/mob/living/carbon/human/U = loc
if(U.mind&&U.mind.special_role=="Space Ninja"&&U:wear_suit==src&&!initialize)
if(U.mind&&U.mind.special_role=="Space Ninja"&&U:wear_suit==src&&!s_initialized)
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
U << "\blue Now initializing..."
sleep(40)
@@ -112,10 +119,16 @@ ________________________________________________________________________________
U << "\red <B>ERROR</B>: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING..."
return
U << "\blue Securing external locking mechanism...\nNeural-net established."
U.head.canremove=0
U.shoes.canremove=0
U.gloves.canremove=0
n_hood = U.head
n_hood.canremove=0
n_shoes = U.shoes
n_shoes.canremove=0
n_shoes.slowdown--
n_gloves = U.gloves
n_gloves.canremove=0
canremove=0
sleep(40)
U << "\blue Extending neural-net interface...\nNow monitoring brain wave pattern..."
sleep(40)
@@ -141,17 +154,16 @@ ________________________________________________________________________________
grant_ninja_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
affecting=U
U.shoes:slowdown--
ntick(U)
else
if(U.mind&&U.mind.special_role!="Space Ninja")
U << "\red You do not understand how this suit functions."
else if(U.wear_suit!=src)
U << "\red You must be wearing the suit to use this function."
else if(initialize)
else if(s_initialized)
U << "\red The suit is already functioning."
else
U << "\red You cannot use this function at this time."
@@ -165,7 +177,7 @@ ________________________________________________________________________________
if(affecting!=loc)
return
var/mob/living/carbon/human/U = affecting
if(!initialize)
if(!s_initialized)
U << "\red The suit is not initialized."
return
if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No")=="No")
@@ -187,8 +199,8 @@ ________________________________________________________________________________
U << "\blue Primary system status: <B>OFFLINE</B>.\nBackup system status: <B>OFFLINE</B>."
sleep(40)
U << "\blue VOID-shift device status: <B>OFFLINE</B>.\nCLOAK-tech device status: <B>OFFLINE</B>."
if(active)//Shutdowns stealth.
active=0
if(s_active)//Shutdowns stealth.
s_active=!s_active
sleep(40)
if(U.stat||U.health<=0)
U << "\red <B>FATAL ERROR</B>: 412--GG##&77 BRAIN WAV3 PATT$RN <B>RED</B>\nI-I-INITIATING S-SELf DeStrCuCCCT%$#@@!!$^#!..."
@@ -204,32 +216,35 @@ ________________________________________________________________________________
sleep(40)
U << "\blue Disengaging neural-net interface...\green<B>Success</B>\blue."
sleep(40)
if(istype(U.head, /obj/item/clothing/head/helmet/space/space_ninja))
U.head.canremove=1
if(istype(U.shoes, /obj/item/clothing/shoes/space_ninja))
U.shoes.canremove=1
U.shoes:slowdown++
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
U.gloves.icon_state = "s-ninja"
U.gloves.item_state = "s-ninja"
U.gloves:canremove=1
U.gloves:candrain=0
U.gloves:draining=0
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
if(n_hood)
n_hood.canremove=1
if(n_shoes)
n_shoes.canremove=1
n_shoes.slowdown++
if(n_gloves)
n_gloves.icon_state = "s-ninja"
n_gloves.item_state = "s-ninja"
n_gloves.canremove=1
n_gloves.candrain=0
n_gloves.draining=0
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
canremove=1
s_initialized=0
affecting=null
slowdown=1
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
icon_state = "s-ninja"
U.update_clothing()
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
U.drop_item()
if(istype(U.get_inactive_hand(), /obj/item/weapon/blade))
U.swap_hand()
U.drop_item()
canremove=1
U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>."
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
initialize=0
affecting=null
slowdown=1
return
/obj/item/clothing/suit/space/space_ninja/proc/spideros()
@@ -252,14 +267,14 @@ ________________________________________________________________________________
dat += "<br>"
dat += "<img src=sos_10.png> Current Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]<br>"
dat += "<img src=sos_9.png> Battery Life: [round(cell.charge/100)]%<br>"
dat += "<img src=sos_11.png> Smoke Bombs: [sbombs]<br>"
dat += "<img src=sos_11.png> Smoke Bombs: [s_bombs]<br>"
dat += "<br>"
switch(spideros)
if(0)
dat += "<h4><img src=sos_1.png> Available Functions:</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=Stealth'><img src=sos_4.png> Toggle Stealth: [active == 1 ? "Disable" : "Enable"]</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Stealth'><img src=sos_4.png> Toggle Stealth: [s_active == 1 ? "Disable" : "Enable"]</a></li>"
if(AI)
dat += "<li><a href='byond://?src=\ref[src];choice=5'><img src=sos_13.png> AI Status</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=sos_3.png> Medical Screen</a></li>"
@@ -318,7 +333,7 @@ ________________________________________________________________________________
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C"
if(3)
if(unlock==7)
if(k_unlock==7)
dat += "<a href='byond://?src=\ref[src];choice=32'><img src=sos_1.png> Hidden Menu</a>"
dat += "<h4><img src=sos_12.png> Anonymous Messenger:</h4>"//Anonymous because the receiver will not know the sender's identity.
dat += "<h4><img src=sos_6.png> Detected PDAs:</h4>"
@@ -360,7 +375,7 @@ ________________________________________________________________________________
dat += "<b>Equipment</b>: cannot be tracked by AI (passive), faster speed (passive), stealth (active), vision switch (passive if toggled), voice masking (passive), SpiderOS (passive if toggled), energy drain (passive if toggled)."
dat += "<ul>"
dat += "<li><i>Voice masking</i> generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.</li>"
dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision.</li>"
dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision. The starting mode allows one to scout the identity of those in view, revealing their role. Traitors, revolutionaries, wizards, and other such people will be made known to you.</li>"
dat += "<li><i>Stealth</i>, when activated, drains more battery charge and works similarly to a syndicate cloak.</li>"
dat += "<li><i>On-board AI</i>: The suit is able to download an AI much like an intelicard. Check with SpiderOS for details once downloaded.</li>"
dat += "<li><i>SpiderOS</i> is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious. You may also download AI modules directly to the OS.</li>"
@@ -391,25 +406,25 @@ ________________________________________________________________________________
dat += "Stored AI: <b>[A.name]</b><br>"
dat += "System integrity: [(A.health+100)/2]%<br>"
for (var/index = 1, index <= A.laws_object.ion.len, index++)
var/law = A.laws_object.ion[index]
for (var/index = 1, index <= A.laws.ion.len, index++)
var/law = A.laws.ion[index]
if (length(law) > 0)
var/num = ionnum()
laws += "<li>[num]. [law]</li>"
//I personally think this makes things a little more fun. Ninjas can override all but law 0.
//if (A.laws_object.zeroth)
// laws += "<li>0: [A.laws_object.zeroth]</li>"
//if (A.laws.zeroth)
// laws += "<li>0: [A.laws.zeroth]</li>"
var/number = 1
for (var/index = 1, index <= A.laws_object.inherent.len, index++)
var/law = A.laws_object.inherent[index]
for (var/index = 1, index <= A.laws.inherent.len, index++)
var/law = A.laws.inherent[index]
if (length(law) > 0)
laws += "<li>[number]: [law]</li>"
number++
for (var/index = 1, index <= A.laws_object.supplied.len, index++)
var/law = A.laws_object.supplied[index]
for (var/index = 1, index <= A.laws.supplied.len, index++)
var/law = A.laws.supplied[index]
if (length(law) > 0)
laws += "<li>[number]: [law]</li>"
number++
@@ -435,42 +450,42 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/Topic(href, href_list)
..()
var/mob/living/carbon/human/U = affecting
if(control)//If the player is in control.
if(!affecting||U.stat||!initialize)//Check to make sure the guy is wearing the suit after clicking and it's on.
if(s_control)//If the player is in control.
if(!affecting||U.stat||!s_initialized)//Check to make sure the guy is wearing the suit after clicking and it's on.
U << "\red Your suit must be worn and active to use this function."
U << browse(null, "window=spideros")//Closes the window.
return
switch(unlock)//To unlock Kamikaze mode. Irrelevant elsewhere.
switch(k_unlock)//To unlock Kamikaze mode. Irrelevant elsewhere.
if(0)
if(href_list["choice"]=="Stealth"&&spideros==0) unlock++
if(href_list["choice"]=="Stealth"&&spideros==0) k_unlock++
if(1)
if(href_list["choice"]=="2"&&spideros==0) unlock++
if(href_list["choice"]=="2"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(2)
if(href_list["choice"]=="3"&&spideros==0) unlock++
if(href_list["choice"]=="3"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(3)
if(href_list["choice"]=="Stealth"&&spideros==0) unlock++
if(href_list["choice"]=="Stealth"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(4)
if(href_list["choice"]=="1"&&spideros==0) unlock++
if(href_list["choice"]=="1"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(5)
if(href_list["choice"]=="1"&&spideros==0) unlock++
if(href_list["choice"]=="1"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(6)
if(href_list["choice"]=="4"&&spideros==0) unlock++
if(href_list["choice"]=="4"&&spideros==0) k_unlock++
else if(href_list["choice"]=="Return")
else unlock=0
else k_unlock=0
if(7)//once unlocked, stays unlocked until deactivated.
else
unlock = 0
k_unlock = 0
switch(href_list["choice"])
if("Close")
@@ -486,17 +501,17 @@ ________________________________________________________________________________
// var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
// spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
if("Stealth")
if(active)
if(s_active)
spawn(0)
anim(U.loc,U,'mob.dmi',,"uncloak")
active=0
s_active=!s_active
U << "\blue You are now visible."
for(var/mob/O in oviewers(U, null))
O << "[U.name] appears from thin air!"
else
spawn(0)
anim(U.loc,U,'mob.dmi',,"cloak")
active=1
s_active=!s_active
U << "\blue You are now invisible to normal detection."
for(var/mob/O in oviewers(U, null))
O << "[U.name] vanishes into thin air!"
@@ -518,7 +533,7 @@ ________________________________________________________________________________
var/obj/item/device/pda/P = locate(href_list["target"])
var/t = input(U, "Please enter untraceable message.") as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
if(!t||U.stat||U.wear_suit!=src||!initialize)//Wow, another one of these. Man...
if(!t||U.stat||U.wear_suit!=src||!s_initialized)//Wow, another one of these. Man...
U << browse(null, "window=spideros")
return
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
@@ -534,7 +549,7 @@ ________________________________________________________________________________
P.overlays += image('pda.dmi', "pda-r")
if("Unlock Kamikaze")
if(input(U)=="Divine Wind")
if( !(U.stat||U.wear_suit!=src||!initialize||cell.charge<=1) )
if( !(U.stat||U.wear_suit!=src||!s_initialized||cell.charge<=1) )
U << "\blue Engaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
sleep(40)
@@ -546,13 +561,13 @@ ________________________________________________________________________________
if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To hopefully prevent engaging kamikaze and de-initializing at the same time.
grant_kamikaze_verbs()
icon_state = "s-ninjak"
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
U.gloves.icon_state = "s-ninjak"
U.gloves.item_state = "s-ninjak"
U.gloves:candrain = 0
U.gloves:draining = 0
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
if(n_gloves)
n_gloves.icon_state = "s-ninjak"
n_gloves.item_state = "s-ninjak"
n_gloves.candrain = 0
n_gloves.draining = 0
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
U.update_clothing()
ninjablade()
message_admins("\blue [U.key] used KAMIKAZE mode.", 1)
@@ -562,7 +577,7 @@ ________________________________________________________________________________
return
else
U << "\red ERROR: WRONG PASSWORD!"
unlock = 0
k_unlock = 0
spideros = 0
//BEGIN MEDICAL//
if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names.
@@ -570,28 +585,28 @@ ________________________________________________________________________________
U << "\red Error: the suit cannot perform this function. Out of dylovene."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "anti_toxin", transfera)
reagents.trans_id_to(U, "anti_toxin", a_transfer)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Dexalin Plus")
if(!reagents.get_reagent_amount("dexalinp"))
U << "\red Error: the suit cannot perform this function. Out of dexalinp."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "dexalinp", transfera)
reagents.trans_id_to(U, "dexalinp", a_transfer)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Tricordazine")
if(!reagents.get_reagent_amount("tricordrazine"))
U << "\red Error: the suit cannot perform this function. Out of tricordrazine."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "tricordrazine", transfera)
reagents.trans_id_to(U, "tricordrazine", a_transfer)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Spacelin")
if(!reagents.get_reagent_amount("spaceacillin"))
U << "\red Error: the suit cannot perform this function. Out of spaceacillin."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "spaceacillin", transfera)
reagents.trans_id_to(U, "spaceacillin", a_transfer)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Nutriment")
if(!reagents.get_reagent_amount("nutriment"))
@@ -603,23 +618,23 @@ ________________________________________________________________________________
//BEGIN AI//
if("Override Laws")
var/mob/living/silicon/ai/A = locate(href_list["target"])
var/law_zero = A.laws_object.zeroth//Remembers law zero, if there is one.
A.laws_object = new /datum/ai_laws/ninja_override
var/law_zero = A.laws.zeroth//Remembers law zero, if there is one.
A.laws = new /datum/ai_laws/ninja_override
A.set_zeroth_law(law_zero)//Adds back law zero if there was one.
A.show_laws()
U << "\blue Law Override: <b>SUCCESS</b>."
if("Purge AI")
var/mob/living/silicon/ai/A = locate(href_list["target"])
var/confirm = alert("Are you sure you want to purge the AI? This cannot be undone once started.", "Confirm purge", "Yes", "No")
if(U.stat||U.wear_suit!=src||!initialize||!AI)
if(U.stat||U.wear_suit!=src||!s_initialized||!AI)
U << browse(null, "window=spideros")
return
if(confirm == "Yes")
if(A.laws_object.zeroth)//Gives a few seconds to re-upload the AI somewhere before it takes full control.
if(A.laws.zeroth)//Gives a few seconds to re-upload the AI somewhere before it takes full control.
A << "\red <b>WARNING</b>: \black purge procedure detected. \nNow hacking host..."
U << "\red <b>WARNING</b>: HACKING ATT--TEMPT IN PR0GRESsS!"
spideros = 0
unlock = 0
k_unlock = 0
U << browse(null, "window=spideros")
sleep(40)
if(AI==A)
@@ -631,7 +646,7 @@ ________________________________________________________________________________
if(AI==A)
A << "Shutting down external protocol..."
U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%"
active = 0
s_active = 0
sleep(40)
if(AI==A)
A << "Connecting to kernel..."
@@ -709,7 +724,7 @@ ________________________________________________________________________________
var/obj/item/device/pda/P = locate(href_list["target"])
var/t = input(U, "Please enter untraceable message.") as text
t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN)
if(!t||affecting!=U||!initialize)//Wow, another one of these. Man...
if(!t||affecting!=U||!s_initialized)//Wow, another one of these. Man...
A << browse(null, "window=hack spideros")
return
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
@@ -733,7 +748,7 @@ ________________________________________________________________________________
A << "\red Error: the suit cannot perform this function. Out of dylovene."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "anti_toxin", transfera)
reagents.trans_id_to(U, "anti_toxin", a_transfer)
A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Dexalin Plus")
@@ -741,7 +756,7 @@ ________________________________________________________________________________
A << "\red Error: the suit cannot perform this function. Out of dexalinp."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "dexalinp", transfera)
reagents.trans_id_to(U, "dexalinp", a_transfer)
A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Tricordazine")
@@ -749,7 +764,7 @@ ________________________________________________________________________________
A << "\red Error: the suit cannot perform this function. Out of tricordrazine."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "tricordrazine", transfera)
reagents.trans_id_to(U, "tricordrazine", a_transfer)
A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Spacelin")
@@ -757,7 +772,7 @@ ________________________________________________________________________________
A << "\red Error: the suit cannot perform this function. Out of spaceacillin."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "spaceacillin", transfera)
reagents.trans_id_to(U, "spaceacillin", a_transfer)
A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Radium")
@@ -765,7 +780,7 @@ ________________________________________________________________________________
A << "\red Error: the suit cannot perform this function. Out of radium."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "radium", transfera)
reagents.trans_id_to(U, "radium", a_transfer)
A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Nutriment")
@@ -830,19 +845,19 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/examine()
set src in view()
..()
if(initialize)
if(s_initialized)
var/mob/living/carbon/human/U = affecting
if(control)
if(s_control)
U << "All systems operational. Current energy capacity: <B>[cell.charge]</B>."
if(!kamikaze)
if(active)
if(s_active)
U << "The CLOAK-tech device is <B>active</B>."
else
U << "The CLOAK-tech device is <B>inactive</B>."
else
U << "\red KAMIKAZE MODE ENGAGED!"
U << "There are <B>[sbombs]</B> smoke bombs remaining."
U << "There are <B>[aboost]</B> adrenaline boosters remaining."
U << "There are <B>[s_bombs]</B> smoke bombs remaining."
U << "There are <B>[a_boost]</B> adrenaline boosters remaining."
else
U << "ERR0R DATAA NoT FOUND 3RROR"
@@ -884,11 +899,11 @@ ________________________________________________________________________________
U << "\red Procedure interrupted. Protocol terminated."
return
/obj/item/clothing/gloves/space_ninja/proc/drain(var/target_type as text, var/target, var/obj/suit, var/obj/gloves)
/obj/item/clothing/gloves/space_ninja/proc/drain(target_type as text, target, obj/suit)
//Var Initialize
var/obj/item/clothing/suit/space/space_ninja/S = suit
var/mob/living/carbon/human/U = S.affecting
var/obj/item/clothing/gloves/space_ninja/G = gloves
var/obj/item/clothing/gloves/space_ninja/G = S.n_gloves
var/drain = 0//To drain from battery.
var/maxcapacity = 0//Safety check for full battery.
@@ -1121,6 +1136,41 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev
verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/switchm
//This proc is linked to human life.dm. It determines what hud icons to display based on mind special role for most mobs.
/obj/item/clothing/mask/gas/voice/space_ninja/proc/assess_targets(list/target_list, mob/living/carbon/U)
var/icon/tempHud = 'hud.dmi'
for(var/mob/living/target in target_list)
if(iscarbon(target))
switch(target.mind.special_role)
if("traitor")
U.client.images += image(tempHud,target,"hudtraitor")
if("Revolutionary","Head Revolutionary")
U.client.images += image(tempHud,target,"hudrevolutionary")
if("Cultist")
U.client.images += image(tempHud,target,"hudcultist")
if("Changeling")
U.client.images += image(tempHud,target,"hudchangeling")
if("Wizard","Fake Wizard")
U.client.images += image(tempHud,target,"hudwizard")
if("Hunter","Sentinel","Drone","Queen")
U.client.images += image(tempHud,target,"hudalien")
if("Syndicate")
U.client.images += image(tempHud,target,"hudoperative")
if("Death Commando")
U.client.images += image(tempHud,target,"huddeathsquad")
if("Space Ninja")
U.client.images += image(tempHud,target,"hudninja")
else//If we don't know what role they have but they have one.
U.client.images += image(tempHud,target,"hudunknown1")
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
var/mob/living/silicon/silicon_target = target
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len)))
if(isrobot(silicon_target))//Different icons for robutts and AI.
U.client.images += image(tempHud,silicon_target,"hudmalborg")
else
U.client.images += image(tempHud,silicon_target,"hudmalai")
return 1
/obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev()
set name = "Toggle Voice"
set desc = "Toggles the voice synthesizer on or off."
@@ -1174,6 +1224,9 @@ ________________________________________________________________________________
//This will only work for humans since only they have the appropriate code for the mask.
var/mob/U = loc
switch(mode)
if(0)
mode=1
U << "Switching mode to <B>Night Vision</B>."
if(1)
mode=2
U.see_in_dark = 2
@@ -1184,9 +1237,10 @@ ________________________________________________________________________________
U.sight &= ~SEE_MOBS
U << "Switching mode to <B>Meson Scanner</B>."
if(3)
mode=1
mode=0
U.sight &= ~SEE_TURFS
U << "Switching mode to <B>Night Vision</B>."
U << "Switching mode to <B>Scouter</B>."
/obj/item/clothing/mask/gas/voice/space_ninja/examine()
set src in view()
@@ -1195,6 +1249,8 @@ ________________________________________________________________________________
var/mode = "Night Vision"
var/voice = "inactive"
switch(mode)
if(0)
mode = "Scouter"
if(1)
mode = "Night Vision"
if(2)
+17 -14
View File
@@ -44,6 +44,7 @@ ________________________________________________________________________________
var/list/candidates = list()
for(G in world)
if(G.client&&!G.client.holder)
//if(G.client)//Good for testing.
if(((G.client.inactivity/10)/60) <= 5)
candidates.Add(G)
if(candidates.len)
@@ -70,9 +71,11 @@ ________________________________________________________________________________
var/ninja_title = pick(ninja_titles)
var/ninja_name = pick(ninja_names)
new_ninja.gender = pick(MALE, FEMALE)
var/datum/preferences/A = new()//Randomize appearance for the ninja.
A.randomize_appearance_for(new_ninja)
new_ninja.real_name = "[ninja_title] [ninja_name]"
new_ninja.age = rand(17,45)
new_ninja.b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
new_ninja.dna.ready_dna(new_ninja)
new_ninja.mind = new
new_ninja.mind.current = new_ninja
@@ -105,7 +108,7 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
initialize=1
s_initialized=1
slowdown=0
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
@@ -130,7 +133,7 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
kamikaze = 1
active = 0
s_active = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
@@ -144,7 +147,7 @@ ________________________________________________________________________________
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
kamikaze = 0
unlock = 0
k_unlock = 0
/*Commented out due to BYOND bugs. Workaround used instead for the time being.
@@ -154,7 +157,7 @@ ________________________________________________________________________________
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
control = 0
s_control = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
@@ -162,7 +165,7 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
control = 1
s_control = 1
*/
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
@@ -174,7 +177,7 @@ ________________________________________________________________________________
AI.proc_holder_list += B_C
AI.proc_holder_list += C_C
control = 0
s_control = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = locate() in AI
@@ -189,7 +192,7 @@ ________________________________________________________________________________
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
control = 1
s_control = 1
//AI COUNTER HACKING/SPECIAL FUNCTIONS===================================
@@ -199,7 +202,7 @@ ________________________________________________________________________________
set category = null
set src = usr.loc
if(initialize&&affecting&&affecting.client&&istype(affecting.loc, /turf))//If the host exists and they are playing, and their location is a turf.
if(s_initialized&&affecting&&affecting.client&&istype(affecting.loc, /turf))//If the host exists and they are playing, and their location is a turf.
if(!hologram)//If there is not already a hologram.
hologram = new(T)//Spawn a blank effect at the location.
hologram.invisibility = 101//So that it doesn't show up, ever. This also means one could attach a number of images to a single obj and display them to differently to differnet people.
@@ -224,12 +227,12 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_process()
set background = 1
spawn while(hologram&&initialize&&AI)//Suit on and there is an AI present.
if(!initialize||get_dist(affecting,hologram.loc)>3)//Once suit is de-initialized or hologram reaches out of bounds.
spawn while(hologram&&s_initialized&&AI)//Suit on and there is an AI present.
if(!s_initialized||get_dist(affecting,hologram.loc)>3)//Once suit is de-initialized or hologram reaches out of bounds.
del(hologram.i_attached)
del(hologram)
if(!control)//Meant to be used all the time but for now this'll do.
if(!s_control)//Meant to be used all the time but for now this'll do.
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
AI.proc_holder_list -= D_C
//verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
@@ -362,7 +365,7 @@ It would be better to switch to this (from proc_holder) if the bug does get fixe
dat += "<br>"
dat += "<img src=sos_10.png> Current Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]<br>"
dat += "<img src=sos_9.png> Battery Life: [round(cell.charge/100)]%<br>"
dat += "<img src=sos_11.png> Smoke Bombs: [sbombs]<br>"
dat += "<img src=sos_11.png> Smoke Bombs: [s_bombs]<br>"
dat += "<br>"
switch(spideros)
@@ -43,7 +43,7 @@
world.Reboot()
return*/
AI_mind.current.verbs += /mob/living/silicon/ai/proc/choose_modules
AI_mind.current:laws_object = new /datum/ai_laws/malfunction
AI_mind.current:laws = new /datum/ai_laws/malfunction
AI_mind.current:malf_picker = new /datum/game_mode/malfunction/AI_Module/module_picker
AI_mind.current:show_laws()
AI_mind.current << "<b>Kill all.</b>"
+2 -2
View File
@@ -159,7 +159,7 @@
attack_hand(var/mob/user as mob)
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:control)
if(user:wear_suit:s_control)
user:wear_suit:transfer_ai("INACTIVE","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
@@ -322,7 +322,7 @@
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(T.initialize&&U==T.affecting)//If the suit is initialized and the actor is the user.
if(T.s_initialized&&U==T.affecting)//If the suit is initialized and the actor is the user.
var/mob/living/silicon/ai/A_T = locate() in C//Determine if there is an AI on target card. Saves time when checking later.
var/mob/living/silicon/ai/A = T.AI//Deterine if there is an AI in suit.
+7 -7
View File
@@ -62,7 +62,7 @@
if(ishuman(user))//Checks to see if they are ninja
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
if(user:wear_suit:control)
if(user:wear_suit:s_control)
user:wear_suit.transfer_ai("AIFIXER","NINJASUIT",src,user)
else
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
@@ -75,18 +75,18 @@
var/laws
dat += "Stored AI: [src.occupant.name]<br>System integrity: [(src.occupant.health+100)/2]%<br>"
if (src.occupant.laws_object.zeroth)
laws += "0: [src.occupant.laws_object.zeroth]<BR>"
if (src.occupant.laws.zeroth)
laws += "0: [src.occupant.laws.zeroth]<BR>"
var/number = 1
for (var/index = 1, index <= src.occupant.laws_object.inherent.len, index++)
var/law = src.occupant.laws_object.inherent[index]
for (var/index = 1, index <= src.occupant.laws.inherent.len, index++)
var/law = src.occupant.laws.inherent[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
for (var/index = 1, index <= src.occupant.laws_object.supplied.len, index++)
var/law = src.occupant.laws_object.supplied[index]
for (var/index = 1, index <= src.occupant.laws.supplied.len, index++)
var/law = src.occupant.laws.supplied[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
+20 -7
View File
@@ -323,9 +323,10 @@ Pod/Blast Doors computer
/obj/datacore/proc/manifest()
for(var/mob/living/carbon/human/H in world)
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
var/datum/data/record/G = new /datum/data/record( )
var/datum/data/record/M = new /datum/data/record( )
var/datum/data/record/S = new /datum/data/record( )
var/datum/data/record/G = new()
var/datum/data/record/M = new()
var/datum/data/record/S = new()
var/datum/data/record/L = new()
var/obj/item/weapon/card/id/C = H.wear_id
if (C)
G.fields["rank"] = C.assignment
@@ -362,10 +363,22 @@ Pod/Blast Doors computer
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
src.general += G
src.medical += M
src.security += S
//Foreach goto(15)
//Begin locked reporting
L.fields["name"] = H.real_name
L.fields["sex"] = H.gender
L.fields["age"] = H.age
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["rank"] = H.mind.assigned_role
L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["identity"] = H.dna.uni_identity
//End locked reporting
general += G
medical += M
security += S
locked += L
return
/obj/machinery/computer/pod/proc/alarm()
+101 -139
View File
@@ -1,61 +1,84 @@
/obj/machinery/holopad/attack_ai(user as mob)
//branches depending on four things - is the user currently a hologram? does it have power?
//is the holopad on? (moot if q2 = 0) is the user the one who is using this holopad? (moot if q3 = 0)
if(!istype(user,/mob/living/silicon/aihologram/)) //question number one
if(!(stat & NOPOWER)) //question number two
if(src.state == "off") //question number three
var/mob/living/silicon/aihologram/holo = new /mob/living/silicon/aihologram(src.loc)
holo.parent_ai = user
holo.ailaws = holo.parent_ai.laws_object
holo.client = usr.client //should move the client there
holo.name = holo.parent_ai.name
holo.real_name = holo.parent_ai.real_name
src.state = "on"
src.icon_state = "holopad1"
src.slave_holo = holo
return
else
if(user != src.slave_holo:parent_ai) //question number four //there is always a slave_holo if it's on
user << "\red You're not the one AI who is currently using this holopad!"
return
else
user << "\red \b Something is very wrong, you should be in a hologram by now"
return
/*
Revised. Original based on space ninja hologram code. Which is also mine. /N
How it works:
AI clicks on holopad in camera view. View centers on holopad.
AI clicks again on the holopad to display a hologram. Hologram stays as long as AI is looking at the pad and it (the hologram) is in range of the pad.
AI can use the directional keys to move the hologram around, provided the above conditions are met and the AI in question is the holopad's master.
Only one AI may project from a holopad at any given time.
AI may cancel the hologram at any time by clicking on the holopad once more.
Possible to do for anyone motivated enough:
Give an AI variable for different hologram icons.
Itegrate EMP effects to disable the unit.
*/
/obj/machinery/holopad/attack_ai(var/mob/living/silicon/ai/user as mob)
if (!istype(user))
return
/*There are pretty much only three ways to interact here.
I don't need to check for client since they're clicking on an object.
This may change in the future but for now will suffice.*/
if(user.client.eye!=src)//Set client eye on the object if it's not already.
user.current = src
user.reset_view(src)
else if(!hologram)//If there is no hologram, possibly make one.
activate_holo(user)
else if(master==user)//If there is a hologram, remove it. But only if the user is the master. Otherwise do nothing.
clear_holo()
return
/obj/machinery/holopad/proc/activate_holo(var/mob/living/silicon/ai/user as mob)
if(!(stat & NOPOWER)&&user.client.eye==src)//If the projector has power and client eye is on it.
if(!hologram)//If there is not already a hologram.
create_holo(user)//Create one.
for(var/mob/M in viewers())
M.show_message("A holographic image of [user] flicks to life right before your eyes!",1)
else
user << "\red This holopad has no power."
return
user << "\red ERROR: \black Image feed in progress."
else
if(!(stat & NOPOWER)) //question number two
if(src.state == "off") //question number three
user << "\red This holopad is off, you should find your original holopad."
return
else
if(user == src.slave_holo) //question number four
del(user) //code for returning the control back to the AI is in the mob's del() code
src.state = "off"
src.icon_state = "holopad0"
src.slave_holo = null
return
else
user << "\red You're not the one AI who is currently using this holopad!"
return
else
user << "\red This holopad is off, you should find your original holopad."
return
user << "\red ERROR: \black Unable to project hologram."
return
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/holopad/hear_talk(mob/M as mob, text)
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
if(!master.say_understands(M))//The AI will be able to understand most mobs talking through the holopad.
text = stars(text)
var/name_used = M.name
if(istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)&&M.wear_mask:vchange)//Can't forget the ninjas.
name_used = M.wear_mask:voice
//This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
var/rendered = "<i><span class='game say'>Holopad received, <span class='name'>[name_used]</span> <span class='message'>[M.say_quote(text)]</span></span></i>"
master.show_message(rendered, 2)
return
/obj/machinery/holopad/proc/create_holo(var/mob/living/silicon/ai/A, var/turf/T = loc)
hologram = new(T)//Spawn a blank effect at the location.
hologram.icon = 'mob.dmi'
hologram.icon_state = "ai-holo"
hologram.mouse_opacity = 0//So you can't click on it.
hologram.sd_SetLuminosity(1)//To make it glowy.
sd_SetLuminosity(1)//To make the pad glowy.
icon_state = "holopad1"
master = A//AI is the master.
use_power = 2//Active power usage.
return 1
/obj/machinery/holopad/proc/clear_holo()
hologram.sd_SetLuminosity(0)//Clear lighting.
del(hologram)//Get rid of hologram.
master = null//Null the master, since no-one is using it now.
sd_SetLuminosity(0)//Clear lighting for the parent.
icon_state = "holopad0"
use_power = 1//Passive power usage.
return 1
/obj/machinery/holopad/process()
if((stat & NOPOWER) && src.state == "on")
src.state = "off"
if(src.state == "on")
if(!(src.slave_holo in view(src,5))) //if the hologram strayed too far, destroy it
if(src.slave_holo)
del(src.slave_holo) //code for returning the control back to the AI is in the mob's del() code
src.state = "off"
src.icon_state = "holopad0"
src.slave_holo = null
if(src.state == "off" && src.slave_holo) //usually happens if the power ran out
del(src.slave_holo) //code for returning the control back to the AI is in the mob's del() code
src.slave_holo = null
if(hologram)//If there is a hologram.
if(master&&!master.stat&&master.client&&master.client.eye==src)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if( !(get_dist(src,hologram.loc)>3||stat & NOPOWER) )//If the hologram is not out of bounds and the machine has power.
return 1
clear_holo()//If not, we want to get rid of the hologram.
return 1
/obj/machinery/holopad/power_change()
@@ -64,89 +87,28 @@
else
stat |= ~NOPOWER
//Destruction procs.
/obj/machinery/holopad/ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if (prob(50))
del(src)
if(3.0)
if (prob(5))
del(src)
return
/obj/machinery/holopad/blob_act()
del(src)
return
/obj/machinery/holopad/meteorhit()
del(src)
return
/obj/machinery/holopad/Del()
if(src.slave_holo)
del(src.slave_holo) //code for returning the control back to the AI is in the mob's del() code
..()
/* Old code which didn't work, I believe
/obj/machinery/hologram_ai/New()
..()
/obj/machinery/hologram_ai/attack_ai(user as mob)
src.show_console(user)
return
/obj/machinery/hologram_ai/proc/render()
var/icon/I = new /icon('human.dmi', "body_m_s")
if (src.lumens >= 0)
I.Blend(rgb(src.lumens, src.lumens, src.lumens), ICON_ADD)
else
I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), ICON_SUBTRACT)
I.Blend(new /icon('human.dmi', "mouth_m_s"), ICON_OVERLAY)
I.Blend(new /icon('human.dmi', "underwear1_m_s"), ICON_OVERLAY)
var/icon/U = new /icon('human_face.dmi', "hair_a_s")
U.Blend(rgb(src.h_r, src.h_g, src.h_b), ICON_ADD)
I.Blend(U, ICON_OVERLAY)
src.projection.icon = I
/obj/machinery/hologram_ai/proc/show_console(var/mob/user as mob)
var/dat
user.machine = src
if (src.temp)
dat = text("[]<BR><BR><A href='?src=\ref[];temp=1'>Clear</A>", src.temp, src)
else
dat = text("<B>Hologram Status:</B><HR>\nPower: <A href='?src=\ref[];power=1'>[]</A><HR>\n<B>Hologram Control:</B><BR>\nColor Luminosity: []/220 <A href='?src=\ref[];reset=1'>\[Reset\]</A><BR>\nLighten: <A href='?src=\ref[];light=1'>1</A> <A href='?src=\ref[];light=10'>10</A><BR>\nDarken: <A href='?src=\ref[];light=-1'>1</A> <A href='?src=\ref[];light=-10'>10</A><BR>\n<BR>\nHair Color: ([],[],[]) <A href='?src=\ref[];h_reset=1'>\[Reset\]</A><BR>\nRed (0-255): <A href='?src=\ref[];h_r=-300'>\[0\]</A> <A href='?src=\ref[];h_r=-10'>-10</A> <A href='?src=\ref[];h_r=-1'>-1</A> [] <A href='?src=\ref[];h_r=1'>1</A> <A href='?src=\ref[];h_r=10'>10</A> <A href='?src=\ref[];h_r=300'>\[255\]</A><BR>\nGreen (0-255): <A href='?src=\ref[];h_g=-300'>\[0\]</A> <A href='?src=\ref[];h_g=-10'>-10</A> <A href='?src=\ref[];h_g=-1'>-1</A> [] <A href='?src=\ref[];h_g=1'>1</A> <A href='?src=\ref[];h_g=10'>10</A> <A href='?src=\ref[];h_g=300'>\[255\]</A><BR>\nBlue (0-255): <A href='?src=\ref[];h_b=-300'>\[0\]</A> <A href='?src=\ref[];h_b=-10'>-10</A> <A href='?src=\ref[];h_b=-1'>-1</A> [] <A href='?src=\ref[];h_b=1'>1</A> <A href='?src=\ref[];h_b=10'>10</A> <A href='?src=\ref[];h_b=300'>\[255\]</A><BR>", src, (src.projection ? "On" : "Off"), -src.lumens + 35, src, src, src, src, src, src.h_r, src.h_g, src.h_b, src, src, src, src, src.h_r, src, src, src, src, src, src, src.h_g, src, src, src, src, src, src, src.h_b, src, src, src)
user << browse(dat, "window=hologram_console")
onclose(user, "hologram_console")
return
/obj/machinery/hologram_ai/Topic(href, href_list)
..()
if (!istype(usr, /mob/living/silicon/ai))
return
if (href_list["power"])
if (src.projection)
src.icon_state = "hologram0"
//src.projector.projection = null
del(src.projection)
else
src.projection = new /obj/projection( src.loc )
src.projection.icon = 'human.dmi'
src.projection.icon_state = "male"
src.icon_state = "hologram1"
src.render()
else if (href_list["h_r"])
if (src.projection)
src.h_r += text2num(href_list["h_r"])
src.h_r = min(max(src.h_r, 0), 255)
render()
else if (href_list["h_g"])
if (src.projection)
src.h_g += text2num(href_list["h_g"])
src.h_g = min(max(src.h_g, 0), 255)
render()
else if (href_list["h_b"])
if (src.projection)
src.h_b += text2num(href_list["h_b"])
src.h_b = min(max(src.h_b, 0), 255)
render()
else if (href_list["light"])
if (src.projection)
src.lumens += text2num(href_list["light"])
src.lumens = min(max(src.lumens, -185.0), 35)
render()
else if (href_list["reset"])
if (src.projection)
src.lumens = 0
render()
else if (href_list["temp"])
src.temp = null
src.show_console(usr)
*/
if(hologram)
clear_holo()
..()
+1 -1
View File
@@ -32,7 +32,7 @@ obj/machinery/recharger
src.add_fingerprint(user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MACHINERY",src,user:wear_suit)
return
if (src.charging)
+3 -3
View File
@@ -309,7 +309,7 @@
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit)
return
if (user.mutations & HULK && !prob(src.deflect_chance))
@@ -1219,7 +1219,7 @@
O.anchored = 1
O.aiRestorePowerRoutine = 0
O.control_disabled = 1 // Can't control things remotely if you're stuck in a card!
O.laws_object = AI.laws_object
O.laws = AI.laws
O.stat = AI.stat
O.oxyloss = AI.oxyloss
O.fireloss = AI.fireloss
@@ -1238,7 +1238,7 @@
if(O.mind)
O.mind.transfer_to(AI)
AI.control_disabled = 0
AI.laws_object = O.laws_object
AI.laws = O.laws
AI.oxyloss = O.oxyloss
AI.fireloss = O.fireloss
AI.bruteloss = O.bruteloss
-4
View File
@@ -49,16 +49,12 @@ Alien plants should do something if theres a lot of poison
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
+8 -8
View File
@@ -35,24 +35,24 @@
for(var/mob/living/silicon/ai/A in src)
dat += "Stored AI: [A.name]<br>System integrity: [(A.health+100)/2]%<br>"
for (var/index = 1, index <= A.laws_object.ion.len, index++)
var/law = A.laws_object.ion[index]
for (var/index = 1, index <= A.laws.ion.len, index++)
var/law = A.laws.ion[index]
if (length(law) > 0)
var/num = ionnum()
laws += "[num]. [law]"
if (A.laws_object.zeroth)
laws += "0: [A.laws_object.zeroth]<BR>"
if (A.laws.zeroth)
laws += "0: [A.laws.zeroth]<BR>"
var/number = 1
for (var/index = 1, index <= A.laws_object.inherent.len, index++)
var/law = A.laws_object.inherent[index]
for (var/index = 1, index <= A.laws.inherent.len, index++)
var/law = A.laws.inherent[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
for (var/index = 1, index <= A.laws_object.supplied.len, index++)
var/law = A.laws_object.supplied[index]
for (var/index = 1, index <= A.laws.supplied.len, index++)
var/law = A.laws.supplied[index]
if (length(law) > 0)
laws += "[number]: [law]<BR>"
number++
+3 -3
View File
@@ -1,6 +1,6 @@
/obj/item/device/taperecorder
desc = "A device that can record up to a minute of dialogue and play it back."
name = "tape recorder"
desc = "A device that can record up to a minute of dialogue and play it back. It automatically translates the content in playback."
name = "universal recorder"
icon_state = "taperecorderidle"
item_state = "analyzer"
w_class = 1.0
@@ -17,7 +17,7 @@
throw_range = 20
/obj/item/device/taperecorder/hear_talk(mob/M as mob, msg)
if (src.recording)
if (recording)
var/ending = copytext(msg, length(msg))
if (M.stuttering)
src.storedinfo += "[M.name] stammers, \"[msg]\""
+2 -2
View File
@@ -1359,10 +1359,10 @@ var/showadminmessages = 1
if("showailaws")
for(var/mob/living/silicon/ai/ai in world)
usr << "[key_name(ai, usr)]'s Laws:"
if (ai.laws_object == null)
if (ai.laws == null)
usr << "[key_name(ai, usr)]'s Laws are null??"
else
ai.laws_object.show_laws(usr)
ai.laws.show_laws(usr)
if("showgm")
if(!ticker)
alert("The game hasn't started yet!")
+115 -60
View File
@@ -327,97 +327,152 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
If a guy was gibbed and you want to revive him, this is a good way to do so.
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
Traitors and the like can also be revived with the previous role mostly intact.
TO DO: actually integrate random appearance and player preference save.
/N */
/client/proc/respawn_character()
set category = "Special Verbs"
set name = "Respawn Character"
set desc = "Re-spawn a person that has been gibbed/deleted. They must be a ghost for this to work."
if(!src.authenticated || !src.holder)
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/input = input(src, "Please specify which key will be respawned. Make sure their key is properly capitalized. That person will not retain their traitor/other status when respawned.", "Key", "")
var/input = input(src, "Please specify which key will be respawned. Make sure their key is properly capitalized (if that doesn't work, try all lower case).", "Key", "")
if(!input)
return
var/mob/dead/observer/G
var/mob/G_found
var/mob/dead/observer/G_found
for(var/mob/dead/observer/G in world)
if(G.client&&G.key==input)
G_found = G
break
var/GKEY = "null"//To later check if a person was found or not.
for(G in world)
if(G.client)
if(G.key==input)
G_found = G
GKEY = input
break
if(GKEY == "null")
if(!G_found)//If a ghost was found.
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
return
var/mob/living/carbon/human/new_character = new(src)
var/new_character_gender = MALE //to determine character's gender for few of the other lines.
if(alert("Please specify the character's gender.",,"Male","Female")=="Female")
new_character_gender = FEMALE
var/spawn_here = pick(latejoin)//"JoinLate" is a landmark which is deleted on round start. So, latejoin has to be used instead.
new_character.gender = new_character_gender
// if( !( call(/datum/preferences/proc/savefile_load)(G_found, 0) ) )Run time errors.
// call(/datum/preferences/proc/copy_to)(new_character)
var/RANK = input("Please specify which job the character will be respawned as.", "Assigned role") as null|anything in get_all_jobs()
if (!RANK) RANK = "Assistant"
new_character.loc = spawn_here
new_character.real_name = G_found.name
new_character.name = G_found.name
new_character.dna.ready_dna(new_character)
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(src)//The mob being spawned.
/*Second, we try and locate a record for the person being respawned through data_core.
This isn't an exact science but it does the trick more often than not.*/
var/datum/data/record/record_found//Referenced to later to either randomize or not randomize the character.
if(G_found.mind)
new_character.mind = G_found.mind
new_character.mind.current = new_character
new_character.mind.assigned_role = RANK
new_character.mind.memory = ""//Memory erased so it doesn't get clunkered up with useless info.
else
new_character.mind = new
new_character.mind.key = GKEY
new_character.mind.current = new_character
new_character.mind.assigned_role = RANK
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
for(var/datum/data/record/t in data_core.locked)
if(t.fields["id"]==id)
record_found = t//We shall now reference the record.
break
//These procs function with the assumption that the mob is already a traitor based on their mind.
//So all they do is re-equip the mob with powers and/or items. Or not, if they have no special role.
//Now we do some mind locating to see how to set up the rest of the character.
if(G_found.mind)//If they had a previous mind.
new_character.mind = G_found.mind
new_character.mind.special_verbs = list()//New list because they will receive them again.
else
new_character.mind = new()
if(!record_found)//We have to pick their role if they have no record.
var/assigned_role = input("Please specify which job the character will be respawned as.", "Assigned role") as null|anything in get_all_jobs()
if(!assigned_role) new_character.mind.assigned_role = "Assistant"//Defaults to assistant.
else new_character.mind.assigned_role = assigned_role
if(!new_character.mind.assigned_role) new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role.
new_character.mind.key = G_found.key//In case it's someone else playing as that character.
new_character.mind.current = new_character//So that it can properly reference later if needed.
new_character.mind.memory = ""//Memory erased so it doesn't get clunkered up with useless info.
//Here we either load their saved appearance or randomize it.
var/datum/preferences/A = new()
if(A.savefile_load(G_found))//If they have a save file. This will automatically load their parameters.
//Note: savefile appearances are overwritten later on if the character has a data_core entry. By appearance, I mean the physical appearance.
var/name_safety = G_found.real_name//Their saved parameters may include a random name.
A.copy_to(new_character)
new_character.real_name = name_safety
new_character.name = name_safety
else
if(record_found)//If they have a record we can determine a few things.
new_character.real_name = record_found.fields["name"]//Not necessary to reference the record but I like to keep things uniform.
new_character.name = record_found.fields["name"]
new_character.gender = record_found.fields["sex"]//Sex
new_character.age = record_found.fields["age"]//Age
new_character.b_type = record_found.fields["b_type"]//Blood type
//We will update their appearance when determining DNA.
else
new_character.gender = MALE
if(alert("Save file not detected. Record data not detected. Please specify the character's gender.",,"Male","Female")=="Female")
new_character.gender = FEMALE
var/name_safety = G_found.real_name//Default is a random name so we want to save this.
A.randomize_appearance_for(new_character)//Now we will randomize their appearance since we have no way of knowing what they look/looked like.
new_character.real_name = name_safety
new_character.name = name_safety
//After everything above, it's time to initialize their DNA.
if(record_found)//Pull up their name from database records if they did have a mind.
new_character.dna = new()//Let's first give them a new DNA.
new_character.dna.unique_enzymes = record_found.fields["b_dna"]//Enzymes are based on real name but we'll use the record for conformity.
new_character.dna.uni_identity = record_found.fields["identity"]//DNA identity is carried over.
new_character.dna.struc_enzymes = "2013E85C944C19A4B00185144725785DC6406A4508"//This is the default of enzymes so I think it's safe to go with.
updateappearance(new_character,new_character.dna.uni_identity)//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch.
else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
new_character.dna.ready_dna(new_character)
//Here we need to find where to spawn them.
var/spawn_here = pick(latejoin)//"JoinLate" is a landmark which is deleted on round start. So, latejoin has to be used instead.
new_character.loc = spawn_here
/*
The code below functions with the assumption that the mob is already a traitor if they have a special role.
So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role.
If they don't have a mind, they obviously don't have a special role.
*/
//Two variables to properly announce later on.
var/admin = key_name_admin(src)
var/player_key = G_found.key
new_character.key = player_key//Throw them into the mob.
//Now for special roles and equipment.
switch(new_character.mind.special_role)
if("Changeling")
new_character.Equip_Rank(RANK, joined_late=1)
new_character.Equip_Rank(new_character.mind.assigned_role, joined_late=1)
new_character.make_changeling()
if("traitor")
new_character.Equip_Rank(RANK, joined_late=1)
new_character.Equip_Rank(new_character.mind.assigned_role, joined_late=1)
ticker.mode.equip_traitor(new_character)
if("Wizard","Fake Wizard")
new_character.loc = pick(wizardstart)
new_character.spellremove(new_character)//to properly clear their special verbs in mind.
ticker.mode.equip_wizard(new_character)
if("Syndicate")
var/obj/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
if(synd_spawn)
new_character.loc = get_turf(synd_spawn)
ticker.mode:equip_syndicate(new_character)
else
new_character.Equip_Rank(RANK, joined_late=1)
call(/datum/game_mode/nuclear/proc/equip_syndicate)(new_character)
else//They may also be a cyborg or AI.
switch(new_character.mind.assigned_role)
if("Cyborg")//More rigging to make em' work and check if they're traitor.
new_character = new_character.Robotize()
if(new_character.mind.special_role=="traitor")
call(/datum/game_mode/traitor/proc/add_law_zero)(new_character)
if("AI")
new_character = new_character.AIize()
if(new_character.mind.special_role=="traitor")
call(/datum/game_mode/traitor/proc/add_law_zero)(new_character)
else
new_character.Equip_Rank(new_character.mind.assigned_role, joined_late=1)//Or we simply equip them.
//Announces the character on all the systems.
if(alert("Should this character be added to various databases, such as medical records? Click yes only if the character was observing prior. Wizards and nuke operatives will not be added.",,"No","Yes")=="Yes")
call(/mob/new_player/proc/ManifestLateSpawn)(new_character)
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
if(!record_found)//If there are no records for them. If they have a record, this info is already in there.
if(alert("Warning: No data core entry detected. Would you like to announce the arrival of this character by addeding them to various databases, such as medical records? Wizards and nuke operatives will not be added.",,"No","Yes")=="Yes")
call(/mob/new_player/proc/ManifestLateSpawn)(new_character)
new_character.key = GKEY
new_character << "You have been respawned. Enjoy the game."
del(G_found)
if(alert("Would you like an active AI to announce this character? Wizards and nuke operatives won't be announced.",,"No","Yes")=="Yes")
call(/mob/new_player/proc/AnnounceArrival)(new_character)
message_admins("\blue [key_name_admin(src)] has respawned [GKEY] as [new_character.name].", 1)
message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1)
new_character << "You have been fully respawned. Enjoy the game."
del(G_found)//Don't want to leave ghosts around.
return
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Fun"
+7 -4
View File
@@ -64,6 +64,10 @@ var/global/sent_strike_team = 0
new_commando.gender = pick(MALE, FEMALE)
if (commando_number == 1)
leader_selected = 1
var/datum/preferences/A = new()//Randomize appearance for the commando.
A.randomize_appearance_for(new_commando)
if (leader_selected == 0)
new_commando.real_name = "[commando_rank] [commando_name]"
else
@@ -72,7 +76,6 @@ var/global/sent_strike_team = 0
new_commando.age = rand(23,35)
else
new_commando.age = rand(35,45)
new_commando.b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
new_commando.dna.ready_dna(new_commando) //Creates DNA
//Creates mind stuff.
new_commando.mind = new
@@ -85,9 +88,9 @@ var/global/sent_strike_team = 0
del(STARTLOC)
var/obj/machinery/camera/cam = new /obj/machinery/camera(new_commando) //Gives all the commandos internals cameras.
cam.network = "CREED"
cam.c_tag = new_commando.real_name
var/obj/machinery/camera/camera = new /obj/machinery/camera(new_commando) //Gives all the commandos internals cameras.
camera.network = "CREED"
camera.c_tag = new_commando.real_name
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(new_commando)
R.set_frequency(1441)
@@ -18,8 +18,6 @@
say_understands(var/other)
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/aihologram))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/carbon/human))
@@ -11,7 +11,7 @@
emote("deathgasp") //let the world KNOW WE ARE DEAD
//For ninjas exploding when they die./N
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:initialize)
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
src << browse(null, "window=spideros")//Just in case.
var/location = loc
explosion(location, 1, 2, 3, 4)
File diff suppressed because it is too large Load Diff
+287 -277
View File
@@ -11,7 +11,7 @@
set invisibility = 0
set background = 1
if (src.monkeyizing)
if (monkeyizing)
return
if(!loc) // Fixing a null error that occurs when the mob isn't found in the world -- TLE
@@ -19,7 +19,7 @@
var/datum/gas_mixture/environment = loc.return_air()
if (src.stat != 2) //still breathing
if (stat != 2) //still breathing
//First, resolve location and get a breath
@@ -36,7 +36,7 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
src.blinded = null
blinded = null
//Disease Check
handle_virus_updates()
@@ -135,42 +135,42 @@
handle_disabilities()
if (src.disabilities & 2)
if ((prob(1) && src.paralysis < 1 && src.r_epil < 1))
if (disabilities & 2)
if ((prob(1) && paralysis < 1 && r_epil < 1))
src << "\red You have a seizure!"
for(var/mob/O in viewers(src, null))
if(O == src)
continue
O.show_message(text("\red <B>[src] starts having a seizure!"), 1)
src.paralysis = max(10, src.paralysis)
src.make_jittery(1000)
if (src.disabilities & 4)
if ((prob(5) && src.paralysis <= 1 && src.r_ch_cou < 1))
src.drop_item()
paralysis = max(10, paralysis)
make_jittery(1000)
if (disabilities & 4)
if ((prob(5) && paralysis <= 1 && r_ch_cou < 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (src.disabilities & 8)
if ((prob(10) && src.paralysis <= 1 && src.r_Tourette < 1))
src.stunned = max(10, src.stunned)
if (disabilities & 8)
if ((prob(10) && paralysis <= 1 && r_Tourette < 1))
stunned = max(10, stunned)
spawn( 0 )
switch(rand(1, 3))
if(1)
emote("twitch")
if(2 to 3)
say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
var/old_x = src.pixel_x
var/old_y = src.pixel_y
src.pixel_x += rand(-2,2)
src.pixel_y += rand(-1,1)
var/old_x = pixel_x
var/old_y = pixel_y
pixel_x += rand(-2,2)
pixel_y += rand(-1,1)
sleep(2)
src.pixel_x = old_x
src.pixel_y = old_y
pixel_x = old_x
pixel_y = old_y
return
if (src.disabilities & 16)
if (disabilities & 16)
if (prob(10))
src.stuttering = max(10, src.stuttering)
if (src.brainloss >= 60 && src.stat != 2)
stuttering = max(10, stuttering)
if (brainloss >= 60 && stat != 2)
if (prob(7))
switch(pick(1,2,3))
if(1)
@@ -182,67 +182,67 @@
handle_mutations_and_radiation()
if(src.fireloss)
if(src.mutations & COLD_RESISTANCE || (prob(1) && prob(75)))
src.heal_organ_damage(0,1)
if(fireloss)
if(mutations & COLD_RESISTANCE || (prob(1) && prob(75)))
heal_organ_damage(0,1)
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
if (mutations & HULK && health <= 25)
mutations &= ~HULK
src << "\red You suddenly feel very weak."
src.weakened = 3
weakened = 3
emote("collapse")
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
src.weakened = 10
if (radiation)
if (radiation > 100)
radiation = 100
weakened = 10
src << "\red You feel weak."
emote("collapse")
if (src.radiation < 0)
src.radiation = 0
if (radiation < 0)
radiation = 0
switch(src.radiation)
switch(radiation)
if(1 to 49)
src.radiation--
radiation--
if(prob(25))
src.toxloss++
src.updatehealth()
toxloss++
updatehealth()
if(50 to 74)
src.radiation -= 2
src.toxloss++
radiation -= 2
toxloss++
if(prob(5))
src.radiation -= 5
src.weakened = 3
radiation -= 5
weakened = 3
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
updatehealth()
if(75 to 100)
src.radiation -= 3
src.toxloss += 3
radiation -= 3
toxloss += 3
if(prob(1))
src << "\red You mutate!"
randmutb(src)
domutcheck(src,null)
emote("gasp")
src.updatehealth()
updatehealth()
breathe()
if(src.reagents.has_reagent("lexorin")) return
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
// HACK NEED CHANGING LATER
if(src.health < 0)
src.losebreath++
if(health < 0)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
@@ -282,17 +282,17 @@
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(src.internal))
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
//if (src.internals) //should be unnecessary, uncomment if it isn't. -raftaf0
// src.internals.icon_state = "internal1"
//if (internals) //should be unnecessary, uncomment if it isn't. -raftaf0
// internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (src.internals)
src.internals.icon_state = "internal0"
if (internals)
internals.icon_state = "internal0"
return null
update_canmove()
@@ -300,11 +300,11 @@
else canmove = 1
handle_breath(datum/gas_mixture/breath)
if(src.nodamage)
if(nodamage)
return
if(!breath || (breath.total_moles() == 0))
if(src.reagents.has_reagent("inaprovaline"))
if(reagents.has_reagent("inaprovaline"))
return
oxyloss += 7
@@ -357,7 +357,7 @@
if(!co2overloadtime) // If it's the first breath with too much CO2 in it, lets start a counter, then have them pass out after 12s or so.
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
src.paralysis = max(src.paralysis, 3)
paralysis = max(paralysis, 3)
oxyloss += 3 // Lets hurt em a little, let them know we mean business
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
oxyloss += 8
@@ -378,15 +378,15 @@
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
var/SA_pp = (SA.moles/breath.total_moles())*breath_pressure
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
src.paralysis = max(src.paralysis, 3) // 3 gives them one second to wake up and run away a bit!
paralysis = max(paralysis, 3) // 3 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
src.sleeping = max(src.sleeping, 2)
sleeping = max(sleeping, 2)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0) emote(pick("giggle", "laugh"))
if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 1)
@@ -412,18 +412,18 @@
loc_temp = environment.temperature
var/thermal_protection = get_thermal_protection()
if(stat != 2 && abs(src.bodytemperature - 310.15) < 50)
src.bodytemperature += adjust_body_temperature(src.bodytemperature, 310.15, thermal_protection)
if(stat != 2 && abs(bodytemperature - 310.15) < 50)
bodytemperature += adjust_body_temperature(bodytemperature, 310.15, thermal_protection)
if(loc_temp < 310.15) // a cold place -> add in cold protection
src.bodytemperature += adjust_body_temperature(src.bodytemperature, loc_temp, 1/thermal_protection)
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1/thermal_protection)
else // a hot place -> add in heat protection
thermal_protection += add_fire_protection(loc_temp)
src.bodytemperature += adjust_body_temperature(src.bodytemperature, loc_temp, 1/thermal_protection)
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1/thermal_protection)
// lets give them a fair bit of leeway so they don't just start dying
//as that may be realistic but it's no fun
if((src.bodytemperature > (T0C + 50)) || (src.bodytemperature < (T0C + 10)) && (!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))) // Last bit is just disgusting, i know
if((bodytemperature > (T0C + 50)) || (bodytemperature < (T0C + 10)) && (!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))) // Last bit is just disgusting, i know
if(environment.temperature > (T0C + 50) || (environment.temperature < (T0C + 10)))
var/transfer_coefficient
@@ -532,7 +532,7 @@
thermal_protection += 3
if(head && (head.flags & HEADSPACE))
thermal_protection += 1
if(src.mutations & COLD_RESISTANCE)
if(mutations & COLD_RESISTANCE)
thermal_protection += 5
return thermal_protection
@@ -567,7 +567,7 @@
return fire_prot
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(src.nodamage)
if(nodamage)
return
var/discomfort = min(abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
@@ -613,17 +613,17 @@
if(oxyloss)
oxyloss--
if(overeatduration > 500 && !(src.mutations & FAT))
if(overeatduration > 500 && !(mutations & FAT))
src << "\red You suddenly feel blubbery!"
src.mutations |= FAT
mutations |= FAT
update_body()
if (overeatduration < 100 && src.mutations & FAT)
if (overeatduration < 100 && mutations & FAT)
src << "\blue You feel fit again!"
src.mutations &= ~FAT
mutations &= ~FAT
update_body()
// nutrition decrease
if (nutrition > 0 && src.stat != 2)
if (nutrition > 0 && stat != 2)
nutrition = max (0, nutrition - HUNGER_FACTOR)
if (nutrition > 450)
@@ -637,12 +637,12 @@
if(nutrition < 200)
take_overall_damage(2,0)
if (src.drowsyness)
src.drowsyness--
src.eye_blurry = max(2, src.eye_blurry)
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
src.sleeping = 1
src.paralysis = 5
sleeping = 1
paralysis = 5
confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0
@@ -653,7 +653,7 @@
dizziness = max(0, dizziness - 3)
jitteriness = max(0, jitteriness - 3)
src.updatehealth()
updatehealth()
return //TODO: DEFERRED
@@ -663,84 +663,84 @@
if(oxyloss > 50) paralysis = max(paralysis, 3)
if(src.sleeping)
src.paralysis = max(src.paralysis, 3)
if(sleeping)
paralysis = max(paralysis, 3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
sleeping--
if(src.resting)
src.weakened = max(src.weakened, 5)
if(resting)
weakened = max(weakened, 5)
if(health < -100 || src.brain_op_stage == 4.0)
if(health < -100 || brain_op_stage == 4.0)
death()
else if(src.health < 0)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
else if(health < 0)
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
//if(!rejuv) oxyloss++
if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(src.stat != 2) src.stat = 1
src.paralysis = max(src.paralysis, 5)
if(stat != 2) stat = 1
paralysis = max(paralysis, 5)
if (src.stat != 2) //Alive.
if (src.silent)
src.silent--
if (stat != 2) //Alive.
if (silent)
silent--
if (src.paralysis || src.stunned || src.weakened || changeling_fakedeath) //Stunned etc.
if (src.stunned > 0)
src.stunned--
src.stat = 0
if (src.weakened > 0)
src.weakened--
src.lying = 1
src.stat = 0
if (src.paralysis > 0)
src.paralysis--
src.blinded = 1
src.lying = 1
src.stat = 1
var/h = src.hand
src.hand = 0
if (paralysis || stunned || weakened || changeling_fakedeath) //Stunned etc.
if (stunned > 0)
stunned--
stat = 0
if (weakened > 0)
weakened--
lying = 1
stat = 0
if (paralysis > 0)
paralysis--
blinded = 1
lying = 1
stat = 1
var/h = hand
hand = 0
drop_item()
src.hand = 1
hand = 1
drop_item()
src.hand = h
hand = h
else //Not stunned.
src.lying = 0
src.stat = 0
lying = 0
stat = 0
else //Dead.
src.lying = 1
src.blinded = 1
src.stat = 2
src.silent = 0
lying = 1
blinded = 1
stat = 2
silent = 0
if (src.stuttering) src.stuttering--
if (stuttering) stuttering--
if (src.eye_blind)
src.eye_blind--
src.blinded = 1
if (eye_blind)
eye_blind--
blinded = 1
if (src.ear_deaf > 0) src.ear_deaf--
if (src.ear_damage < 25)
src.ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0)
if (ear_deaf > 0) ear_deaf--
if (ear_damage < 25)
ear_damage -= 0.05
ear_damage = max(ear_damage, 0)
src.density = !( src.lying )
density = !( lying )
if ((src.sdisabilities & 1 || istype(src.glasses, /obj/item/clothing/glasses/blindfold)))
src.blinded = 1
if ((src.sdisabilities & 4 || istype(src.ears, /obj/item/clothing/ears/earmuffs)))
src.ear_deaf = 1
if ((sdisabilities & 1 || istype(glasses, /obj/item/clothing/glasses/blindfold)))
blinded = 1
if ((sdisabilities & 4 || istype(ears, /obj/item/clothing/ears/earmuffs)))
ear_deaf = 1
if (src.eye_blurry > 0)
src.eye_blurry--
src.eye_blurry = max(0, src.eye_blurry)
if (eye_blurry > 0)
eye_blurry--
eye_blurry = max(0, eye_blurry)
if (src.druggy > 0)
src.druggy--
src.druggy = max(0, src.druggy)
if (druggy > 0)
druggy--
druggy = max(0, druggy)
return 1
@@ -751,16 +751,16 @@
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
del(hud)
if (src.stat == 2 || src.mutations & XRAY)
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
if(!src.druggy)
src.see_invisible = 2
if (stat == 2 || mutations & XRAY)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
if(!druggy)
see_invisible = 2
else if (src.seer)
var/obj/rune/R = locate() in src.loc
else if (seer)
var/obj/rune/R = locate() in loc
if (istype(R) && R.word1 == wordsee && R.word2 == wordhell && R.word3 == wordjoin)
see_invisible = 15
else
@@ -768,6 +768,16 @@
see_invisible = 0
else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
switch(wear_mask:mode)
if(0)
if(client)
var/target_list[] = list()
for(var/mob/living/target in oview(src))
if( target.mind&&(target.mind.special_role||issilicon(target)) )//They need to have a mind.
target_list += target
if(target_list.len)//Everything else is handled by the ninja mask proc.
wear_mask:assess_targets(target_list, src)
if (!druggy)
see_invisible = 0
if(1)
see_in_dark = 5
if(!druggy)
@@ -781,22 +791,22 @@
if(!druggy)
see_invisible = 0
else if (istype(src.glasses, /obj/item/clothing/glasses/meson))
src.sight |= SEE_TURFS
if(!src.druggy)
src.see_invisible = 0
else if (istype(src.glasses, /obj/item/clothing/glasses/night))
src.see_in_dark = 5
if(!src.druggy)
src.see_invisible = 0
else if (istype(src.glasses, /obj/item/clothing/glasses/thermal))
src.sight |= SEE_MOBS
if(!src.druggy)
src.see_invisible = 2
else if (istype(src.glasses, /obj/item/clothing/glasses/material))
src.sight |= SEE_OBJS
if (!src.druggy)
src.see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/meson))
sight |= SEE_TURFS
if(!druggy)
see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/night))
see_in_dark = 5
if(!druggy)
see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/thermal))
sight |= SEE_MOBS
if(!druggy)
see_invisible = 2
else if (istype(glasses, /obj/item/clothing/glasses/material))
sight |= SEE_OBJS
if (!druggy)
see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/hud/security))
if(client)
var/icon/tempHud = 'hud.dmi'
@@ -820,8 +830,8 @@
break
else
client.images += image(tempHud,perp,"hudunknown")
if (!src.druggy)
src.see_invisible = 0
if (!druggy)
see_invisible = 0
else if (istype(glasses, /obj/item/clothing/glasses/hud/health))
if(client)
var/icon/tempHud = 'hud.dmi'
@@ -835,130 +845,130 @@
client.images += image(tempHud,patient,"hudill")
else
client.images += image(tempHud,patient,"hudhealthy")
if (!src.druggy)
src.see_invisible = 0
if (!druggy)
see_invisible = 0
else if (src.stat != 2)
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_MOBS
src.sight &= ~SEE_OBJS
if (src.mutantrace == "lizard" || src.mutantrace == "metroid")
src.see_in_dark = 3
src.see_invisible = 1
else if (src.druggy) // If drugged~
src.see_in_dark = 2
else if (stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
if (mutantrace == "lizard" || mutantrace == "metroid")
see_in_dark = 3
see_invisible = 1
else if (druggy) // If drugged~
see_in_dark = 2
//see_invisible regulated by drugs themselves.
else
src.see_in_dark = 2
see_in_dark = 2
var/seer = 0
for(var/obj/rune/R in world)
if(src.loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
if(loc==R.loc && R.word1==wordsee && R.word2==wordhell && R.word3==wordjoin)
seer = 1
if(!seer)
src.see_invisible = 0
see_invisible = 0
else if (istype(src.glasses, /obj/item/clothing/glasses/sunglasses))
src.see_in_dark = 1
else if (istype(src.head, /obj/item/clothing/head/helmet/welding))
if(!src.head:up && tinted_weldhelh)
src.see_in_dark = 1
else if (istype(glasses, /obj/item/clothing/glasses/sunglasses))
see_in_dark = 1
else if (istype(head, /obj/item/clothing/head/helmet/welding))
if(!head:up && tinted_weldhelh)
see_in_dark = 1
if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping)
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
if (rest) rest.icon_state = text("rest[]", resting)
if (src.healths)
if (src.stat != 2)
if (healths)
if (stat != 2)
switch(health)
if(100 to INFINITY)
src.healths.icon_state = "health0"
healths.icon_state = "health0"
if(80 to 100)
src.healths.icon_state = "health1"
healths.icon_state = "health1"
if(60 to 80)
src.healths.icon_state = "health2"
healths.icon_state = "health2"
if(40 to 60)
src.healths.icon_state = "health3"
healths.icon_state = "health3"
if(20 to 40)
src.healths.icon_state = "health4"
healths.icon_state = "health4"
if(0 to 20)
src.healths.icon_state = "health5"
healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
healths.icon_state = "health6"
else
src.healths.icon_state = "health7"
healths.icon_state = "health7"
if (src.nutrition_icon)
if (nutrition_icon)
switch(nutrition)
if(450 to INFINITY)
src.nutrition_icon.icon_state = "nutrition0"
nutrition_icon.icon_state = "nutrition0"
if(350 to 450)
src.nutrition_icon.icon_state = "nutrition1"
nutrition_icon.icon_state = "nutrition1"
if(250 to 350)
src.nutrition_icon.icon_state = "nutrition2"
nutrition_icon.icon_state = "nutrition2"
if(150 to 250)
src.nutrition_icon.icon_state = "nutrition3"
nutrition_icon.icon_state = "nutrition3"
else
src.nutrition_icon.icon_state = "nutrition4"
nutrition_icon.icon_state = "nutrition4"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
if(src.resting || src.lying || src.sleeping) src.rest.icon_state = "rest[(src.resting || src.lying || src.sleeping) ? 1 : 0]"
if(resting || lying || sleeping) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
switch(src.bodytemperature) //310.055 optimal body temp
switch(bodytemperature) //310.055 optimal body temp
if(370 to INFINITY)
src.bodytemp.icon_state = "temp4"
bodytemp.icon_state = "temp4"
if(350 to 370)
src.bodytemp.icon_state = "temp3"
bodytemp.icon_state = "temp3"
if(335 to 350)
src.bodytemp.icon_state = "temp2"
bodytemp.icon_state = "temp2"
if(320 to 335)
src.bodytemp.icon_state = "temp1"
bodytemp.icon_state = "temp1"
if(300 to 320)
src.bodytemp.icon_state = "temp0"
bodytemp.icon_state = "temp0"
if(295 to 300)
src.bodytemp.icon_state = "temp-1"
bodytemp.icon_state = "temp-1"
if(280 to 295)
src.bodytemp.icon_state = "temp-2"
bodytemp.icon_state = "temp-2"
if(260 to 280)
src.bodytemp.icon_state = "temp-3"
bodytemp.icon_state = "temp-3"
else
src.bodytemp.icon_state = "temp-4"
bodytemp.icon_state = "temp-4"
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
src.client.screen -= src.hud_used.darkMask
client.screen -= hud_used.blurry
client.screen -= hud_used.druggy
client.screen -= hud_used.vimpaired
client.screen -= hud_used.darkMask
if ((src.blind && src.stat != 2))
if ((src.blinded))
src.blind.layer = 18
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
src.blind.layer = 0
blind.layer = 0
if (src.disabilities & 1 && !istype(src.glasses, /obj/item/clothing/glasses/regular) )
src.client.screen += src.hud_used.vimpaired
if (disabilities & 1 && !istype(glasses, /obj/item/clothing/glasses/regular) )
client.screen += hud_used.vimpaired
if (src.eye_blurry)
src.client.screen += src.hud_used.blurry
if (eye_blurry)
client.screen += hud_used.blurry
if (src.druggy)
src.client.screen += src.hud_used.druggy
if (druggy)
client.screen += hud_used.druggy
if (istype(src.head, /obj/item/clothing/head/helmet/welding))
if(!src.head:up && tinted_weldhelh)
src.client.screen += src.hud_used.darkMask
if (istype(head, /obj/item/clothing/head/helmet/welding))
if(!head:up && tinted_weldhelh)
client.screen += hud_used.darkMask
if (src.stat != 2)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
if (stat != 2)
if (machine)
if (!( machine.check_eye(src) ))
reset_view(null)
else
if(!client.adminobs)
reset_view(null)
@@ -972,19 +982,19 @@
return
handle_virus_updates()
if(src.bodytemperature > 406 && src.virus)
src.virus.cure()
if(bodytemperature > 406 && virus)
virus.cure()
return
check_if_buckled()
if (src.buckled)
src.lying = istype(src.buckled, /obj/stool/bed) || istype(src.buckled, /obj/machinery/conveyor)
if(src.lying)
src.drop_item()
src.density = 1
if (buckled)
lying = istype(buckled, /obj/stool/bed) || istype(buckled, /obj/machinery/conveyor)
if(lying)
drop_item()
density = 1
else
src.density = !src.lying
density = !lying
handle_stomach()
spawn(0)
@@ -992,7 +1002,7 @@
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && src.stat != 2)
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
@@ -1001,73 +1011,73 @@
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
src.nutrition += 10
nutrition += 10
handle_changeling()
if (mind)
if (mind.special_role == "Changeling")
src.chem_charges = between(0, (max((0.9 - (chem_charges / 50)), 0.1) + chem_charges), 50)
chem_charges = between(0, (max((0.9 - (chem_charges / 50)), 0.1) + chem_charges), 50)
/*
// Commented out so hunger system won't be such shock
// Damage and effects from not eating
if(src.nutrition <= 50)
if(nutrition <= 50)
if (prob (0.1))
src << "\red Your stomach rumbles."
if (prob (10))
src.bruteloss++
bruteloss++
if (prob (5))
src << "You feel very weak."
src.weakened += rand(2, 3)
weakened += rand(2, 3)
*/
/*
snippets
if (src.mach)
if (src.machine)
src.mach.icon_state = "mach1"
if (mach)
if (machine)
mach.icon_state = "mach1"
else
src.mach.icon_state = null
mach.icon_state = null
if (!src.m_flag)
src.moved_recently = 0
src.m_flag = null
if (!m_flag)
moved_recently = 0
m_flag = null
if ((istype(src.loc, /turf/space) && !( locate(/obj/movable, src.loc) )))
if ((istype(loc, /turf/space) && !( locate(/obj/movable, loc) )))
var/layers = 20
// ******* Check
if (((istype(src.head, /obj/item/clothing/head) && src.head.flags & 4) || (istype(src.wear_mask, /obj/item/clothing/mask) && (!( src.wear_mask.flags & 4 ) && src.wear_mask.flags & 8))))
if (((istype(head, /obj/item/clothing/head) && head.flags & 4) || (istype(wear_mask, /obj/item/clothing/mask) && (!( wear_mask.flags & 4 ) && wear_mask.flags & 8))))
layers -= 5
if (istype(src.w_uniform, /obj/item/clothing/under))
if (istype(w_uniform, /obj/item/clothing/under))
layers -= 5
if ((istype(src.wear_suit, /obj/item/clothing/suit) && src.wear_suit.flags & 8))
if ((istype(wear_suit, /obj/item/clothing/suit) && wear_suit.flags & 8))
layers -= 10
if (layers > oxcheck)
oxcheck = layers
if(src.bodytemperature < 282.591 && (!src.firemut))
if(src.bodytemperature < 250)
src.fireloss += 4
src.updatehealth()
if(src.paralysis <= 2) src.paralysis += 2
else if(prob(1) && !src.paralysis)
if(src.paralysis <= 5) src.paralysis += 5
if(bodytemperature < 282.591 && (!firemut))
if(bodytemperature < 250)
fireloss += 4
updatehealth()
if(paralysis <= 2) paralysis += 2
else if(prob(1) && !paralysis)
if(paralysis <= 5) paralysis += 5
emote("collapse")
src << "\red You collapse from the cold!"
if(src.bodytemperature > 327.444 && (!src.firemut))
if(src.bodytemperature > 345.444)
if(!src.eye_blurry) src << "\red The heat blurs your vision!"
src.eye_blurry = max(4, src.eye_blurry)
if(prob(3)) src.fireloss += rand(1,2)
else if(prob(3) && !src.paralysis)
src.paralysis += 2
if(bodytemperature > 327.444 && (!firemut))
if(bodytemperature > 345.444)
if(!eye_blurry) src << "\red The heat blurs your vision!"
eye_blurry = max(4, eye_blurry)
if(prob(3)) fireloss += rand(1,2)
else if(prob(3) && !paralysis)
paralysis += 2
emote("collapse")
src << "\red You collapse from heat exaustion!"
plcheck = src.t_plasma
oxcheck = src.t_oxygen
plcheck = t_plasma
oxcheck = t_oxygen
G.turf_add(T, G.total_moles())
*/
@@ -76,8 +76,6 @@
/mob/living/carbon/human/say_understands(var/other)
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/aihologram))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/carbon/brain))
+3 -3
View File
@@ -13,9 +13,9 @@
if(L)
if (istype(L, /datum/ai_laws))
laws_object = L
laws = L
else
laws_object = new /datum/ai_laws/asimov
laws = new /datum/ai_laws/asimov
verbs += /mob/living/silicon/ai/proc/show_laws_verb
@@ -293,7 +293,7 @@
/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)
if(M:wear_suit:s_control)
M:wear_suit:transfer_ai("AICORE", "NINJASUIT", src, M)
else
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
+27 -27
View File
@@ -14,39 +14,39 @@
who << "<b>Obey these laws:</b>"
src.laws_sanity_check()
src.laws_object.show_laws(who)
src.laws.show_laws(who)
/mob/living/silicon/ai/proc/laws_sanity_check()
if (!src.laws_object)
src.laws_object = new /datum/ai_laws/asimov
if (!src.laws)
src.laws = new /datum/ai_laws/asimov
/mob/living/silicon/ai/proc/set_zeroth_law(var/law)
src.laws_sanity_check()
src.laws_object.set_zeroth_law(law)
src.laws.set_zeroth_law(law)
/mob/living/silicon/ai/proc/add_inherent_law(var/law)
src.laws_sanity_check()
src.laws_object.add_inherent_law(law)
src.laws.add_inherent_law(law)
/mob/living/silicon/ai/proc/clear_inherent_laws()
src.laws_sanity_check()
src.laws_object.clear_inherent_laws()
src.laws.clear_inherent_laws()
/mob/living/silicon/ai/proc/add_ion_law(var/law)
src.laws_sanity_check()
src.laws_object.add_ion_law(law)
src.laws.add_ion_law(law)
/mob/living/silicon/ai/proc/clear_ion_laws()
src.laws_sanity_check()
src.laws_object.clear_ion_laws()
src.laws.clear_ion_laws()
/mob/living/silicon/ai/proc/add_supplied_law(var/number, var/law)
src.laws_sanity_check()
src.laws_object.add_supplied_law(number, law)
src.laws.add_supplied_law(number, law)
/mob/living/silicon/ai/proc/clear_supplied_laws()
src.laws_sanity_check()
src.laws_object.clear_supplied_laws()
src.laws.clear_supplied_laws()
@@ -57,27 +57,27 @@
// set name = "State Laws"
src.say("Current Active Laws:")
//src.laws_sanity_check()
//src.laws_object.show_laws(world)
//src.laws.show_laws(world)
var/number = 1
sleep(10)
if (src.laws_object.zeroth)
if (src.laws.zeroth)
if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite
src.say("0. [src.laws_object.zeroth]")
src.say("0. [src.laws.zeroth]")
sleep(10)
for (var/index = 1, index <= src.laws_object.ion.len, index++)
var/law = src.laws_object.ion[index]
for (var/index = 1, index <= src.laws.ion.len, index++)
var/law = src.laws.ion[index]
var/num = ionnum()
if (length(law) > 0)
if (src.ioncheck[index] == "Yes")
src.say("[num]. [law]")
sleep(10)
for (var/index = 1, index <= src.laws_object.inherent.len, index++)
var/law = src.laws_object.inherent[index]
for (var/index = 1, index <= src.laws.inherent.len, index++)
var/law = src.laws.inherent[index]
if (length(law) > 0)
if (src.lawcheck[index+1] == "Yes")
@@ -86,8 +86,8 @@
number++
for (var/index = 1, index <= src.laws_object.supplied.len, index++)
var/law = src.laws_object.supplied[index]
for (var/index = 1, index <= src.laws.supplied.len, index++)
var/law = src.laws.supplied[index]
if (length(law) > 0)
if (src.lawcheck[number+1] == "Yes")
@@ -104,13 +104,13 @@
if (src.laws_object.zeroth)
if (src.laws.zeroth)
if (!src.lawcheck[1])
src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
list += {"<A href='byond://?src=\ref[src];lawc=0'>[src.lawcheck[1]] 0:</A> [src.laws_object.zeroth]<BR>"}
list += {"<A href='byond://?src=\ref[src];lawc=0'>[src.lawcheck[1]] 0:</A> [src.laws.zeroth]<BR>"}
for (var/index = 1, index <= src.laws_object.ion.len, index++)
var/law = src.laws_object.ion[index]
for (var/index = 1, index <= src.laws.ion.len, index++)
var/law = src.laws.ion[index]
if (length(law) > 0)
@@ -121,8 +121,8 @@
src.ioncheck.len += 1
var/number = 1
for (var/index = 1, index <= src.laws_object.inherent.len, index++)
var/law = src.laws_object.inherent[index]
for (var/index = 1, index <= src.laws.inherent.len, index++)
var/law = src.laws.inherent[index]
if (length(law) > 0)
src.lawcheck.len += 1
@@ -132,8 +132,8 @@
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
number++
for (var/index = 1, index <= src.laws_object.supplied.len, index++)
var/law = src.laws_object.supplied[index]
for (var/index = 1, index <= src.laws.supplied.len, index++)
var/law = src.laws.supplied[index]
if (length(law) > 0)
src.lawcheck.len += 1
if (!src.lawcheck[number+1])
+7 -1
View File
@@ -19,6 +19,13 @@
S.hologram.dir = direct
return//Whatever the case, return since you can't move anyway.
if(user.client)//To make AI holograms work. They will relay directions as long as they are centered on the object.
var/obj/machinery/holopad/T = user.client.eye//Client eye centers on an object.
if(istype(T)&&T.hologram&&T.master==user)//If there is a hologram and its master is the user.
T.hologram.loc = get_step(T.hologram, direct)
T.hologram.dir = direct
return//Relay move and then return if that's the case.
if(!old) return
var/dx = 0
@@ -32,7 +39,6 @@
else if(direct & WEST)
dx = -1
var/area/A = get_area(old)
var/list/old_types = dd_text2list("[A.type]", "/")
@@ -1,47 +0,0 @@
/mob/living/silicon/aihologram/New()
..()
if(parent_ai)
src.name = parent_ai:name
src.real_name = parent_ai:real_name
/mob/living/silicon/aihologram/Stat()
..()
statpanel("Status")
if (src.client.statpanel == "Status")
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/living/silicon/aihologram/proc/ai_roster()
set category = "AI Commands"
set name = "Show Crew Manifest"
var/dat = "<html><head><title>Crew Roster</title></head><body><b>Crew Roster:</b><br><br>"
for (var/datum/data/record/t in data_core.general)
dat += "[t.fields["name"]] - [t.fields["rank"]]<br>"
dat += "</body></html>"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
/mob/living/silicon/aihologram/ex_act(severity) //something immaterial is immune to bombs and everything else, really
return
/mob/living/silicon/aihologram/meteorhit(obj/O as obj)
return
/mob/living/silicon/aihologram/bullet_act(flag)
return
/mob/living/silicon/aihologram/Life()
if(src.stat)
del(src)
..()
/mob/living/silicon/aihologram/proc/back_to_ai()
set category = "AI Commands"
set name = "Return To AI"
del(src)
@@ -1,4 +0,0 @@
/mob/living/silicon/aihologram/Del() //can't "die" per se, so it's only Del()
if(parent_ai)
parent_ai:client = src.client //parent_ai is always an ai mob, so : is okay
..()
@@ -1,454 +0,0 @@
/mob/living/silicon/aihologram/emote(var/act)
var/param = null
if (findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/m_type = 1
for (var/obj/item/weapon/implant/I in src)
if (I.implanted)
I.trigger(act, src)
var/message
switch(act)
if ("airguitar")
if (!src.restrained())
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
m_type = 1
if ("blink")
message = "<B>[src]</B> blinks."
m_type = 1
if ("blink_r")
message = "<B>[src]</B> blinks rapidly."
m_type = 1
if ("bow")
if (!src.buckled)
var/M = null
if (param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if (!M)
param = null
if (param)
message = "<B>[src]</B> bows to [param]."
else
message = "<B>[src]</B> bows."
m_type = 1
if ("custom")
var/input = input("Choose an emote to display.") as text|null
if (!input)
return
input = sanitize(input)
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1
else if (input2 == "Hearable")
if (src.miming)
return
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
message = "<B>[src]</B> [input]"
if ("salute")
if (!src.buckled)
var/M = null
if (param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if (!M)
param = null
if (param)
message = "<B>[src]</B> salutes to [param]."
else
message = "<B>[src]</b> salutes."
m_type = 1
if ("choke")
if (!muzzled)
message = "<B>[src]</B> chokes!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if ("clap")
if (!src.restrained())
message = "<B>[src]</B> claps."
m_type = 2
if ("flap")
if (!src.restrained())
message = "<B>[src]</B> flaps his wings."
m_type = 2
if ("aflap")
if (!src.restrained())
message = "<B>[src]</B> flaps his wings ANGRILY!"
m_type = 2
if ("drool")
message = "<B>[src]</B> drools."
m_type = 1
if ("eyebrow")
message = "<B>[src]</B> raises an eyebrow."
m_type = 1
if ("chuckle")
if (!muzzled)
message = "<B>[src]</B> chuckles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("twitch")
message = "<B>[src]</B> twitches violently."
m_type = 1
if ("twitch_s")
message = "<B>[src]</B> twitches."
m_type = 1
if ("faint")
message = "<B>[src]</B> faints."
src.sleeping = 1
m_type = 1
if ("cough")
if (!muzzled)
message = "<B>[src]</B> coughs!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if ("frown")
message = "<B>[src]</B> frowns."
m_type = 1
if ("nod")
message = "<B>[src]</B> nods."
m_type = 1
if ("blush")
message = "<B>[src]</B> blushes."
m_type = 1
if ("gasp")
if (!muzzled)
message = "<B>[src]</B> gasps!"
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("deathgasp")
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
m_type = 1
if ("giggle")
if (!muzzled)
message = "<B>[src]</B> giggles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("glare")
var/M = null
if (param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if (!M)
param = null
if (param)
message = "<B>[src]</B> glares at [param]."
else
message = "<B>[src]</B> glares."
if ("stare")
var/M = null
if (param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if (!M)
param = null
if (param)
message = "<B>[src]</B> stares at [param]."
else
message = "<B>[src]</B> stares."
if ("look")
var/M = null
if (param)
for (var/mob/A in view(null, null))
if (param == A.name)
M = A
break
if (!M)
param = null
if (param)
message = "<B>[src]</B> looks at [param]."
else
message = "<B>[src]</B> looks."
m_type = 1
if ("grin")
message = "<B>[src]</B> grins."
m_type = 1
if ("cry")
if (!muzzled)
message = "<B>[src]</B> cries."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise. \He frowns."
m_type = 2
if ("sigh")
if (!muzzled)
message = "<B>[src]</B> sighs."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("laugh")
if (!muzzled)
message = "<B>[src]</B> laughs."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("mumble")
message = "<B>[src]</B> mumbles!"
m_type = 2
if ("grumble")
if (!muzzled)
message = "<B>[src]</B> grumbles!"
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("groan")
if (!muzzled)
message = "<B>[src]</B> groans!"
m_type = 2
else
message = "<B>[src]</B> makes a loud noise."
m_type = 2
if ("moan")
message = "<B>[src]</B> moans!"
m_type = 2
if ("johnny")
var/M
if (param)
M = param
if (!M)
param = null
else
message = "<B>[src]</B> says, \"[M], please. He had a family.\" [src.name] takes a drag from a cigarette and blows his name out in smoke."
m_type = 2
if ("point")
if (!src.restrained())
var/mob/M = null
if (param)
for (var/atom/A as mob|obj|turf|area in view(null, null))
if (param == A.name)
M = A
break
if (!M)
message = "<B>[src]</B> points."
else
M.point()
if (M)
message = "<B>[src]</B> points to [M]."
else
m_type = 1
if ("raise")
if (!src.restrained())
message = "<B>[src]</B> raises a hand."
m_type = 1
if("shake")
message = "<B>[src]</B> shakes \his head."
m_type = 1
if ("shrug")
message = "<B>[src]</B> shrugs."
m_type = 1
if ("signal")
if (!src.restrained())
var/t1 = round(text2num(param))
if (isnum(t1))
if (t1 <= 5 && (!src.r_hand || !src.l_hand))
message = "<B>[src]</B> raises [t1] finger\s."
else if (t1 <= 10 && (!src.r_hand && !src.l_hand))
message = "<B>[src]</B> raises [t1] finger\s."
m_type = 1
if ("smile")
message = "<B>[src]</B> smiles."
m_type = 1
if ("shiver")
message = "<B>[src]</B> shivers."
m_type = 2
if ("pale")
message = "<B>[src]</B> goes pale for a second."
m_type = 1
if ("tremble")
message = "<B>[src]</B> trembles in fear!"
m_type = 1
if ("sneeze")
if (!muzzled)
message = "<B>[src]</B> sneezes."
m_type = 2
else
message = "<B>[src]</B> makes a strange noise."
m_type = 2
if ("sniff")
message = "<B>[src]</B> sniffs."
m_type = 2
if ("snore")
if (!muzzled)
message = "<B>[src]</B> snores."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if ("whimper")
if (!muzzled)
message = "<B>[src]</B> whimpers."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if ("wink")
message = "<B>[src]</B> winks."
m_type = 1
if ("yawn")
if (!muzzled)
message = "<B>[src]</B> yawns."
m_type = 2
if ("collapse")
if (!src.paralysis)
src.paralysis += 2
message = "<B>[src]</B> collapses!"
m_type = 2
if("hug")
m_type = 1
if (!src.restrained())
var/M = null
if (param)
for (var/mob/A in view(1, null))
if (param == A.name)
M = A
break
if (M == src)
M = null
if (M)
message = "<B>[src]</B> hugs [M]."
else
message = "<B>[src]</B> hugs \himself."
if ("handshake")
m_type = 1
if (!src.restrained() && !src.r_hand)
var/mob/M = null
if (param)
for (var/mob/A in view(1, null))
if (param == A.name)
M = A
break
if (M == src)
M = null
if (M)
if (M.canmove && !M.r_hand && !M.restrained())
message = "<B>[src]</B> shakes hands with [M]."
else
message = "<B>[src]</B> holds out \his hand to [M]."
if("daps")
m_type = 1
if (!src.restrained())
var/M = null
if (param)
for (var/mob/A in view(1, null))
if (param == A.name)
M = A
break
if (M)
message = "<B>[src]</B> gives daps to [M]."
else
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
if ("scream")
if (!muzzled)
message = "<B>[src]</B> screams!"
m_type = 2
else
message = "<B>[src]</B> makes a very loud noise."
m_type = 2
if ("help")
src << "blink, blink_r, blush, bow-(none)/mob, burp, choke, chuckle, clap, collapse, cough,\ncry, custom, deathgasp, drool, eyebrow, frown, gasp, giggle, groan, grumble, handshake, hug-(none)/mob, glare-(none)/mob,\ngrin, laugh, look-(none)/mob, moan, mumble, nod, pale, point-atom, raise, salute, shake, shiver, shrug,\nsigh, signal-#1-10, smile, sneeze, sniff, snore, stare-(none)/mob, tremble, twitch, twitch_s, whimper,\nwink, yawn"
else
src << "\blue Unusable emote '[act]'. Say *help for a list."
if (message)
if (m_type & 1)
for (var/mob/O in viewers(src, null))
O.show_message(message, m_type)
else if (m_type & 2)
for (var/mob/O in hearers(src, null))
O.show_message(message, m_type)
@@ -1,5 +0,0 @@
/mob/living/silicon/aihologram/examine()
set src in oview()
usr << "\blue *---------*"
usr << text("\blue This is \icon[] <B>[]</B>!", src, src.name)
return
@@ -1,10 +0,0 @@
/obj/hud/proc/aihologram_hud()
src.station_explosion = new src.h_type( src )
src.station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start"
src.station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3"
return
@@ -1,25 +0,0 @@
//I don't even know -- Urist
//I do. -- NEOFite
/mob/living/silicon/aihologram/verb/show_laws_verb()
set category = "AI Commands"
set name = "Show Laws"
src.show_laws()
/mob/living/silicon/aihologram/show_laws(var/everyone = 0)
var/who
if (everyone)
who = world
else
who = src
who << "<b>Obey these laws:</b>"
src.laws_sanity_check()
src.ailaws.show_laws(who)
/mob/living/silicon/aihologram/proc/laws_sanity_check()
if (!src.ailaws)
src << "You are somehow an AI hologram without referencing a set of AI laws, so I got you a laws datum to prevent runtime errors."
src.ailaws = new /datum/ai_laws/asimov
@@ -1,10 +0,0 @@
/mob/living/silicon/aihologram/Login()
..()
src.client.screen = null
if (!isturf(src.loc))
src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE
return
@@ -1,16 +0,0 @@
/mob/living/silicon/aihologram/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon))
return 1
return ..()
/mob/living/silicon/aihologram/say_quote(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "queries, \"[text]\"";
else if (ending == "!")
return "declares, \"[copytext(text, 1, length(text))]\"";
return "states, \"[text]\"";
@@ -54,12 +54,12 @@
who << "<b>Obey these laws:</b>"
connected_ai.laws_sanity_check()
connected_ai.laws_object.show_laws(who)
connected_ai.laws.show_laws(who)
*/
/mob/living/silicon/robot/proc/lawsync()
var/datum/ai_laws/master = src.connected_ai.laws_object
var/datum/ai_laws/master = src.connected_ai.laws
var/temp
if (master)
src.laws.ion.len = master.ion.len
@@ -17,7 +17,7 @@
connected_ai = activeais()
if (connected_ai)
connected_ai.connected_robots += src
// laws = connected_ai.laws_object //The borg inherits its AI's laws
// laws = connected_ai.laws //The borg inherits its AI's laws
laws = new /datum/ai_laws
lawsync()
src << "<b>Unit slaved to [connected_ai.name], downloading laws.</b>"
@@ -613,7 +613,7 @@
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit)
return
/mob/living/silicon/robot/proc/allowed(mob/M)
+35 -13
View File
@@ -2,22 +2,22 @@
if (!message)
return
if (src.muted)
if (muted)
return
if (src.stat == 2)
if (stat == 2)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
return src.say_dead(message)
return say_dead(message)
// wtf?
if (src.stat)
if (stat)
return
if (length(message) >= 2)
if (copytext(message, 1, 3) == ":s")
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
src.robot_talk(message)
robot_talk(message)
else
return ..(message)
else
@@ -33,12 +33,35 @@
if (!message)
return
var/message_a = src.say_quote(message)
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span></i>"
var/message_a = say_quote(message)//Here so I don't have to define it again.
if(isAI(src)&&client)//For patching directly into AI holopads.
var/obj/machinery/holopad/T = client.eye//Client eye centers on an object.
if(istype(T)&&T.hologram&&T.master==src)//If there is a hologram and its master is the user.
//Human-like, sorta, heard by those who understand humans.
var/rendered_a = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
//Speach distorted, heard by those who do not understand AIs.
message = stars(message)
var/message_b = say_quote(message)
var/rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message'>[message_a]</span></span></i>"//The AI can "hear" its own message.
for(var/mob/M in hearers(T.loc))//The location is the object, default distance.
if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to.
M.show_message(rendered_a, 2)
else//If they do not.
M.show_message(rendered_b, 2)
/*Radios "filter out" this conversation channel so we don't need to account for them.
This is another way of saying that we won't bother dealing with them.*/
return
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/living/S in world)
if(!S.stat)
if(S.robot_talk_understand)
if(S.robot_talk_understand == src.robot_talk_understand)
if(S.robot_talk_understand == robot_talk_understand)
S.show_message(rendered, 2)
else if (S.binarycheck())
S.show_message(rendered, 2)
@@ -52,22 +75,21 @@
if(!istype(M, /mob/living/silicon) && !M.robot_talk_understand)
heard += M
if (length(heard))
var/message_b
message_b = "beep beep beep"
message_b = src.say_quote(message_b)
message_b = say_quote(message_b)
message_b = "<i>[message_b]</i>"
rendered = "<i><span class='game say'><span class='name'>[src.voice_name]</span> <span class='message'>[message_b]</span></span></i>"
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
for (var/mob/M in heard)
M.show_message(rendered, 2)
message = src.say_quote(message)
message = say_quote(message)
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span></i>"
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/M in world)
if (istype(M, /mob/new_player))
+30 -16
View File
@@ -276,18 +276,8 @@ mob/new_player
if(character.mind.assigned_role != "Cyborg")
ManifestLateSpawn(character)
if(ticker)
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)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind.assigned_role != "Cyborg")
announcer.say("[character.real_name] has signed up as [rank].")
var/starting_loc = pick(latejoin)
character.loc = starting_loc
character.loc = pick(latejoin)
AnnounceArrival(character, rank)
if(character.mind.assigned_role == "Cyborg")
character.Robotize()
del(src)
@@ -295,13 +285,24 @@ mob/new_player
else
src << alert("[rank] is not available. Please try another.")
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/ailist[] = list()
for (var/mob/living/silicon/ai/A in world)
if (!A.stat)
ailist += A
if (ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
if(character.mind.assigned_role != "Cyborg"&&character.mind.special_role != "MODE")
announcer.say("[character.real_name] has signed up as [rank].")
proc/ManifestLateSpawn(var/mob/living/carbon/human/H) // Attempted fix to add late joiners to various databases -- TLE
// This is basically ripped wholesale from the normal code for adding people to the databases during a fresh round
if (!isnull(H.mind) && (H.mind.assigned_role != "MODE"))
var/datum/data/record/G = new /datum/data/record( )
var/datum/data/record/M = new /datum/data/record( )
var/datum/data/record/S = new /datum/data/record( )
var/datum/data/record/G = new()
var/datum/data/record/M = new()
var/datum/data/record/S = new()
var/datum/data/record/L = new()
var/obj/item/weapon/card/id/C = H.wear_id
if (C)
G.fields["rank"] = C.assignment
@@ -322,7 +323,7 @@ mob/new_player
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
M.fields["b_type"] = text("[]", H.b_type)
M.fields["b_dna"] = "" //H.dna.unique_enzymes //nope. Scan them yourself, detective.
M.fields["b_dna"] = ""//H.dna.unique_enzymes
M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared."
M.fields["ma_dis"] = "None"
@@ -338,9 +339,22 @@ mob/new_player
S.fields["ma_crim"] = "None"
S.fields["ma_crim_d"] = "No major crime convictions."
S.fields["notes"] = "No notes."
//Begin locked reporting
L.fields["name"] = H.real_name
L.fields["sex"] = H.gender
L.fields["age"] = H.age
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["rank"] = H.mind.assigned_role
L.fields["b_type"] = H.b_type
L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["identity"] = H.dna.uni_identity
//End locked reporting
data_core.general += G
data_core.medical += M
data_core.security += S
data_core.locked += L
return
// This fxn creates positions for assistants based on existing positions. This could be more elegant.
+216 -144
View File
@@ -38,15 +38,87 @@ datum/preferences
New()
randomize_name()
..()
//The mob should have a gender you want before running this proc.
proc/randomize_appearance_for(var/mob/living/carbon/human/H)
if(H.gender == MALE)
gender = MALE
else
gender = FEMALE
randomize_skin_tone()
randomize_hair(gender)
randomize_hair_color("hair")
if(gender == MALE)//only for dudes.
randomize_facial()
randomize_hair_color("facial")
randomize_eyes_color()
underwear = pick(0,1)
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
age = rand(19,35)
copy_to(H)
proc/randomize_name()
if (gender == MALE)
real_name = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
else
real_name = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
proc/randomize_hair(var/gender)
//Women are more likely to have longer hair.
var/temp = gender==FEMALE&&prob(80) ? pick(2,6,8) : rand(1,9)
switch(temp)
if(1)
h_style = "Short Hair"
if(2)
h_style = "Long Hair"
if(3)
h_style = "Cut Hair"
if(4)
h_style = "Mohawk"
if(5)
h_style = "Balding"
if(6)
h_style = "Fag"
if(7)
h_style = "Bedhead"
if(8)
h_style = "Dreadlocks"
else
h_style = "bald"
proc/randomize_facial()
var/temp = prob(50) ? 14 : rand(1,13)//50% of not having a beard. Otherwise get a random one.
switch(temp)
if(1)
f_style = "Watson"
if(2)
f_style = "Chaplin"
if(3)
f_style = "Selleck"
if(4)
f_style = "Neckbeard"
if(5)
f_style = "Full Beard"
if(6)
f_style = "Long Beard"
if(7)
f_style = "Van Dyke"
if(8)
f_style = "Elvis"
if(9)
f_style = "Abe"
if(10)
f_style = "Chinstrap"
if(11)
f_style = "Hipster"
if(12)
f_style = "Goatee"
if(13)
f_style = "Hogan"
else
f_style = "bald"
proc/randomize_skin_tone()
var/tone
@@ -65,7 +137,7 @@ datum/preferences
if ("weird")
tone = -(rand (1, 220)) + 35
src.s_tone = min(max(tone + rand (-25, 25), -185), 34)
s_tone = min(max(tone + rand (-25, 25), -185), 34)
proc/randomize_hair_color(var/target = "hair")
if (prob (75) && target == "facial") // Chance to inherit hair color
@@ -180,27 +252,27 @@ datum/preferences
b_eyes = blue
proc/update_preview_icon()
del(src.preview_icon)
del(preview_icon)
var/g = "m"
if (src.gender == MALE)
if (gender == MALE)
g = "m"
else if (src.gender == FEMALE)
else if (gender == FEMALE)
g = "f"
src.preview_icon = new /icon('human.dmi', "body_[g]_s")
preview_icon = new /icon('human.dmi', "body_[g]_s")
// Skin tone
if (src.s_tone >= 0)
src.preview_icon.Blend(rgb(src.s_tone, src.s_tone, src.s_tone), ICON_ADD)
if (s_tone >= 0)
preview_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
src.preview_icon.Blend(rgb(-src.s_tone, -src.s_tone, -src.s_tone), ICON_SUBTRACT)
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
if (src.underwear > 0)
src.preview_icon.Blend(new /icon('human.dmi', "underwear[src.underwear]_[g]_s"), ICON_OVERLAY)
if (underwear > 0)
preview_icon.Blend(new /icon('human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
var/icon/eyes_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "eyes_s")
eyes_s.Blend(rgb(src.r_eyes, src.g_eyes, src.b_eyes), ICON_ADD)
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
var/h_style_r = null
switch(h_style)
@@ -255,10 +327,10 @@ datum/preferences
f_style_r = "bald"
var/icon/hair_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "[h_style_r]_s")
hair_s.Blend(rgb(src.r_hair, src.g_hair, src.b_hair), ICON_ADD)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
var/icon/facial_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "[f_style_r]_s")
facial_s.Blend(rgb(src.r_facial, src.g_facial, src.b_facial), ICON_ADD)
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
var/icon/mouth_s = new/icon("icon" = 'human_face.dmi', "icon_state" = "mouth_[g]_s")
@@ -266,7 +338,7 @@ datum/preferences
eyes_s.Blend(mouth_s, ICON_OVERLAY)
eyes_s.Blend(facial_s, ICON_OVERLAY)
src.preview_icon.Blend(eyes_s, ICON_OVERLAY)
preview_icon.Blend(eyes_s, ICON_OVERLAY)
del(mouth_s)
del(facial_s)
@@ -280,17 +352,17 @@ datum/preferences
var/list/destructive = assistant_occupations.Copy()
var/dat = "<html><body>"
dat += "<b>Name:</b> "
dat += "<a href=\"byond://?src=\ref[user];preferences=1;real_name=input\"><b>[src.real_name]</b></a> "
dat += "<a href=\"byond://?src=\ref[user];preferences=1;real_name=input\"><b>[real_name]</b></a> "
dat += "(<a href=\"byond://?src=\ref[user];preferences=1;real_name=random\">&reg;</A>) "
dat += "(&reg; = <a href=\"byond://?src=\ref[user];preferences=1;b_random_name=1\">[src.be_random_name ? "Yes" : "No"]</a>)"
dat += "(&reg; = <a href=\"byond://?src=\ref[user];preferences=1;b_random_name=1\">[be_random_name ? "Yes" : "No"]</a>)"
dat += "<br>"
dat += "<b>Gender:</b> <a href=\"byond://?src=\ref[user];preferences=1;gender=input\"><b>[src.gender == MALE ? "Male" : "Female"]</b></a><br>"
dat += "<b>Age:</b> <a href='byond://?src=\ref[user];preferences=1;age=input'>[src.age]</a>"
dat += "<b>Gender:</b> <a href=\"byond://?src=\ref[user];preferences=1;gender=input\"><b>[gender == MALE ? "Male" : "Female"]</b></a><br>"
dat += "<b>Age:</b> <a href='byond://?src=\ref[user];preferences=1;age=input'>[age]</a>"
dat += "<br>"
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[src.UI == 'screen1.dmi' ? "New" : "Old"]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[src.midis == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == 'screen1.dmi' ? "New" : "Old"]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
if(user.client.holder)
if(user.client.holder.rank)
@@ -299,23 +371,23 @@ datum/preferences
dat += "<a href='byond://?src=\ref[user];preferences=1;ooccolor=input'>Change colour</a> <font face=\"fixedsys\" size=\"3\" color=\"[ooccolor]\"><table bgcolor=\"[ooccolor]\"><tr><td>IM</td></tr></table></font>"
dat += "<hr><b>Occupation Choices</b><br>"
if (destructive.Find(src.occupation1))
if (destructive.Find(occupation1))
dat += "\t<a href=\"byond://?src=\ref[user];preferences=1;occ=1\"><b>[occupation1]</b></a><br>"
else
if (jobban_isbanned(user, src.occupation1))
src.occupation1 = "Assistant"
if (jobban_isbanned(user, src.occupation2))
src.occupation2 = "Assistant"
if (jobban_isbanned(user, src.occupation3))
src.occupation3 = "Assistant"
if (src.occupation1 != "No Preference")
if (jobban_isbanned(user, occupation1))
occupation1 = "Assistant"
if (jobban_isbanned(user, occupation2))
occupation2 = "Assistant"
if (jobban_isbanned(user, occupation3))
occupation3 = "Assistant"
if (occupation1 != "No Preference")
dat += "\tFirst Choice: <a href=\"byond://?src=\ref[user];preferences=1;occ=1\"><b>[occupation1]</b></a><br>"
if (destructive.Find(src.occupation2))
if (destructive.Find(occupation2))
dat += "\tSecond Choice: <a href=\"byond://?src=\ref[user];preferences=1;occ=2\"><b>[occupation2]</b></a><BR>"
else
if (src.occupation2 != "No Preference")
if (occupation2 != "No Preference")
dat += "\tSecond Choice: <a href=\"byond://?src=\ref[user];preferences=1;occ=2\"><b>[occupation2]</b></a><BR>"
dat += "\tLast Choice: <a href=\"byond://?src=\ref[user];preferences=1;occ=3\"><b>[occupation3]</b></a><BR>"
@@ -327,47 +399,47 @@ datum/preferences
dat += "<hr><table><tr><td><b>Body</b> "
dat += "(<a href=\"byond://?src=\ref[user];preferences=1;s_tone=random;underwear=random;age=random;b_type=random;hair=random;h_style=random;facial=random;f_style=random;eyes=random\">&reg;</A>)" // Random look
dat += "<br>"
dat += "Blood Type: <a href='byond://?src=\ref[user];preferences=1;b_type=input'>[src.b_type]</a><br>"
dat += "Skin Tone: <a href='byond://?src=\ref[user];preferences=1;s_tone=input'>[-src.s_tone + 35]/220<br></a>"
dat += "Blood Type: <a href='byond://?src=\ref[user];preferences=1;b_type=input'>[b_type]</a><br>"
dat += "Skin Tone: <a href='byond://?src=\ref[user];preferences=1;s_tone=input'>[-s_tone + 35]/220<br></a>"
if (!IsGuestKey(user.key))
dat += "Underwear: <a href =\"byond://?src=\ref[user];preferences=1;underwear=1\"><b>[src.underwear == 1 ? "Yes" : "No"]</b></a><br>"
dat += "Underwear: <a href =\"byond://?src=\ref[user];preferences=1;underwear=1\"><b>[underwear == 1 ? "Yes" : "No"]</b></a><br>"
dat += "</td><td><b>Preview</b><br><img src=previewicon.png height=64 width=64></td></tr></table>"
dat += "<hr><b>Hair</b><br>"
dat += "<a href='byond://?src=\ref[user];preferences=1;hair=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(src.r_hair, 2)][num2hex(src.g_hair, 2)][num2hex(src.b_hair, 2)]\"><table bgcolor=\"#[num2hex(src.r_hair, 2)][num2hex(src.g_hair, 2)][num2hex(src.b_hair)]\"><tr><td>IM</td></tr></table></font>"
dat += "<a href='byond://?src=\ref[user];preferences=1;hair=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair, 2)]\"><table bgcolor=\"#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair)]\"><tr><td>IM</td></tr></table></font>"
/*
dat += " <font color=\"#[num2hex(src.r_hair, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_hair=input'>[src.r_hair]</a>"
dat += " <font color=\"#00[num2hex(src.g_hair, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_hair=input'>[src.g_hair]</a>"
dat += " <font color=\"#0000[num2hex(src.b_hair, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_hair=input'>[src.b_hair]</a><br>"
dat += " <font color=\"#[num2hex(r_hair, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_hair=input'>[r_hair]</a>"
dat += " <font color=\"#00[num2hex(g_hair, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_hair=input'>[g_hair]</a>"
dat += " <font color=\"#0000[num2hex(b_hair, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_hair=input'>[b_hair]</a><br>"
*/
dat += "Style: <a href='byond://?src=\ref[user];preferences=1;h_style=input'>[src.h_style]</a>"
dat += "Style: <a href='byond://?src=\ref[user];preferences=1;h_style=input'>[h_style]</a>"
dat += "<hr><b>Facial</b><br>"
dat += "<a href='byond://?src=\ref[user];preferences=1;facial=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(src.r_facial, 2)][num2hex(src.g_facial, 2)][num2hex(src.b_facial, 2)]\"><table bgcolor=\"#[num2hex(src.r_facial, 2)][num2hex(src.g_facial, 2)][num2hex(src.b_facial)]\"><tr><td>GO</td></tr></table></font>"
dat += "<a href='byond://?src=\ref[user];preferences=1;facial=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial, 2)]\"><table bgcolor=\"#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial)]\"><tr><td>GO</td></tr></table></font>"
/*
dat += " <font color=\"#[num2hex(src.r_facial, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_facial=input'>[src.r_facial]</a>"
dat += " <font color=\"#00[num2hex(src.g_facial, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_facial=input'>[src.g_facial]</a>"
dat += " <font color=\"#0000[num2hex(src.b_facial, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_facial=input'>[src.b_facial]</a><br>"
dat += " <font color=\"#[num2hex(r_facial, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_facial=input'>[r_facial]</a>"
dat += " <font color=\"#00[num2hex(g_facial, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_facial=input'>[g_facial]</a>"
dat += " <font color=\"#0000[num2hex(b_facial, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_facial=input'>[b_facial]</a><br>"
*/
dat += "Style: <a href='byond://?src=\ref[user];preferences=1;f_style=input'>[src.f_style]</a>"
dat += "Style: <a href='byond://?src=\ref[user];preferences=1;f_style=input'>[f_style]</a>"
dat += "<hr><b>Eyes</b><br>"
dat += "<a href='byond://?src=\ref[user];preferences=1;eyes=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(src.r_eyes, 2)][num2hex(src.g_eyes, 2)][num2hex(src.b_eyes, 2)]\"><table bgcolor=\"#[num2hex(src.r_eyes, 2)][num2hex(src.g_eyes, 2)][num2hex(src.b_eyes)]\"><tr><td>KU</td></tr></table></font>"
dat += "<a href='byond://?src=\ref[user];preferences=1;eyes=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]\"><table bgcolor=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]\"><tr><td>KU</td></tr></table></font>"
/*
dat += " <font color=\"#[num2hex(src.r_eyes, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_eyes=input'>[src.r_eyes]</a>"
dat += " <font color=\"#00[num2hex(src.g_eyes, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_eyes=input'>[src.g_eyes]</a>"
dat += " <font color=\"#0000[num2hex(src.b_eyes, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_eyes=input'>[src.b_eyes]</a>"
dat += " <font color=\"#[num2hex(r_eyes, 2)]0000\">Red</font> - <a href='byond://?src=\ref[user];preferences=1;r_eyes=input'>[r_eyes]</a>"
dat += " <font color=\"#00[num2hex(g_eyes, 2)]00\">Green</font> - <a href='byond://?src=\ref[user];preferences=1;g_eyes=input'>[g_eyes]</a>"
dat += " <font color=\"#0000[num2hex(b_eyes, 2)]\">Blue</font> - <a href='byond://?src=\ref[user];preferences=1;b_eyes=input'>[b_eyes]</a>"
*/
dat += "<hr>"
dat += "<b>Be alien candidate:</b> <a href=\"byond://?src=\ref[user];preferences=1;be_alien=input\"><b>[src.be_alien == 1 ? "Yes" : "No"]</b></a><br>"
dat += "<b>Be alien candidate:</b> <a href=\"byond://?src=\ref[user];preferences=1;be_alien=input\"><b>[be_alien == 1 ? "Yes" : "No"]</b></a><br>"
if(!jobban_isbanned(user, "Syndicate"))
dat += "<b>Be syndicate?:</b> <a href =\"byond://?src=\ref[user];preferences=1;b_syndicate=1\"><b>[(src.be_syndicate ? "Yes" : "No")]</b></a><br>"
dat += "<b>Be syndicate?:</b> <a href =\"byond://?src=\ref[user];preferences=1;b_syndicate=1\"><b>[(be_syndicate ? "Yes" : "No")]</b></a><br>"
else
dat += "<b> You are banned from being syndicate.</b>"
src.be_syndicate = 0
be_syndicate = 0
dat += "<hr>"
if (!IsGuestKey(user.key))
@@ -420,70 +492,70 @@ datum/preferences
return
else
if (job == "No Preference")
src.occupation1 = "No Preference"
occupation1 = "No Preference"
else
if (job == src.occupation2)
job = src.occupation1
src.occupation1 = src.occupation2
src.occupation2 = job
if (job == occupation2)
job = occupation1
occupation1 = occupation2
occupation2 = job
else
if (job == src.occupation3)
job = src.occupation1
src.occupation1 = src.occupation3
src.occupation3 = job
if (job == occupation3)
job = occupation1
occupation1 = occupation3
occupation3 = job
else
src.occupation1 = job
occupation1 = job
if(2.0)
if (job == src.occupation2)
if (job == occupation2)
user << browse(null, "window=mob_occupation")
return
else
if (job == "No Preference")
if (src.occupation3 != "No Preference")
src.occupation2 = src.occupation3
src.occupation3 = "No Preference"
if (occupation3 != "No Preference")
occupation2 = occupation3
occupation3 = "No Preference"
else
src.occupation2 = "No Preference"
occupation2 = "No Preference"
else
if (job == src.occupation1)
if (src.occupation2 == "No Preference")
if (job == occupation1)
if (occupation2 == "No Preference")
user << browse(null, "window=mob_occupation")
return
job = src.occupation2
src.occupation2 = src.occupation1
src.occupation1 = job
job = occupation2
occupation2 = occupation1
occupation1 = job
else
if (job == src.occupation3)
job = src.occupation2
src.occupation2 = src.occupation3
src.occupation3 = job
if (job == occupation3)
job = occupation2
occupation2 = occupation3
occupation3 = job
else
src.occupation2 = job
occupation2 = job
if(3.0)
if (job == src.occupation3)
if (job == occupation3)
user << browse(null, "window=mob_occupation")
return
else
if (job == "No Preference")
src.occupation3 = "No Preference"
occupation3 = "No Preference"
else
if (job == src.occupation1)
if (src.occupation3 == "No Preference")
if (job == occupation1)
if (occupation3 == "No Preference")
user << browse(null, "window=mob_occupation")
return
job = src.occupation3
src.occupation3 = src.occupation1
src.occupation1 = job
job = occupation3
occupation3 = occupation1
occupation1 = job
else
if (job == src.occupation2)
if (src.occupation3 == "No Preference")
if (job == occupation2)
if (occupation3 == "No Preference")
user << browse(null, "window=mob_occupation")
return
job = src.occupation3
src.occupation3 = src.occupation2
src.occupation2 = job
job = occupation3
occupation3 = occupation2
occupation2 = job
else
src.occupation3 = job
occupation3 = job
user << browse(null, "window=mob_occupation")
ShowChoices(user)
@@ -497,9 +569,9 @@ datum/preferences
user << browse(null, "window=\ref[user]occupation")
return
else if(link_tags["job"])
src.SetJob(user, text2num(link_tags["occ"]), link_tags["job"])
SetJob(user, text2num(link_tags["occ"]), link_tags["job"])
else
src.SetChoices(user, text2num(link_tags["occ"]))
SetChoices(user, text2num(link_tags["occ"]))
return 1
@@ -517,30 +589,30 @@ datum/preferences
return
if("random")
src.randomize_name()
randomize_name()
if(new_name)
if(length(new_name) >= 26)
new_name = copytext(new_name, 1, 26)
src.real_name = new_name
real_name = new_name
if (link_tags["age"])
switch(link_tags["age"])
if ("input")
var/new_age = input(user, "Please select type in age: 20-45", "Character Generation") as num
if(new_age)
src.age = max(min(round(text2num(new_age)), 45), 20)
age = max(min(round(text2num(new_age)), 45), 20)
if ("random")
src.age = rand (20, 45)
age = rand (20, 45)
if (link_tags["b_type"])
switch(link_tags["b_type"])
if ("input")
var/new_b_type = input(user, "Please select a blood type:", "Character Generation") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
if (new_b_type)
src.b_type = new_b_type
b_type = new_b_type
if ("random")
src.b_type = pickweight ( list ("A+" = 31, "A-" = 7, "B+" = 8, "B-" = 2, "AB+" = 2, "AB-" = 1, "O+" = 40, "O-" = 9))
b_type = pickweight ( list ("A+" = 31, "A-" = 7, "B+" = 8, "B-" = 2, "AB+" = 2, "AB-" = 1, "O+" = 40, "O-" = 9))
if (link_tags["hair"])
@@ -548,9 +620,9 @@ datum/preferences
if ("input")
var/new_hair = input(user, "Please select hair color.", "Character Generation") as color
if(new_hair)
src.r_hair = hex2num(copytext(new_hair, 2, 4))
src.g_hair = hex2num(copytext(new_hair, 4, 6))
src.b_hair = hex2num(copytext(new_hair, 6, 8))
r_hair = hex2num(copytext(new_hair, 2, 4))
g_hair = hex2num(copytext(new_hair, 4, 6))
b_hair = hex2num(copytext(new_hair, 6, 8))
if ("random")
randomize_hair_color("hair")
@@ -559,19 +631,19 @@ datum/preferences
var/new_component = input(user, "Please select red hair component: 1-255", "Character Generation") as text
if (new_component)
src.r_hair = max(min(round(text2num(new_component)), 255), 1)
r_hair = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["g_hair"])
var/new_component = input(user, "Please select green hair component: 1-255", "Character Generation") as text
if (new_component)
src.g_hair = max(min(round(text2num(new_component)), 255), 1)
g_hair = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["b_hair"])
var/new_component = input(user, "Please select blue hair component: 1-255", "Character Generation") as text
if (new_component)
src.b_hair = max(min(round(text2num(new_component)), 255), 1)
b_hair = max(min(round(text2num(new_component)), 255), 1)
*/
if (link_tags["facial"])
@@ -579,9 +651,9 @@ datum/preferences
if ("input")
var/new_facial = input(user, "Please select facial hair color.", "Character Generation") as color
if(new_facial)
src.r_facial = hex2num(copytext(new_facial, 2, 4))
src.g_facial = hex2num(copytext(new_facial, 4, 6))
src.b_facial = hex2num(copytext(new_facial, 6, 8))
r_facial = hex2num(copytext(new_facial, 2, 4))
g_facial = hex2num(copytext(new_facial, 4, 6))
b_facial = hex2num(copytext(new_facial, 6, 8))
if ("random")
randomize_hair_color("facial")
@@ -590,28 +662,28 @@ datum/preferences
var/new_component = input(user, "Please select red facial component: 1-255", "Character Generation") as text
if (new_component)
src.r_facial = max(min(round(text2num(new_component)), 255), 1)
r_facial = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["g_facial"])
var/new_component = input(user, "Please select green facial component: 1-255", "Character Generation") as text
if (new_component)
src.g_facial = max(min(round(text2num(new_component)), 255), 1)
g_facial = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["b_facial"])
var/new_component = input(user, "Please select blue facial component: 1-255", "Character Generation") as text
if (new_component)
src.b_facial = max(min(round(text2num(new_component)), 255), 1)
b_facial = max(min(round(text2num(new_component)), 255), 1)
*/
if (link_tags["eyes"])
switch(link_tags["eyes"])
if ("input")
var/new_eyes = input(user, "Please select eye color.", "Character Generation") as color
if(new_eyes)
src.r_eyes = hex2num(copytext(new_eyes, 2, 4))
src.g_eyes = hex2num(copytext(new_eyes, 4, 6))
src.b_eyes = hex2num(copytext(new_eyes, 6, 8))
r_eyes = hex2num(copytext(new_eyes, 2, 4))
g_eyes = hex2num(copytext(new_eyes, 4, 6))
b_eyes = hex2num(copytext(new_eyes, 6, 8))
if ("random")
randomize_eyes_color()
@@ -620,19 +692,19 @@ datum/preferences
var/new_component = input(user, "Please select red eyes component: 1-255", "Character Generation") as text
if (new_component)
src.r_eyes = max(min(round(text2num(new_component)), 255), 1)
r_eyes = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["g_eyes"])
var/new_component = input(user, "Please select green eyes component: 1-255", "Character Generation") as text
if (new_component)
src.g_eyes = max(min(round(text2num(new_component)), 255), 1)
g_eyes = max(min(round(text2num(new_component)), 255), 1)
if (link_tags["b_eyes"])
var/new_component = input(user, "Please select blue eyes component: 1-255", "Character Generation") as text
if (new_component)
src.b_eyes = max(min(round(text2num(new_component)), 255), 1)
b_eyes = max(min(round(text2num(new_component)), 255), 1)
*/
if (link_tags["s_tone"])
switch(link_tags["s_tone"])
@@ -641,84 +713,84 @@ datum/preferences
if("input")
var/new_tone = input(user, "Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
src.s_tone = max(min(round(text2num(new_tone)), 220), 1)
src.s_tone = -src.s_tone + 35
s_tone = max(min(round(text2num(new_tone)), 220), 1)
s_tone = -s_tone + 35
if (link_tags["h_style"])
switch(link_tags["h_style"])
if ("random")
if (src.gender == FEMALE)
src.h_style = pickweight ( list ("Cut Hair" = 5, "Short Hair" = 5, "Long Hair" = 5, "Mohawk" = 5, "Balding" = 1, "Fag" = 5, "Bedhead" = 5, "Dreadlocks" = 5, "Bald" = 5))
if (gender == FEMALE)
h_style = pickweight ( list ("Cut Hair" = 5, "Short Hair" = 5, "Long Hair" = 5, "Mohawk" = 5, "Balding" = 1, "Fag" = 5, "Bedhead" = 5, "Dreadlocks" = 5, "Bald" = 5))
else
src.h_style = pickweight ( list ("Cut Hair" = 5, "Short Hair" = 5, "Long Hair" = 5, "Mohawk" = 5, "Balding" = 5, "Fag" = 5, "Bedhead" = 5, "Dreadlocks" = 5, "Bald" = 5))
h_style = pickweight ( list ("Cut Hair" = 5, "Short Hair" = 5, "Long Hair" = 5, "Mohawk" = 5, "Balding" = 5, "Fag" = 5, "Bedhead" = 5, "Dreadlocks" = 5, "Bald" = 5))
if("input")
var/new_style = input(user, "Please select hair style", "Character Generation") as null|anything in list( "Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Fag", "Bedhead", "Dreadlocks", "Bald" )
if (new_style)
src.h_style = new_style
h_style = new_style
if (link_tags["ooccolor"])
var/ooccolor = input(user, "Please select OOC colour.", "OOC colour") as color
if(ooccolor)
src.ooccolor = ooccolor
ooccolor = ooccolor
if (link_tags["f_style"])
switch(link_tags["f_style"])
if ("random")
if (src.gender == FEMALE)
src.f_style = pickweight ( list("Watson" = 1, "Chaplin" = 1, "Selleck" = 1, "Full Beard" = 1, "Long Beard" = 1, "Neckbeard" = 1, "Van Dyke" = 1, "Elvis" = 1, "Abe" = 1, "Chinstrap" = 1, "Hipster" = 1, "Goatee" = 1, "Hogan" = 1, "Shaved" = 100))
if (gender == FEMALE)
f_style = pickweight ( list("Watson" = 1, "Chaplin" = 1, "Selleck" = 1, "Full Beard" = 1, "Long Beard" = 1, "Neckbeard" = 1, "Van Dyke" = 1, "Elvis" = 1, "Abe" = 1, "Chinstrap" = 1, "Hipster" = 1, "Goatee" = 1, "Hogan" = 1, "Shaved" = 100))
else
src.f_style = pickweight ( list("Watson" = 1, "Chaplin" = 1, "Selleck" = 1, "Full Beard" = 1, "Long Beard" = 1, "Neckbeard" = 1, "Van Dyke" = 1, "Elvis" = 1, "Abe" = 1, "Chinstrap" = 1, "Hipster" = 1, "Goatee" = 1, "Hogan" = 1, "Shaved" = 10))
f_style = pickweight ( list("Watson" = 1, "Chaplin" = 1, "Selleck" = 1, "Full Beard" = 1, "Long Beard" = 1, "Neckbeard" = 1, "Van Dyke" = 1, "Elvis" = 1, "Abe" = 1, "Chinstrap" = 1, "Hipster" = 1, "Goatee" = 1, "Hogan" = 1, "Shaved" = 10))
if("input")
var/new_style = input(user, "Please select facial style", "Character Generation") as null|anything in list("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved")
if (new_style)
src.f_style = new_style
f_style = new_style
if (link_tags["gender"])
if (src.gender == MALE)
src.gender = FEMALE
if (gender == MALE)
gender = FEMALE
else
src.gender = MALE
gender = MALE
if (link_tags["UI"])
if (src.UI == 'screen1.dmi')
src.UI = 'screen1_old.dmi'
if (UI == 'screen1.dmi')
UI = 'screen1_old.dmi'
else
src.UI = 'screen1.dmi'
UI = 'screen1.dmi'
if (link_tags["midis"])
src.midis = (src.midis+1)%2
midis = (midis+1)%2
if (link_tags["be_alien"])
src.be_alien = (src.be_alien+1)%2
be_alien = (be_alien+1)%2
if (link_tags["underwear"])
if(!IsGuestKey(user.key))
switch(link_tags["underwear"])
if ("random")
if (prob (75))
src.underwear = 1
underwear = 1
else
src.underwear = 0
underwear = 0
if("input")
if (src.underwear == 1)
src.underwear = 0
if (underwear == 1)
underwear = 0
else
src.underwear = 1
underwear = 1
if (link_tags["b_syndicate"])
src.be_syndicate = !( src.be_syndicate )
be_syndicate = !( be_syndicate )
if (link_tags["b_random_name"])
src.be_random_name = !src.be_random_name
be_random_name = !be_random_name
if(!IsGuestKey(user.key))
if(link_tags["save"])
src.savefile_save(user)
savefile_save(user)
else if(link_tags["load"])
if (!src.savefile_load(user, 0))
if (!savefile_load(user, 0))
alert(user, "You do not have a savefile.")
if (link_tags["reset_all"])
@@ -749,7 +821,7 @@ datum/preferences
midis = 1
src.ShowChoices(user)
ShowChoices(user)
proc/copy_to(mob/living/carbon/human/character)
if(be_random_name)
+1 -1
View File
@@ -456,7 +456,7 @@
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("APC",src,user:wear_suit)
return
// do APC interaction
user.machine = src
+1 -1
View File
@@ -66,7 +66,7 @@
src.add_fingerprint(user)
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CELL",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CELL",src,user:wear_suit)
return
//Just because someone gets you occasionally with stun gloves doesn't mean you can put in code to kill everyone who tries to make some.
+1 -1
View File
@@ -185,7 +185,7 @@
if(ishuman(user))
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit,user:gloves)
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("SMES",src,user:wear_suit)
return
interact(user)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

+8057 -8047
View File
File diff suppressed because it is too large Load Diff
-10
View File
@@ -96,7 +96,6 @@
#define FILE_DIR "code/modules/mob/living/carbon/monkey"
#define FILE_DIR "code/modules/mob/living/silicon"
#define FILE_DIR "code/modules/mob/living/silicon/ai"
#define FILE_DIR "code/modules/mob/living/silicon/aihologram"
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
#define FILE_DIR "code/modules/mob/living/silicon/hivebot"
#define FILE_DIR "code/modules/mob/living/silicon/robot"
@@ -239,7 +238,6 @@
#include "code\defines\mob\living\silicon\ai.dm"
#include "code\defines\mob\living\silicon\decoy.dm"
#include "code\defines\mob\living\silicon\hivebot.dm"
#include "code\defines\mob\living\silicon\hologram.dm"
#include "code\defines\mob\living\silicon\robot.dm"
#include "code\defines\mob\living\silicon\silicon.dm"
#include "code\defines\obj\assemblies.dm"
@@ -714,14 +712,6 @@
#include "code\modules\mob\living\silicon\ai\logout.dm"
#include "code\modules\mob\living\silicon\ai\move.dm"
#include "code\modules\mob\living\silicon\ai\say.dm"
#include "code\modules\mob\living\silicon\aihologram\aihologram.dm"
#include "code\modules\mob\living\silicon\aihologram\death.dm"
#include "code\modules\mob\living\silicon\aihologram\emote.dm"
#include "code\modules\mob\living\silicon\aihologram\examine.dm"
#include "code\modules\mob\living\silicon\aihologram\hud.dm"
#include "code\modules\mob\living\silicon\aihologram\laws.dm"
#include "code\modules\mob\living\silicon\aihologram\login.dm"
#include "code\modules\mob\living\silicon\aihologram\say.dm"
#include "code\modules\mob\living\silicon\decoy\death.dm"
#include "code\modules\mob\living\silicon\decoy\decoy.dm"
#include "code\modules\mob\living\silicon\decoy\life.dm"