#Added an check for range/items when trying to insert an ID card/update info into a PDA. It should no longer run time error.

#Added a Halogen Counter function for engineering PDAs. Measures radiation of a mob.
#Brain/MMI code overhaul. Brains/MMIs should no longer screw up when the brain is deleted. MMIs should now properly eject from cyborgs if they are blown up, among other changes. Brains no longer die when transferred between containers but won't be able to speak without a container.
#Added a research MMI that comes with a radio built in. The brain can toggle the radio functions on or off via verb panel (MMI).
#Traitor code words will now use the crew roster for name generation 70% of the time.
#Ghostize() is now a lot more robust. If you need to throw someone into a ghost if they are killed/whatever, use it.
#Deleting a mob will now spawn a ghost for it through ghostize(), if it has a key, so you don't need to worry about that. You can null key people if you want to kick them out of the game.
#Ghost verbs are now in their own panel (Ghost). ghost() is the proc/verb that mobs get to turn into ghosts. ghostize() is now a proc only used through other procs.
#Changed how ninjas get their verbs. Long story short, wizards are now able to mind swap with ninjas. Stay hidden Snake! Also, more code improvements and additions to ninjas, including more fun for the AI.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1607 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-05-21 05:06:53 +00:00
parent b318f77795
commit a9d2227518
58 changed files with 2209 additions and 1989 deletions

View File

@@ -8,7 +8,7 @@
invocation = "GIN'YU CAPAN" invocation = "GIN'YU CAPAN"
invocation_type = "whisper" invocation_type = "whisper"
range = 7 range = 7
var/list/protected_roles = list("Wizard","Fake Wizard","Changeling","Cultist","Space Ninja") //which roles are immune to the spell var/list/protected_roles = list("Wizard","Fake Wizard","Changeling","Cultist") //which roles are immune to the spell
var/list/compatible_mobs = list("/mob/living/carbon/human","/mob/living/carbon/monkey") //which types of mobs are affected by the spell. NOTE: change at your own risk var/list/compatible_mobs = list("/mob/living/carbon/human","/mob/living/carbon/monkey") //which types of mobs are affected by the spell. NOTE: change at your own risk
var/base_spell_loss_chance = 5 //base probability of the wizard losing a spell in the process var/base_spell_loss_chance = 5 //base probability of the wizard losing a spell in the process
var/spell_loss_chance_modifier = 7 //amount of probability of losing a spell added per spell (mind_transfer included) var/spell_loss_chance_modifier = 7 //amount of probability of losing a spell added per spell (mind_transfer included)

View File

@@ -32,7 +32,7 @@
var/obj/item/weapon/cell/cell = null var/obj/item/weapon/cell/cell = null
var/obj/machinery/camera/camera = null var/obj/machinery/camera/camera = null
var/obj/item/device/mmi/brain = null var/obj/item/device/mmi/mmi = null
var/opened = 0 var/opened = 0
var/emagged = 0 var/emagged = 0

View File

@@ -26,6 +26,12 @@
// var/list/obj/hallucination/hallucinations = list() - Not used at all - Skie // 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.
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.
*/
var/alien_egg_flag = 0 var/alien_egg_flag = 0
var/last_special = 0 var/last_special = 0
var/obj/screen/zone_sel/zone_sel = null var/obj/screen/zone_sel/zone_sel = null
@@ -40,79 +46,79 @@
var/other_mobs = null var/other_mobs = null
var/memory = "" var/memory = ""
var/poll_answer = 0.0 var/poll_answer = 0.0
var/sdisabilities = 0 var/sdisabilities = 0//Carbon
var/disabilities = 0 var/disabilities = 0//Carbon
var/atom/movable/pulling = null var/atom/movable/pulling = null
var/stat = 0.0 var/stat = 0.0
var/next_move = null var/next_move = null
var/prev_move = null var/prev_move = null
var/monkeyizing = null var/monkeyizing = null//Human, maybe Carbon
var/other = 0.0 var/other = 0.0
var/hand = null var/hand = null
var/eye_blind = null var/eye_blind = null//Carbon
var/eye_blurry = null var/eye_blurry = null//Carbon
var/ear_deaf = null var/ear_deaf = null//Carbon
var/ear_damage = null var/ear_damage = null//Carbon
var/stuttering = null var/stuttering = null//Carbon
var/real_name = null var/real_name = null
var/blinded = null var/blinded = null
var/bhunger = 0 var/bhunger = 0//Carbon
var/ajourn = 0 var/ajourn = 0
var/rejuv = null var/rejuv = null
var/druggy = 0 var/druggy = 0//Carbon
var/confused = 0 var/confused = 0//Carbon
var/antitoxs = null var/antitoxs = null
var/plasma = null var/plasma = null
var/sleeping = 0.0 var/sleeping = 0.0//Carbon
var/resting = 0.0 var/resting = 0.0//Carbon
var/lying = 0.0 var/lying = 0.0
var/canmove = 1.0 var/canmove = 1.0
var/eye_stat = null var/eye_stat = null//Living, potentially Carbon
var/oxyloss = 0.0 var/oxyloss = 0.0//Living
var/toxloss = 0.0 var/toxloss = 0.0//Living
var/fireloss = 0.0 var/fireloss = 0.0//Living
var/timeofdeath = 0.0 var/bruteloss = 0.0//Living
var/bruteloss = 0.0 var/timeofdeath = 0.0//Living
var/cpr_time = 1.0 var/cpr_time = 1.0//Carbon
var/health = 100 var/health = 100//Living
var/bodytemperature = 310.055 //98.7 F var/bodytemperature = 310.055 //98.7 F
var/drowsyness = 0.0 var/drowsyness = 0.0//Carbon
var/dizziness = 0 var/dizziness = 0//Carbon
var/is_dizzy = 0 var/is_dizzy = 0
var/is_jittery = 0 var/is_jittery = 0
var/jitteriness = 0 var/jitteriness = 0//Carbon
var/charges = 0.0 var/charges = 0.0
var/nutrition = 400.0 var/nutrition = 400.0//Carbon
var/overeatduration = 0 // How long this guy is overeating var/overeatduration = 0 // How long this guy is overeating //Carbon
var/paralysis = 0.0 var/paralysis = 0.0
var/stunned = 0.0 var/stunned = 0.0
var/weakened = 0.0 var/weakened = 0.0
var/losebreath = 0.0 var/losebreath = 0.0//Carbon
var/metabslow = 0 // Metabolism slowed var/metabslow = 0 // Metabolism slowed//Carbon
var/intent = null var/intent = null//Living
var/shakecamera = 0 var/shakecamera = 0
var/a_intent = "help" var/a_intent = "help"//Living
var/m_int = null var/m_int = null//Living
var/m_intent = "run" var/m_intent = "run"//Living
var/lastDblClick = 0 var/lastDblClick = 0
var/lastKnownIP = null var/lastKnownIP = null
var/obj/stool/buckled = null var/obj/stool/buckled = null//Living, unless you can buckle silicons.
var/obj/item/weapon/handcuffs/handcuffed = null var/obj/item/weapon/handcuffs/handcuffed = null//Living, unless you can cuff silicons.
var/obj/item/l_hand = null var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null var/obj/item/weapon/back = null//Human
var/obj/item/weapon/tank/internal = null var/obj/item/weapon/tank/internal = null//Human/Monkey
var/obj/item/weapon/storage/s_active = null var/obj/item/weapon/storage/s_active = null//Carbon
var/obj/item/clothing/mask/wear_mask = null var/obj/item/clothing/mask/wear_mask = null//Carbon
var/r_epil = 0 var/r_epil = 0
var/r_ch_cou = 0 var/r_ch_cou = 0
var/r_Tourette = 0 var/r_Tourette = 0//Carbon
var/cloneloss = 0 var/cloneloss = 0//Carbon
var/seer = 0 //for cult var/seer = 0 //for cult//Carbon
var/miming = null //checks if the guy is a mime var/miming = null //checks if the guy is a mime//Human
var/silent = null //Can't talk. Value goes down every life proc. 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 var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment//Human
var/obj/hud/hud_used = null var/obj/hud/hud_used = null
@@ -131,25 +137,25 @@
var/music_lastplayed = "null" var/music_lastplayed = "null"
var/job = null var/job = null//Living
var/knowledge = 0.0 var/knowledge = 0.0
var/nodamage = 0 var/nodamage = 0
var/logged_in = 0 var/logged_in = 0
var/underwear = 1 var/underwear = 1//Human
var/be_syndicate = 0 var/be_syndicate = 0//This really should be a client variable.
var/be_random_name = 0 var/be_random_name = 0
var/const/blindness = 1 var/const/blindness = 1//Carbon
var/const/deafness = 2 var/const/deafness = 2//Carbon
var/const/muteness = 4 var/const/muteness = 4//Carbon
var/brainloss = 0 var/brainloss = 0//Carbon
var/datum/dna/dna = null var/datum/dna/dna = null//Carbon
var/radiation = 0.0 var/radiation = 0.0//Carbon
var/mutations = 0 var/mutations = 0//Carbon
//telekinesis = 1 //telekinesis = 1
//firemut = 2 //firemut = 2
//xray = 4 //xray = 4
@@ -175,7 +181,7 @@
mouse_drag_pointer = MOUSE_ACTIVE_POINTER mouse_drag_pointer = MOUSE_ACTIVE_POINTER
//Changeling mode stuff //Changeling mode stuff//Carbon
var/changeling_level = 0 var/changeling_level = 0
var/list/absorbed_dna = list() var/list/absorbed_dna = list()
var/changeling_fakedeath = 0 var/changeling_fakedeath = 0
@@ -189,7 +195,10 @@
var/robot_talk_understand = 0 var/robot_talk_understand = 0
var/alien_talk_understand = 0 var/alien_talk_understand = 0
//Ninja stuff. Was originally for Ruby Mode but since that didn't go anywhere, I'm hijacking it. /*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move
through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that
the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/
//0 is off, 1 is normal, 2 is for ninjas.
var/incorporeal_move = 0 var/incorporeal_move = 0

View File

@@ -730,6 +730,7 @@
/obj/overlay /obj/overlay
name = "overlay" name = "overlay"
unacidable = 1 unacidable = 1
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
/obj/portal /obj/portal
name = "portal" name = "portal"
@@ -1008,6 +1009,7 @@
anchored = 1 anchored = 1
unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr
//BEGIN BRAINS=====================================================
/obj/item/brain /obj/item/brain
name = "brain" name = "brain"
icon = 'surgery.dmi' icon = 'surgery.dmi'
@@ -1020,37 +1022,30 @@
throw_range = 5 throw_range = 5
origin_tech = "biotech=3" origin_tech = "biotech=3"
var/mob/living/carbon/human/owner = null var
var/mob/living/carbon/brain/brainmob = null mob/living/carbon/brain/brainmob = null
New()
/obj/item/brain/New() ..()
..() //Shifting the brain "mob" over to the brain object so it's easier to keep track of. --NEO
spawn(5) //WASSSSSUUUPPPP /N
if(src.owner) spawn(5)
src.name = "[src.owner]'s brain" if(brainmob&&brainmob.client)
//Shifting the brain "mob" over to the brain object so it's easier to keep track of. --NEO
brainmob = new /mob/living/carbon/brain
brainmob.loc = src
brainmob.name = owner.real_name
brainmob.real_name = owner.real_name
brainmob.dna = owner.dna
if(src.owner.mind)
src.owner.mind.transfer_to(brainmob)
brainmob.death() //the brain is dead until stuffed into an MMI. In which case it might still be dead if it's been beat up.
if(brainmob.client)
brainmob.client.screen.len = null //clear the hud brainmob.client.screen.len = null //clear the hud
brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out."
/obj/item/brain/Del() proc
if(src.brainmob) transfer_identity(var/mob/living/carbon/human/H)
if(src.brainmob.client) name = "[H]'s brain"
var/mob/dead/observer/newmob brainmob = new(src)
newmob = new/mob/dead/observer brainmob.name = H.real_name
newmob.loc = get_turf(src) brainmob.real_name = H.real_name
src.brainmob:client:mob = newmob brainmob.dna = H.dna
newmob:client:eye = newmob if(H.mind)
..() H.mind.transfer_to(brainmob)
brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out."
return
//END BRAINS=====================================================
/obj/noticeboard /obj/noticeboard
name = "Notice Board" name = "Notice Board"
@@ -1069,8 +1064,6 @@
desc = "Some clutter the detective has accumalated over the years..." desc = "Some clutter the detective has accumalated over the years..."
anchored = 1 anchored = 1
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER /obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
// TODO: robust mixology system! (and merge with beakers, maybe) // TODO: robust mixology system! (and merge with beakers, maybe)

View File

@@ -395,24 +395,30 @@
item_state = "s-ninja_suit" item_state = "s-ninja_suit"
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) allowed = list(/obj/item/weapon/gun,/obj/item/weapon/ammo,/obj/item/weapon/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
radiation_protection = 0.75 radiation_protection = 0.75
var/mob/living/carbon/affecting = null
var/active = 0//Stealth off.
var/kamikaze = 0//Kamikaze on or off.
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using new proc.
var/mob/living/silicon/AI = null//If there is an AI inside the suit. Paths to target.
var/flush = 0//If an AI purge is in progress.
var/control = 1//If in control of the suit.
var/initialize = 0//Suit starts off.
var/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.
var/unlock = 0
var/sbombs = 10.0//Number of starting ninja smoke bombs.
var/aboost = 3.0//Number of adrenaline boosters.
var/transfera = 20//How much reagent is transferred.
var/coold = 0//If the suit is on cooldown. Could be useful to attach different cooldowns to abilities I guess. It ticks down every second.
var/datum/effects/system/spark_spread/spark_system
slowdown = 1 slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30) armor = list(melee = 60, bullet = 50, laser = 30, taser = 15, bomb = 30, bio = 30, rad = 30)
var
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().
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.
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.
mob/living/silicon/AI = null//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.
/obj/item/clothing/suit/space/pirate /obj/item/clothing/suit/space/pirate
name = "pirate coat" name = "pirate coat"
desc = "Yarr." desc = "Yarr."

View File

@@ -73,9 +73,15 @@ var/syndicate_code_response//Code response for traitors.
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc. if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
switch(rand(1,2))//Mainly to add more options later. switch(rand(1,2))//Mainly to add more options later.
if(1) if(1)
code_phrase += pick(pick(first_names_male,first_names_female)) var/name_list[] = list()
code_phrase += " " for(var/datum/data/record/t in data_core.general)//Picks from crew manifest.
code_phrase += pick(last_names) name_list.Add(t.fields["name"])
if(name_list.len&&prob(70))
code_phrase += pick(name_list)
else
code_phrase += pick(pick(first_names_male,first_names_female))
code_phrase += " "
code_phrase += pick(last_names)
if(2) if(2)
code_phrase += pick(get_all_jobs())//Returns a job. code_phrase += pick(get_all_jobs())//Returns a job.
safety.Remove(1) safety.Remove(1)

View File

@@ -100,19 +100,11 @@
src:life() src:life()
/obj/bhole/Bumped(atom/A) /obj/bhole/Bumped(atom/A)
var/mob/dead/observer/newmob if (istype(A,/mob/living))
if (istype(A,/mob/living) && A:client)
newmob = new/mob/dead/observer(A)
A:client:mob = newmob
newmob:client:eye = newmob
del(A)
else if (istype(A,/mob/living) && !A:client)
del(A) del(A)
else else
A:ex_act(1.0) A:ex_act(1.0)
/obj/bhole/proc/life() //Oh man , this will LAG /obj/bhole/proc/life() //Oh man , this will LAG
if (prob(10)) if (prob(10))
@@ -167,13 +159,7 @@
//if (hascall(D,"blackholed")) //if (hascall(D,"blackholed"))
// call(D,"blackholed")(null) // call(D,"blackholed")(null)
// continue // continue
var/mob/dead/observer/newmob if (istype(D,/mob/living))
if (istype(D,/mob/living) && D:client)
newmob = new/mob/dead/observer(D)
D:client:mob = newmob
newmob:client:eye = newmob
del(D)
else if (istype(D,/mob/living) && !D:client)
del(D) del(D)
else else
D:ex_act(1.0) D:ex_act(1.0)

View File

@@ -13,263 +13,269 @@ 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. //Cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
/mob/proc/ninjacost(var/C = 0,var/X = 0) /obj/item/clothing/suit/space/space_ninja/proc/ninjacost(var/C = 0,var/X = 0)
var/mob/living/carbon/human/U = src var/mob/living/carbon/human/U = affecting
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
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. 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. 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.
return 1 return 1
else if(C&&S.cell.charge<C*10) else if(C&&cell.charge<C*10)
U << "\red Not enough energy." U << "\red Not enough energy."
return 1 return 1
switch(X) switch(X)
if(1) if(1)
if(S.active) if(active)
U << "\red You must deactivate the CLOAK-tech device prior to using this ability." U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 1 return 1
if(2) if(2)
if(S.sbombs<=0) if(sbombs<=0)
U << "\red There are no more smoke bombs remaining." U << "\red There are no more smoke bombs remaining."
return 1 return 1
if(3) if(3)
if(S.aboost<=0) if(aboost<=0)
U << "\red You do not have any more adrenaline boosters." U << "\red You do not have any more adrenaline boosters."
return 1 return 1
return (S.coold)//Returns the value of the variable which counts down to zero. return (coold)//Returns the value of the variable which counts down to zero.
//Smoke //Smoke
//Summons smoke in radius of user. //Summons smoke in radius of user.
//Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs. //Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.
/mob/proc/ninjasmoke() /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
set name = "Smoke Bomb" set name = "Smoke Bomb"
set desc = "Blind your enemies momentarily with a well-placed smoke bomb." set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0//Will not see it when right clicking.
if(!ninjacost(,2)) if(!ninjacost(,2))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
S.sbombs-- U << "\blue There are <B>[sbombs]</B> smoke bombs remaining."
src << "\blue There are <B>[S.sbombs]</B> smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread() var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, loc) smoke.set_up(10, 0, U.loc)
smoke.start() smoke.start()
playsound(loc, 'bamf.ogg', 50, 2) playsound(U.loc, 'bamf.ogg', 50, 2)
S.coold = 1 sbombs--
coold = 1
return return
//9-10 Tile Teleport //9-10 Tile Teleport
//Click to to teleport 9-10 tiles in direction facing. //Click to to teleport 9-10 tiles in direction facing.
/mob/proc/ninjajaunt() /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
set name = "Phase Jaunt (10E)" set name = "Phase Jaunt (10E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing." set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
var/C = 100 var/C = 100
if(!ninjacost(C,1)) if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(loc,src,9,1,3,1,0,1) var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below. var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf)) if(destination&&istype(mobloc, /turf))
spawn(0) spawn(0)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout") anim(mobloc,src,'mob.dmi',,"phaseout")
if(istype(get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons. if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
var/obj/item/weapon/grab/G = get_active_hand() var/obj/item/weapon/grab/G = U.get_active_hand()
G.affecting.loc = locate(destination.x+rand(-1,1),destination.y+rand(-1,1),destination.z)//variation of position. G.affecting.loc = locate(destination.x+rand(-1,1),destination.y+rand(-1,1),destination.z)//variation of position.
if(istype(get_inactive_hand(),/obj/item/weapon/grab)) if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = get_inactive_hand() var/obj/item/weapon/grab/G = U.get_inactive_hand()
G.affecting.loc = locate(destination.x+rand(-1,1),destination.y+rand(-1,1),destination.z)//variation of position. G.affecting.loc = locate(destination.x+rand(-1,1),destination.y+rand(-1,1),destination.z)//variation of position.
loc = destination U.loc = destination
spawn(0) spawn(0)
S.spark_system.start() spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(loc,src,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
spawn(0) spawn(0)
destination.kill_creatures(src)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it. destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
S.coold = 1 coold = 1
S.cell.charge-=(C*10) cell.charge-=(C*10)
else else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>." U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return return
//Right Click Teleport //Right Click Teleport
//Right click to teleport somewhere, almost exactly like admin jump to turf. //Right click to teleport somewhere, almost exactly like admin jump to turf.
/mob/proc/ninjashift(var/turf/T in oview()) /obj/item/clothing/suit/space/space_ninja/proc/ninjashift(var/turf/T in oview())
set name = "Phase Shift (20E)" set name = "Phase Shift (20E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view." 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. set category = null//So it does not show up on the panel but can still be right-clicked.
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
var/C = 200 var/C = 200
if(!ninjacost(C,1)) if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below. var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(!T.density&&istype(mobloc, /turf)) if(!T.density&&istype(mobloc, /turf))
spawn(0) spawn(0)
playsound(loc, 'sparks4.ogg', 50, 1) playsound(U.loc, 'sparks4.ogg', 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout") anim(mobloc,src,'mob.dmi',,"phaseout")
if(istype(get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons. if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
var/obj/item/weapon/grab/G = get_active_hand() var/obj/item/weapon/grab/G = U.get_active_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
if(istype(get_inactive_hand(),/obj/item/weapon/grab)) if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = get_inactive_hand() var/obj/item/weapon/grab/G = U.get_inactive_hand()
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
loc = T U.loc = T
spawn(0) spawn(0)
S.spark_system.start() spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, 'sparks2.ogg', 50, 1) playsound(U.loc, 'sparks2.ogg', 50, 1)
anim(loc,src,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
spawn(0)//Any living mobs in teleport area are gibbed. spawn(0)//Any living mobs in teleport area are gibbed.
T.kill_creatures(src) T.kill_creatures(U)
S.coold = 1 coold = 1
S.cell.charge-=(C*10) cell.charge-=(C*10)
else else
src << "\red You cannot teleport into solid walls or from solid matter" U << "\red You cannot teleport into solid walls or from solid matter"
return return
//EMP Pulse //EMP Pulse
//Disables nearby tech equipment. //Disables nearby tech equipment.
/mob/proc/ninjapulse() /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
set name = "EM Burst (25E)" set name = "EM Burst (25E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse." set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
var/C = 250 var/C = 250
if(!ninjacost(C,1)) if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
playsound(loc, 'EMPulse.ogg', 60, 2) playsound(U.loc, 'EMPulse.ogg', 60, 2)
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch. empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
S.coold = 2 coold = 2
S.cell.charge-=(C*10) cell.charge-=(C*10)
return return
//Summon Energy Blade //Summon Energy Blade
//Summons a blade of energy in active hand. //Summons a blade of energy in active hand.
/mob/proc/ninjablade() /obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
set name = "Energy Blade (5E)" set name = "Energy Blade (5E)"
set desc = "Create a focused beam of energy in your active hand." set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
var/C = 50 var/C = 50
if(!ninjacost(C)) if(!ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
if(!S.kamikaze) if(!kamikaze)
if(!get_active_hand()&&!istype(get_inactive_hand(), /obj/item/weapon/blade)) if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/blade))
var/obj/item/weapon/blade/W = new() var/obj/item/weapon/blade/W = new()
W.spark_system.start() spark_system.start()
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
put_in_hand(W) U.put_in_hand(W)
S.cell.charge-=(C*10) cell.charge-=(C*10)
else else
src << "\red You can only summon one blade. Try dropping an item first." U << "\red You can only summon one blade. Try dropping an item first."
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains. else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
if(!get_active_hand()) if(!U.get_active_hand())
var/obj/item/weapon/blade/W = new() var/obj/item/weapon/blade/W = new()
put_in_hand(W) U.put_in_hand(W)
if(!get_inactive_hand()) if(!U.get_inactive_hand())
var/obj/item/weapon/blade/W = new() var/obj/item/weapon/blade/W = new()
put_in_inactive_hand(W) U.put_in_inactive_hand(W)
S.spark_system.start() spark_system.start()
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
S.coold = 1 coold = 1
return return
//Shoot Ninja Stars //Shoot Ninja Stars
//Shoots ninja stars at random people. //Shoots ninja stars at random people.
//This could be a lot better but I'm too tired atm. //This could be a lot better but I'm too tired atm.
/mob/proc/ninjastar() /obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
set name = "Energy Star (3E)" set name = "Energy Star (3E)"
set desc = "Launches an energy star at a random living target." set desc = "Launches an energy star at a random living target."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
var/C = 30 var/C = 30
if(!ninjacost(C)) if(!ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
var/targets[]//So yo can shoot while yo throw dawg var/targets[] = list()//So yo can shoot while yo throw dawg
targets = new() for(var/mob/living/M in oview(loc))
for(var/mob/living/M in oview(7)) if(M.stat) continue//Doesn't target corpses or paralyzed persons.
if(M.stat==2) continue//Doesn't target corpses.
targets.Add(M) targets.Add(M)
if(targets.len) if(targets.len)
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at. var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
var/turf/curloc = loc var/turf/curloc = U.loc
var/atom/targloc = get_turf(target) var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc) if (!targloc || !istype(targloc, /turf) || !curloc)
return return
if (targloc == curloc) if (targloc == curloc)
return return
var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(loc) var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(U.loc)
A.current = curloc A.current = curloc
A.yo = targloc.y - curloc.y A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x A.xo = targloc.x - curloc.x
S.cell.charge-=(C*10) cell.charge-=(C*10)
A.process() A.process()
else else
src << "\red There are no targets in view." U << "\red There are no targets in view."
return return
//Energy Net //Energy Net
//Allows the ninja to capture people, I guess. //Allows the ninja to capture people, I guess.
//Must right click on a mob to activate. //Must right click on a mob to activate.
/mob/proc/ninjanet(var/mob/living/carbon/M in oview())//Only living carbon mobs. /obj/item/clothing/suit/space/space_ninja/proc/ninjanet(var/mob/living/carbon/M in oview())//Only living carbon mobs.
set name = "Energy Net" 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 desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
set category = null set category = null
set src = usr.contents
var/C = 200 var/C = 200
if(!ninjacost(C)) 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. 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. if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
for(var/turf/T in getline(loc, M.loc)) for(var/turf/T in getline(U.loc, M.loc))
if(T==loc||T==M.loc) continue if(T==U.loc||T==M.loc) continue
spawn(0) spawn(0)
anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(loc,M.loc)) anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(U.loc,M.loc))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
M.anchored = 1//Anchors them so they can't move. M.anchored = 1//Anchors them so they can't move.
say("Get over here!") U.say("Get over here!")
var/obj/effects/energy_net/E = new /obj/effects/energy_net(M.loc) var/obj/effects/energy_net/E = new /obj/effects/energy_net(M.loc)
E.layer = M.layer+1//To have it appear one layer above the mob. E.layer = M.layer+1//To have it appear one layer above the mob.
for(var/mob/O in viewers(src, 3)) for(var/mob/O in viewers(U, 3))
O.show_message(text("\red [] caught [] with an energy net!", src, M), 1) O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
E.affecting = M E.affecting = M
E.master = src E.master = U
spawn(0)//Parallel processing. spawn(0)//Parallel processing.
E.process(M) E.process(M)
S.cell.charge-=(C*10) cell.charge-=(C*10)
else else
src << "They will bring no honor to your Clan!" U << "They will bring no honor to your Clan!"
return return
//Adrenaline Boost //Adrenaline Boost
//Wakes the user so they are able to do their thing. Also injects a decent dose of radium. //Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
//Movement impairing would indicate drugs and the like. //Movement impairing would indicate drugs and the like.
/mob/proc/ninjaboost() /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
set name = "Adrenaline Boost" set name = "Adrenaline Boost"
set desc = "Inject a secret chemical that will counteract all movement-impairing effects." set desc = "Inject a secret chemical that will counteract all movement-impairing effects."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability. if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly. //Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really. //For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
paralysis = 0 U.paralysis = 0
stunned = 0 U.stunned = 0
weakened = 0 U.weakened = 0
spawn(30) spawn(30)
say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70) spawn(70)
S.reagents.reaction(src, 2) reagents.reaction(U, 2)
S.reagents.trans_id_to(src, "radium", S.transfera) reagents.trans_id_to(U, "radium", transfera)
src << "\red You are beginning to feel the after-effects of the injection." U << "\red You are beginning to feel the after-effects of the injection."
S.aboost-- aboost--
S.coold = 3 coold = 3
return return
@@ -278,71 +284,75 @@ In the case that they are not, I imagine the game will run-time error like crazy
//Allows for incorporeal movement. //Allows for incorporeal movement.
//Also makes you move like you're on crack. //Also makes you move like you're on crack.
/mob/proc/ninjawalk() /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
set name = "Shadow Walk" set name = "Shadow Walk"
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off." set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
if(!incorporeal_move) var/mob/living/carbon/human/U = affecting
incorporeal_move = 2 if(!U.incorporeal_move)
density = 0 U.incorporeal_move = 2
src << "\blue You will now phase through solid matter." U.density = 0
U << "\blue You will now phase through solid matter."
else else
incorporeal_move = 0 U.incorporeal_move = 0
density = 1 U.density = 1
src << "\blue You will no-longer phase through solid matter." U << "\blue You will no-longer phase through solid matter."
return return
/* /*
Allows to gib up to five squares in a straight line. Seriously.*/ Allows to gib up to five squares in a straight line. Seriously.*/
/mob/proc/ninjaslayer() /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
set name = "Phase Slayer" set name = "Phase Slayer"
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line." set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost()) if(!ninjacost())
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
var/turf/destination = get_teleport_loc(loc,src,5) var/turf/destination = get_teleport_loc(U.loc,U,5)
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below. var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
if(destination&&istype(mobloc, /turf)) if(destination&&istype(mobloc, /turf))
say("Ai Satsugai!") U.say("Ai Satsugai!")
spawn(0) spawn(0)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout") anim(mobloc,U,'mob.dmi',,"phaseout")
spawn(0) spawn(0)
for(var/turf/T in getline(mobloc, destination)) for(var/turf/T in getline(mobloc, destination))
spawn(0) spawn(0)
T.kill_creatures(src) T.kill_creatures(U)
if(T==mobloc||T==destination) continue if(T==mobloc||T==destination) continue
spawn(0) spawn(0)
anim(T,src,'mob.dmi',,"phasein") anim(T,U,'mob.dmi',,"phasein")
loc = destination U.loc = destination
spawn(0) spawn(0)
S.spark_system.start() spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(loc,src,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
S.coold = 1 coold = 1
else else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>." U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return return
//Appear behind a randomly chosen mob while a few decoy teleports appear. //Appear behind a randomly chosen mob while a few decoy teleports appear.
//This is so anime it hurts. But that's the point. //This is so anime it hurts. But that's the point.
/mob/proc/ninjamirage() /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage()
set name = "Spider Mirage" set name = "Spider Mirage"
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target." set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
set category = "Ninja Ability" set category = "Ninja Ability"
set popup_menu = 0
if(!ninjacost())//Simply checks for stat. if(!ninjacost())//Simply checks for stat.
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/mob/living/carbon/human/U = affecting
var/targets[] var/targets[]
targets = new() targets = new()
for(var/mob/living/M in oview(6)) for(var/mob/living/M in oview(6))
if(M.stat==2) continue//Doesn't target corpses. if(M.stat) continue//Doesn't target corpses or paralyzed people.
targets.Add(M) targets.Add(M)
if(targets.len) if(targets.len)
var/mob/living/target=pick(targets) var/mob/living/target=pick(targets)
@@ -373,32 +383,32 @@ Allows to gib up to five squares in a straight line. Seriously.*/
safety = 1 safety = 1
else safety=1 else safety=1
if(!safety&&istype(mobloc, /turf)) if(!safety&&istype(mobloc, /turf))
say("Kumo no Shinkiro!") U.say("Kumo no Shinkiro!")
var/turf/picked = locate(locx,locy,mobloc.z) var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0) spawn(0)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(mobloc,src,'mob.dmi',,"phaseout") anim(mobloc,U,'mob.dmi',,"phaseout")
spawn(0) spawn(0)
var/limit = 4 var/limit = 4
for(var/turf/T in oview(5)) for(var/turf/T in oview(5))
if(prob(20)) if(prob(20))
spawn(0) spawn(0)
anim(T,src,'mob.dmi',,"phasein") anim(T,U,'mob.dmi',,"phasein")
limit-- limit--
if(limit<=0) break if(limit<=0) break
loc = picked U.loc = picked
dir = target.dir U.dir = target.dir
spawn(0) spawn(0)
S.spark_system.start() spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(U.loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1) playsound(U.loc, "sparks", 50, 1)
anim(loc,src,'mob.dmi',,"phasein") anim(U.loc,U,'mob.dmi',,"phasein")
S.coold = 1 coold = 1
else else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>." U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else else
src << "\red There are no targets in view." U << "\red There are no targets in view."
return return

View File

@@ -11,6 +11,8 @@ ________________________________________________________________________________
/obj/item/clothing/suit/space/space_ninja/New() /obj/item/clothing/suit/space/space_ninja/New()
..() ..()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb
//verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_instruction//for AIs
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo
spark_system = new /datum/effects/system/spark_spread()//spark initialize spark_system = new /datum/effects/system/spark_spread()//spark initialize
spark_system.set_up(5, 0, src) spark_system.set_up(5, 0, src)
spark_system.attach(src) spark_system.attach(src)
@@ -24,7 +26,7 @@ ________________________________________________________________________________
reagents.add_reagent("radium", 120)//AI can inject radium directly. There should be at least 60 units left over after adrenaline boosting. reagents.add_reagent("radium", 120)//AI can inject radium directly. There should be at least 60 units left over after adrenaline boosting.
reagents.add_reagent("nutriment", 80) reagents.add_reagent("nutriment", 80)
cell = new/obj/item/weapon/cell/high//The suit should *always* have a battery because so many things rely on it. cell = new/obj/item/weapon/cell/high//The suit should *always* have a battery because so many things rely on it.
cell.charge = 9000 cell.charge = 9000//Starting charge should not be higher than maximum charge. It leads to problems with recharging.
/obj/item/clothing/suit/space/space_ninja/Del() /obj/item/clothing/suit/space/space_ninja/Del()
if(AI)//If there are AIs present when the ninja kicks the bucket. if(AI)//If there are AIs present when the ninja kicks the bucket.
@@ -33,11 +35,11 @@ ________________________________________________________________________________
return return
/obj/item/clothing/suit/space/space_ninja/proc/killai(var/mob/living/silicon/ai/A as mob) /obj/item/clothing/suit/space/space_ninja/proc/killai(var/mob/living/silicon/ai/A as mob)
A << "\red Self-destruct protocol dete-- *bzzzzz*" if(A.client)
A << browse(null, "window=hack spideros") A << "\red Self-destruct protocol dete-- *bzzzzz*"
A << browse(null, "window=hack spideros")
AI = null AI = null
A.death()//Kill A.death(1)//Kill
A.ghostize()//Turn into ghost
del(AI) del(AI)
return return
@@ -50,7 +52,6 @@ ________________________________________________________________________________
return return
/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob) /obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
set hidden = 1
set background = 1 set background = 1
spawn while(initialize&&cell.charge>=0)//Suit on and has power. spawn while(initialize&&cell.charge>=0)//Suit on and has power.
@@ -137,14 +138,12 @@ ________________________________________________________________________________
U << "\blue Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>." U << "\blue Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>."
sleep(40) sleep(40)
U << "\blue All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name]." U << "\blue All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name]."
U.grant_ninja_verbs() grant_ninja_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros 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/drain_wire
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
initialize=1
affecting=U affecting=U
slowdown=0
U.shoes:slowdown-- U.shoes:slowdown--
ntick(U) ntick(U)
else else
@@ -176,14 +175,12 @@ ________________________________________________________________________________
U << "\blue Now de-initializing..." U << "\blue Now de-initializing..."
if(kamikaze) if(kamikaze)
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>" U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
U.remove_kamikaze_verbs() remove_kamikaze_verbs()
kamikaze = 0
unlock = 0
U.incorporeal_move = 0 U.incorporeal_move = 0
U.density = 1 U.density = 1
spideros = 0 spideros = 0
sleep(40) sleep(40)
U.remove_ninja_verbs() remove_ninja_verbs()
U << "\blue Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>." U << "\blue Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>."
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
sleep(40) sleep(40)
@@ -239,7 +236,6 @@ ________________________________________________________________________________
set name = "Display SpiderOS" set name = "Display SpiderOS"
set desc = "Utilize built-in computer system." set desc = "Utilize built-in computer system."
set category = "Ninja Equip" set category = "Ninja Equip"
//set src in view()//To have it show up after AI gives back control.
if(!affecting) return//If no mob is wearing the suit. I almost forgot about this variable. if(!affecting) return//If no mob is wearing the suit. I almost forgot about this variable.
var/mob/living/carbon/human/U = affecting var/mob/living/carbon/human/U = affecting
@@ -351,33 +347,39 @@ ________________________________________________________________________________
dat += "<h5>How they relate to other SS13 organizations:</h5>" dat += "<h5>How they relate to other SS13 organizations:</h5>"
dat += "<ul>" dat += "<ul>"
dat += "<li>*<b>Nanotrasen</b> and the Syndicate are two sides of the same coin and that coin is valuable.</li>" dat += "<li>*<b>Nanotrasen</b> and the Syndicate are two sides of the same coin and that coin is valuable.</li>"
dat += "<li>*<b>The Space Wizard Federation</b> is a problem, mainly because they are an extremely dangerous group of unpredictable individuals--not to mention the wizards hate technology and are in direct opposition of the Spider Clan. Best avoided or left well-enough alone.</li>" dat += "<li>*<b>The Space Wizard Federation</b> is a problem, mainly because they are an extremely dangerous group of unpredictable individuals--not to mention the wizards hate technology and are in direct opposition of the Spider Clan. Best avoided or left well-enough alone. How to battle: wizards possess several powerful abilities to steer clear off. Blind in particular is a nasty spell--jaunt away if you are blinded and never approach a wizard in melee. Stealth may also work if the wizard is not wearing thermal scanners--don't count on this. Run away if you feel threatened and await a better opportunity.</li>"
dat += "<li>*<b>Changeling Hivemind</b>: extremely dangerous and to be killed on sight.</li>" dat += "<li>*<b>Changeling Hivemind</b>: extremely dangerous and to be killed on sight. How to battle: they will likely try to absorb you. Adrenaline boost, then phase shift into them. If you get stung, use SpiderOS to inject counter-agents. Stealth may also work but detecting a changeling is the real battle.</li>"
dat += "<li>*<b>Xeno Hivemind</b>: their skulls make interesting kitchen decorations and are challenging to best, especially in larger nests.</li>" dat += "<li>*<b>Xeno Hivemind</b>: their skulls make interesting kitchen decorations and are challenging to best, especially in larger nests. How to battle: they can see through your stealth guise and energy stars will not work on them. Best killed with a Phase Shift or at range. If you happen on a projectile stun weapon, use it and then close in to melee.</li>"
dat += "</ul>" dat += "</ul>"
dat += "<h5>The reason they (you) are here</h5>:" dat += "<h5>The reason they (you) are here</h5>:"
dat += "Space ninjas are renowned throughout the known controlled space as fearless spies, infiltrators, and assassins. They are sent on missions of varying nature by Nanotrasen, the Syndicate, and other shady organizations and people. To hire a space ninja means serious business." dat += "Space ninjas are renowned throughout the known controlled space as fearless spies, infiltrators, and assassins. They are sent on missions of varying nature by Nanotrasen, the Syndicate, and other shady organizations and people. To hire a space ninja means serious business."
dat += "<h5>Their playstyle:</h5>" dat += "<h5>Their playstyle:</h5>"
dat += "A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, rechargers, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.<br>It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.<br>With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja." dat += "A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, rechargers, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.<br>It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.<br>With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja."
dat += "<h5>Their powers:</h5>" dat += "<h5>Their powers:</h5>"
dat += "There are two primary types: powers that are activated through the suit and powers that are activated through the verb panel. Passive powers are always on. Active powers must be turned on and remain active only when there is energy to do so. All verb powers are active and their cost is listed next to them." dat += "There are two primary types: Equipment and Abilties. Passive effects are always on. Active effects must be turned on and remain active only when there is energy to do so. Ability costs are listed next to them."
dat += "<b>Powers of the suit</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 += "<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 += "<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>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.</li>"
dat += "<li><i>Stealth</i>, when activated, drains more battery charge and works similarly to a syndicate cloak.</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>" 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>"
dat += "</ul>" dat += "</ul>"
dat += "<b>Verbpowers</b>:" dat += "<b>Abilities</b>:"
dat += "<ul>" dat += "<ul>"
dat += "<li>*<b>Phase Shift</b> (<i>2000E</i>) and <b>Phase Jaunt</b> (<i>1000E</i>) are unique powers in that they can both be used for defense and offense. Jaunt launches the ninja forward facing up to 10 squares, somewhat randomly selecting the final destination. Shift can only be used on turf in view but is precise (cannot be used on walls). Any living mob in the area teleported to is instantly gibbed.</li>" dat += "<li>*<b>Phase Shift</b> (<i>2000E</i>) and <b>Phase Jaunt</b> (<i>1000E</i>) are unique powers in that they can both be used for defense and offense. Jaunt launches the ninja forward facing up to 9 squares, somewhat randomly selecting the final destination. Shift can only be used on turf in view but is precise (cannot be used on walls). Any living mob in the area teleported to is instantly gibbed (mechs are damaged, huggers and other similar critters are killed). It is possible to teleport with a target, provided you grab them before teleporting.</li>"
dat += "<li>*<b>Energy Blade</b> (<i>500E</i>) is a highly effective weapon. It is summoned directly to the ninja's hand and can also function as an EMAG for certain objects (doors/lockers/etc). You may also use it to cut through walls and disabled doors. Experiment! The blade will crit humans in two hits. This item cannot be placed in containers and when dropped or thrown disappears. Having an energy sword drains more power from the battery each tick.</li>" dat += "<li>*<b>Energy Blade</b> (<i>500E</i>) is a highly effective weapon. It is summoned directly to the ninja's hand and can also function as an EMAG for certain objects (doors/lockers/etc). You may also use it to cut through walls and disabled doors. Experiment! The blade will crit humans in two hits. This item cannot be placed in containers and when dropped or thrown disappears. Having an energy blade drains more power from the battery each tick.</li>"
dat += "<li>*<b>EM Pulse</b> (<i>2500E</i>) is a highly useful ability that will create an electromagnetic shockwave around the ninja, disabling technology whenever possible. If used properly it can render a security force effectively useless. Of course, getting beat up with a toolbox is not accounted for.</li>" dat += "<li>*<b>EM Pulse</b> (<i>2500E</i>) is a highly useful ability that will create an electromagnetic shockwave around the ninja, disabling technology whenever possible. If used properly it can render a security force effectively useless. Of course, getting beat up with a toolbox is not accounted for.</li>"
dat += "<li>*<b>Energy Star</b> (<i>300E</i>) is a ninja star made of green energy AND coated in poison. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. Just remember that the poison used is also used by the Xeno Hivemind (and will have no effect on them).</li>" dat += "<li>*<b>Energy Star</b> (<i>300E</i>) is a ninja star made of green energy AND coated in poison. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. Just remember that the poison used is also used by the Xeno Hivemind (and will have no effect on them).</li>"
dat += "<li>*<b>Energy Net</b> (<i>2000E</i>) traps a right-clicked target in an energy field that will trasport them to a holding facility after 30 seconds. They, or someone else, may break the net in the mean time, cancelling the procedure. Abduction never looked this leet.</li>" dat += "<li>*<b>Energy Net</b> (<i>2000E</i>) is a non-lethal solution to incapacitating humanoids. The net is made of non-harmful phase energy and will halt movement as long as it remains in effect--it can be destroyed. If the net is not destroyed, after a certain time it will teleport the target to a holding facility for the Spider Clan and then vanish. You will be notified if the net fails or succeeds in capturing a target in this manner. Combine with energy stars or stripping to ensure success. Abduction never looked this leet.</li>"
dat += "<li>*<b>Adrenaline Boost</b> (<i>1 E. Boost/3</i>) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.</li>" dat += "<li>*<b>Adrenaline Boost</b> (<i>1 E. Boost/3</i>) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.</li>"
dat += "<li>*<b>Smoke Bomb</b> (<i>1 Sm.Bomb/10</i>) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.</li>" dat += "<li>*<b>Smoke Bomb</b> (<i>1 Sm.Bomb/10</i>) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.</li>"
dat += "<li>*<b>???</b>: unleash the <b>True Ultimate Power!</b></li>" dat += "<li>*<b>???</b>: unleash the <b>True Ultimate Power!</b></li>"
dat += "<h4><img src=sos_6.png> IMPORTANT:</h4>"
dat += "<ul>"
dat += "<li>*Make sure to toggle Special Interaction from the Ninja Equipment menu to interact differently with certain objects.</li>"
dat += "<li>*Your starting power cell can be replaced if you find one with higher maximum energy capacity by clicking on the new cell with the same hand (super and hyper cells).</li>"
dat += "<li>*Conserve your energy. Without it, you are very vulnerable.</li>"
dat += "</ul>" dat += "</ul>"
dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!" dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
dat += "<h4>Master /N</h4>" dat += "<h4>Master /N</h4>"
@@ -414,13 +416,9 @@ ________________________________________________________________________________
dat += "<h4>Laws:</h4><ul>[laws]<li><a href='byond://?src=\ref[src];choice=Override Laws;target=\ref[A]'><i>*Override Laws*</i></a></li></ul>" dat += "<h4>Laws:</h4><ul>[laws]<li><a href='byond://?src=\ref[src];choice=Override Laws;target=\ref[A]'><i>*Override Laws*</i></a></li></ul>"
if (A.stat == 2)//If AI dies while inside the card. if (A.stat == 2)//If AI dies while inside the card, such as suiciding.
if(A.client)//If they are still in their body. AI = null
A.ghostize()//Throw them into a ghost. del(A)//Delete A.
AI = null
del(A)//Delete A.
else
del(A)
U << "Artificial Intelligence has self-terminated. Rebooting..." U << "Artificial Intelligence has self-terminated. Rebooting..."
spideros()//Refresh. spideros()//Refresh.
else else
@@ -546,8 +544,7 @@ ________________________________________________________________________________
sleep(10) sleep(10)
U << "\red Do or Die, <b>LET'S ROCK!!</b>" U << "\red Do or Die, <b>LET'S ROCK!!</b>"
if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To hopefully prevent engaging kamikaze and de-initializing at the same time. if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To hopefully prevent engaging kamikaze and de-initializing at the same time.
kamikaze = 1 grant_kamikaze_verbs()
active = 0
icon_state = "s-ninjak" icon_state = "s-ninjak"
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja)) if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
U.gloves.icon_state = "s-ninjak" U.gloves.icon_state = "s-ninjak"
@@ -557,8 +554,7 @@ ________________________________________________________________________________
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
U.update_clothing() U.update_clothing()
U.grant_kamikaze_verbs() ninjablade()
U.ninjablade()
message_admins("\blue [U.key] used KAMIKAZE mode.", 1) message_admins("\blue [U.key] used KAMIKAZE mode.", 1)
else else
U << "Nevermind, you cheater." U << "Nevermind, you cheater."
@@ -568,6 +564,7 @@ ________________________________________________________________________________
U << "\red ERROR: WRONG PASSWORD!" U << "\red ERROR: WRONG PASSWORD!"
unlock = 0 unlock = 0
spideros = 0 spideros = 0
//BEGIN MEDICAL//
if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names. if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names.
if(!reagents.get_reagent_amount("anti_toxin")) if(!reagents.get_reagent_amount("anti_toxin"))
U << "\red Error: the suit cannot perform this function. Out of dylovene." U << "\red Error: the suit cannot perform this function. Out of dylovene."
@@ -603,7 +600,7 @@ ________________________________________________________________________________
reagents.reaction(U, 2) reagents.reaction(U, 2)
reagents.trans_id_to(U, "nutriment", 5) reagents.trans_id_to(U, "nutriment", 5)
U << "You feel a tiny prick and a sudden rush of substance in to your veins." U << "You feel a tiny prick and a sudden rush of substance in to your veins."
//BEGIN AI//
if("Override Laws") if("Override Laws")
var/mob/living/silicon/ai/A = locate(href_list["target"]) var/mob/living/silicon/ai/A = locate(href_list["target"])
var/law_zero = A.laws_object.zeroth//Remembers law zero, if there is one. var/law_zero = A.laws_object.zeroth//Remembers law zero, if there is one.
@@ -624,41 +621,29 @@ ________________________________________________________________________________
spideros = 0 spideros = 0
unlock = 0 unlock = 0
U << browse(null, "window=spideros") U << browse(null, "window=spideros")
spawn(40)//Unlimited window spawn works! sleep(40)
if(AI==A)
A << "Disconnecting neural interface..."
U << "\red <b>WARNING</b>: PRO0GRE--S 2&3%"
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
sleep(40)
if(AI==A) if(AI==A)
A << "Disconnecting neural interface..." A << "Shutting down external protocol..."
U << "\red <b>WARNING</b>: PRO0GRE--S 2&3%" U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%"
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit active = 0
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros sleep(40)
spawn(40) if(AI==A)
if(AI==A) A << "Connecting to kernel..."
A << "Shutting down external protocol..." U << "\red <b>WARNING</b>: ER-RR04"
U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%" A.control_disabled = 0
active = 0 sleep(40)
spawn(40) A << "Connection established and secured. Menu updated."
if(AI==A) U << "\red <b>WARNING</b>: #%@!!WEL4P54@ \nUnABBBL3 TO LO-o-LOCAT2 ##$!ERNE0"
A << "Connecting to kernel..." grant_AI_verbs()
U << "\red <b>WARNING</b>: ER-RR04" return
A.control_disabled = 0 U << "\blue Hacking attempt disconnected. Resuming normal operation."
spawn(40) remove_AI_verbs()
A << "Connection established and secured. Menu updated."
U << "\red <b>WARNING</b>: #%@!!WEL4P54@ \nUnABBBL3 TO LO-o-LOCAT2 ##$!ERNE0"
control = 0
var/obj/proc_holder/ai_return_control/A_C = new(A)
var/obj/proc_holder/ai_hack_ninja/B_C = new(A)
A.proc_holder_list += A_C
A.proc_holder_list += B_C
else
U << "\blue Hacking attempt disconnected. Resuming normal operation."
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
else
U << "\blue Hacking attempt disconnected. Resuming normal operation."
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
else
U << "\blue Hacking attempt disconnected. Resuming normal operation."
return
else else
flush = 1 flush = 1
A.suiciding = 1 A.suiciding = 1
@@ -685,6 +670,7 @@ ________________________________________________________________________________
A << browse(null, "window=hack spideros") A << browse(null, "window=hack spideros")
return return
//Remove this if verbs work.
var/obj/proc_holder/ai_hack_ninja/ninja_spideros = locate() in A//What is the object granting access to proc? Find it. var/obj/proc_holder/ai_hack_ninja/ninja_spideros = locate() in A//What is the object granting access to proc? Find it.
switch(href_list["choice"]) switch(href_list["choice"])
@@ -697,7 +683,7 @@ ________________________________________________________________________________
spideros=0 spideros=0
else else
spideros = round(spideros/10) spideros = round(spideros/10)
if("Shock")//DEBUG TEST if("Shock")
var/damage = min(cell.charge, rand(50,150))//Uses either the current energy left over or between 50 and 150. var/damage = min(cell.charge, rand(50,150))//Uses either the current energy left over or between 50 and 150.
if(damage>1)//So they don't spam it when energy is a factor. if(damage>1)//So they don't spam it when energy is a factor.
spark_system.start()//SPARKS THERE SHALL BE SPARKS spark_system.start()//SPARKS THERE SHALL BE SPARKS
@@ -715,6 +701,10 @@ ________________________________________________________________________________
spideros=3 spideros=3
if("32") if("32")
spideros=32 spideros=32
if("4")
spideros=4
if("5")
spideros=5
if("Message") if("Message")
var/obj/item/device/pda/P = locate(href_list["target"]) var/obj/item/device/pda/P = locate(href_list["target"])
var/t = input(U, "Please enter untraceable message.") as text var/t = input(U, "Please enter untraceable message.") as text
@@ -724,6 +714,8 @@ ________________________________________________________________________________
return return
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists. if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
A << "\red Error: unable to deliver message." A << "\red Error: unable to deliver message."
//hack_spideros()
//Remove this if verbs work.
ninja_spideros.Click() ninja_spideros.Click()
return return
P.tnote += "<i><b>&larr; From [A]:</b></i><br>[t]<br>"//Oh ai, u so silly P.tnote += "<i><b>&larr; From [A]:</b></i><br>[t]<br>"//Oh ai, u so silly
@@ -735,6 +727,7 @@ ________________________________________________________________________________
P.overlays += image('pda.dmi', "pda-r") P.overlays += image('pda.dmi', "pda-r")
if("Unlock Kamikaze") if("Unlock Kamikaze")
A << "\red <b>ERROR</b>: \black TARANTULA.v.4.77.12 encryption algorithm detected. Unable to decrypt archive. \n Aborting..." A << "\red <b>ERROR</b>: \black TARANTULA.v.4.77.12 encryption algorithm detected. Unable to decrypt archive. \n Aborting..."
//BEGIN MEDICAL//
if("Dylovene") if("Dylovene")
if(!reagents.get_reagent_amount("anti_toxin")) if(!reagents.get_reagent_amount("anti_toxin"))
A << "\red Error: the suit cannot perform this function. Out of dylovene." A << "\red Error: the suit cannot perform this function. Out of dylovene."
@@ -783,7 +776,55 @@ ________________________________________________________________________________
reagents.trans_id_to(U, "nutriment", 5) reagents.trans_id_to(U, "nutriment", 5)
A << "Injecting..." A << "Injecting..."
U << "You feel a tiny prick and a sudden rush of substance in to your veins." U << "You feel a tiny prick and a sudden rush of substance in to your veins."
ninja_spideros.Click()//Calls spideros for AI. //BEGIN ABILITIES//
if("Phase Jaunt")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjajaunt()
if("Phase Shift")
var/turfs[] = list()
for(var/turf/T in oview(5,loc))
turfs.Add(T)
if(turfs.len)
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjashift(pick(turfs))
else
A << "There are no potential destinations in view."
if("Energy Blade")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjablade()
if("Energy Star")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjastar()
if("Energy Net")
var/targets[] = list()
for(var/mob/living/carbon/M in oview(5,loc))
targets.Add(M)
if(targets.len)
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjanet(pick(targets))
else
A << "There are no potential targets in view."
if("EM Pulse")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjapulse()
if("Smoke Bomb")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjasmoke()
if("Adrenaline Boost")
A << "You trigger [href_list["choice"]]."
U << "[href_list["choice"]] suddenly triggered!"
ninjaboost()
//hack_spideros()//Calls spideros for AI.
//Remove this if verbs work.
ninja_spideros.Click()
return return
/obj/item/clothing/suit/space/space_ninja/examine() /obj/item/clothing/suit/space/space_ninja/examine()
@@ -845,8 +886,8 @@ ________________________________________________________________________________
/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(var/target_type as text, var/target, var/obj/suit, var/obj/gloves)
//Var Initialize //Var Initialize
var/mob/living/carbon/human/U = loc
var/obj/item/clothing/suit/space/space_ninja/S = suit 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 = gloves
var/drain = 0//To drain from battery. var/drain = 0//To drain from battery.
@@ -1310,10 +1351,10 @@ The sprite for the net is kind of ugly but I couldn't come up with a better one.
playsound(M.loc, 'sparks4.ogg', 50, 1) playsound(M.loc, 'sparks4.ogg', 50, 1)
anim(M.loc,M,'mob.dmi',,"phaseout") anim(M.loc,M,'mob.dmi',,"phaseout")
M.loc = pick(prisonwarp)//Throw mob in prison.
density = 0//Make the net pass-through. density = 0//Make the net pass-through.
invisibility = 101//Make the net invisible so all the animations can play out. invisibility = 101//Make the net invisible so all the animations can play out.
health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running.
M.loc = pick(prisonwarp)//Throw mob in prison.
spawn(0) spawn(0)
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread() var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()

View File

@@ -93,103 +93,245 @@ ________________________________________________________________________________
new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_l_store) new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_l_store)
new_ninja.equip_if_possible(new /obj/item/weapon/tank/emergency_oxygen(new_ninja), new_ninja.slot_s_store) new_ninja.equip_if_possible(new /obj/item/weapon/tank/emergency_oxygen(new_ninja), new_ninja.slot_s_store)
/mob/proc/grant_ninja_verbs() //VERB MODIFIERS===================================
verbs += /mob/proc/ninjashift
verbs += /mob/proc/ninjajaunt /obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
verbs += /mob/proc/ninjasmoke verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
verbs += /mob/proc/ninjaboost verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
verbs += /mob/proc/ninjapulse verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
verbs += /mob/proc/ninjablade verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
verbs += /mob/proc/ninjastar verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
verbs += /mob/proc/ninjanet verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
mind.special_verbs += /mob/proc/ninjashift verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
mind.special_verbs += /mob/proc/ninjajaunt verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
mind.special_verbs += /mob/proc/ninjasmoke
mind.special_verbs += /mob/proc/ninjaboost initialize=1
mind.special_verbs += /mob/proc/ninjapulse slowdown=0
mind.special_verbs += /mob/proc/ninjablade
mind.special_verbs += /mob/proc/ninjastar /obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
mind.special_verbs += /mob/proc/ninjanet verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
/obj/item/clothing/suit/space/space_ninja/proc/grant_kamikaze_verbs()
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
kamikaze = 1
active = 0
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
kamikaze = 0
unlock = 0
/*Commented out due to BYOND bugs. Workaround used instead for the time being.
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
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
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
control = 1
*/
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
var/obj/proc_holder/ai_return_control/A_C = new(AI)
var/obj/proc_holder/ai_hack_ninja/B_C = new(AI)
var/obj/proc_holder/ai_instruction/C_C = new(AI)
new/obj/proc_holder/ai_holo_clear(AI)
AI.proc_holder_list += A_C
AI.proc_holder_list += B_C
AI.proc_holder_list += C_C
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
var/obj/proc_holder/ai_hack_ninja/B_C = locate() in AI
var/obj/proc_holder/ai_instruction/C_C = locate() in AI
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
del(A_C)
del(B_C)
del(C_C)
del(D_C)
AI.proc_holder_list = list()
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
control = 1
//AI COUNTER HACKING/SPECIAL FUNCTIONS===================================
/obj/item/clothing/suit/space/space_ninja/proc/ai_holo(var/turf/T in oview(3,affecting))//To have an internal AI display a hologram to the ninja only.
set name = "Display Hologram"
set desc = "Channel a holographic image directly to the user's field of vision. Others will not see it."
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(!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.
hologram.dir = get_dir_to(T,affecting.loc)
var/image/I = image('mob.dmi',hologram,"ai-holo")//Attach an image to object.
hologram.i_attached = I//To attach the image in order to later reference.
AI << I
affecting << I
affecting << "<i>An image flicks to life nearby. It appears visible to you only.</i>"
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
ai_holo_process()//Move to initialize
else
AI << "\red ERROR: \black Image feed in progress."
else
AI << "\red ERROR: \black Unable to project image."
return return
/mob/proc/remove_ninja_verbs() /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_process()
verbs -= /mob/proc/ninjashift set background = 1
verbs -= /mob/proc/ninjajaunt
verbs -= /mob/proc/ninjasmoke spawn while(hologram&&initialize&&AI)//Suit on and there is an AI present.
verbs -= /mob/proc/ninjaboost if(!initialize||get_dist(affecting,hologram.loc)>3)//Once suit is de-initialized or hologram reaches out of bounds.
verbs -= /mob/proc/ninjapulse del(hologram.i_attached)
verbs -= /mob/proc/ninjablade del(hologram)
verbs -= /mob/proc/ninjastar
verbs -= /mob/proc/ninjanet if(!control)//Meant to be used all the time but for now this'll do.
mind.special_verbs -= /mob/proc/ninjashift var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
mind.special_verbs -= /mob/proc/ninjajaunt AI.proc_holder_list -= D_C
mind.special_verbs -= /mob/proc/ninjasmoke //verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
mind.special_verbs -= /mob/proc/ninjaboost
mind.special_verbs -= /mob/proc/ninjapulse return
mind.special_verbs -= /mob/proc/ninjablade sleep(10)//Checks every second.
mind.special_verbs -= /mob/proc/ninjastar
mind.special_verbs -= /mob/proc/ninjanet
/*I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
This is the best work-around I could come up with. Uses objects to then display to panel, based on the object spell system.
Can be added on to pretty easily.
Leaving this commented out until BYOND fixes the verb panel bug.
It would be better to switch to this (from proc_holder) if the bug does get fixed.
/obj/item/clothing/suit/space/space_ninja/proc/ai_instruction()//Let's the AI know what they can do.
set name = "Instructions"
set desc = "Displays a list of helpful information."
set category = "AI Ninja Equip"
set src = usr.loc
AI << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear()
set name = "Clear Hologram"
set desc = "Stops projecting the current holographic image."
set category = "AI Ninja Equip"
set src = usr.loc
del(hologram.i_attached)
del(hologram)
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
return return
/mob/proc/grant_kamikaze_verbs() /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja()
verbs -= /mob/proc/ninjashift set name = "Hack SpiderOS"
verbs -= /mob/proc/ninjajaunt set desc = "Hack directly into the Black Widow(tm) neuro-interface."
verbs -= /mob/proc/ninjapulse set category = "AI Ninja Equip"
verbs -= /mob/proc/ninjastar set src = usr.loc
verbs -= /mob/proc/ninjanet
mind.special_verbs -= /mob/proc/ninjashift hack_spideros()
mind.special_verbs -= /mob/proc/ninjajaunt
mind.special_verbs -= /mob/proc/ninjapulse
mind.special_verbs -= /mob/proc/ninjastar
mind.special_verbs -= /mob/proc/ninjanet
verbs += /mob/proc/ninjaslayer
verbs += /mob/proc/ninjawalk
verbs += /mob/proc/ninjamirage
mind.special_verbs += /mob/proc/ninjaslayer
mind.special_verbs += /mob/proc/ninjawalk
mind.special_verbs += /mob/proc/ninjamirage
return return
/mob/proc/remove_kamikaze_verbs() /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control()
verbs += /mob/proc/ninjashift set name = "Relinquish Control"
verbs += /mob/proc/ninjajaunt set desc = "Return control to the user."
verbs += /mob/proc/ninjapulse set category = "AI Ninja Equip"
verbs += /mob/proc/ninjastar set src = usr.loc
verbs += /mob/proc/ninjanet
mind.special_verbs += /mob/proc/ninjashift AI << browse(null, "window=hack spideros")//Close window
mind.special_verbs += /mob/proc/ninjajaunt AI << "You have seized your hacking attempt. [affecting] has regained control."
mind.special_verbs += /mob/proc/ninjapulse affecting << "<b>UPDATE</b>: [AI.real_name] has ceased hacking attempt. All systems clear."
mind.special_verbs += /mob/proc/ninjastar
mind.special_verbs += /mob/proc/ninjanet verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
verbs -= /mob/proc/ninjaslayer
verbs -= /mob/proc/ninjawalk return
verbs -= /mob/proc/ninjamirage */
mind.special_verbs -= /mob/proc/ninjaslayer
mind.special_verbs -= /mob/proc/ninjawalk //Workaround
mind.special_verbs -= /mob/proc/ninjamirage /obj/proc_holder/ai_holo_clear
name = "Clear Hologram"
desc = "Stops projecting the current holographic image."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_holo_clear/Click()
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT
del(S.hologram.i_attached)
del(S.hologram)
var/obj/proc_holder/ai_holo_clear/D_C = locate() in S.AI
S.AI.proc_holder_list -= D_C
return return
//AI COUNTER HACKING=================================== /obj/proc_holder/ai_instruction//Let's the AI know what they can do.
name = "Instructions"
desc = "Displays a list of helpful information."
panel = "AI Ninja Equip"
density = 0
opacity = 0
/obj/proc_holder/ai_instruction/Click()
loc << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
//I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
//This is the best work-around I could come up with. Uses objects to then display to panel, based on the object spell system.
//Can be added on to pretty easily.
/obj/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely. /obj/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely.
name = "Hack SpiderOS" name = "Hack SpiderOS"
desc = "Hack directly into the Black Widow(tm) neuro-interface." desc = "Hack directly into the Black Widow(tm) neuro-interface."
panel = "AI Hacking" panel = "AI Ninja Equip"
density = 0 density = 0
opacity = 0 opacity = 0
/obj/proc_holder/ai_hack_ninja/Click()//When you click on it. /obj/proc_holder/ai_hack_ninja/Click()//When you click on it.
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT var/obj/item/clothing/suit/space/space_ninja/S = loc.loc
S.hack_spideros() S.hack_spideros()
return return
/obj/proc_holder/ai_return_control /obj/proc_holder/ai_return_control
name = "Relinquish Control" name = "Relinquish Control"
desc = "Return control to the user." desc = "Return control to the user."
panel = "AI Hacking" panel = "AI Ninja Equip"
density = 0 density = 0
opacity = 0 opacity = 0
@@ -197,16 +339,9 @@ ________________________________________________________________________________
var/mob/living/silicon/ai/A = loc var/mob/living/silicon/ai/A = loc
var/obj/item/clothing/suit/space/space_ninja/S = A.loc var/obj/item/clothing/suit/space/space_ninja/S = A.loc
A << browse(null, "window=hack spideros")//Close window A << browse(null, "window=hack spideros")//Close window
S.control = 1//Return control
A << "You have seized your hacking attempt. [S.affecting] has regained control." A << "You have seized your hacking attempt. [S.affecting] has regained control."
S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear." S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear."
var/obj/proc_holder/ai_hack_ninja/B_C = locate() in A S.remove_AI_verbs()
A.proc_holder_list -= src
A.proc_holder_list -= B_C
S.verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
S.verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
del(B_C)//First, to keep the proc going.
del(src)
return return
/obj/item/clothing/suit/space/space_ninja/proc/hack_spideros() /obj/item/clothing/suit/space/space_ninja/proc/hack_spideros()
@@ -235,6 +370,7 @@ ________________________________________________________________________________
dat += "<h4><img src=sos_1.png> Available Functions:</h4>" dat += "<h4><img src=sos_1.png> Available Functions:</h4>"
dat += "<ul>" dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=Shock'><img src=sos_4.png> Shock [U.real_name]</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Shock'><img src=sos_4.png> Shock [U.real_name]</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=4'><img src=sos_6.png> Activate Abilities</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=sos_3.png> Medical Screen</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=1'><img src=sos_3.png> Medical Screen</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=sos_5.png> Atmos Scan</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=2'><img src=sos_5.png> Atmos Scan</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=sos_12.png> Messenger</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=sos_12.png> Messenger</a></li>"
@@ -308,16 +444,28 @@ ________________________________________________________________________________
if(32)//Only leaving this in for funnays. CAN'T LET YOU DO THAT STAR FOX if(32)//Only leaving this in for funnays. CAN'T LET YOU DO THAT STAR FOX
dat += "<h4><img src=sos_1.png> Hidden Menu:</h4>" dat += "<h4><img src=sos_1.png> Hidden Menu:</h4>"
dat += "Hostile runtime intrusion detected: operation locked. The Spider Clan is watching you, <b>INTRUDER</b>." dat += "Hostile runtime intrusion detected: operation locked. The Spider Clan is watching you, <b>INTRUDER</b>."
if(4)
dat += "<h4><img src=sos_6.png> Activate Abilities:</h4>"
dat += "<ul>"
dat += "<li><a href='byond://?src=\ref[src];choice=Phase Jaunt'><img src=sos_13.png> Phase Jaunt</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Phase Shift'><img src=sos_13.png> Phase Shift</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Energy Blade'><img src=sos_13.png> Energy Blade</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Energy Star'><img src=sos_13.png> Energy Star</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Energy Net'><img src=sos_13.png> Energy Net</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=EM Pulse'><img src=sos_13.png> EM Pulse</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Smoke Bomb'><img src=sos_13.png> Smoke Bomb</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Adrenaline Boost'><img src=sos_13.png> Adrenaline Boost</a></li>"
dat += "</ul>"
dat += "</body></html>" dat += "</body></html>"
A << browse(dat,"window=hack spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0") A << browse(dat,"window=hack spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
//DEBUG=================================== //DEBUG===================================
/* /*
Most of these are at various points of incomplete.
/mob/verb/grant_object_panel() /mob/verb/grant_object_panel()
set name = "Grant AI Ninja Verbs Debug" set name = "Grant AI Ninja Verbs Debug"
set category = "Ninja Debug" set category = "Ninja Debug"
@@ -367,17 +515,40 @@ mob/verb/remove_object_panel()
world << "DIR: [get_dir_to(src.loc,M.loc)]" world << "DIR: [get_dir_to(src.loc,M.loc)]"
return return
//
//Switches keys with AI stored inside suit. Useful for quickly testing things. /mob/verb/kill_self_debug()
set name = "DEBUG Kill Self"
var/ninja_debug_target//Easiest way to do this. The proc below sets this variable to your mob.
/mob/verb/possess_mob(var/mob/M in oview())
set name = "Possess Mob"
set category = "Ninja Debug" set category = "Ninja Debug"
if(!M.client) src:death()
client.mob = M
/client/verb/switch_client_debug()
set name = "DEBUG Switch Client"
set category = "Ninja Debug"
mob = mob:loc:loc
/mob/verb/possess_mob(var/mob/M in oview())
set name = "DEBUG Possess Mob"
set category = "Ninja Debug"
client.mob = M
/client/verb/switcharoo(var/mob/M in oview())
set name = "DEBUG Switch to AI"
set category = "Ninja Debug"
var/mob/last_mob = mob
mob = M
last_mob:wear_suit:AI:key = key
//
/client/verb/ninjaget(var/mob/M in oview())
set name = "DEBUG Ninja GET"
set category = "Ninja Debug"
mob = M
M.gib()
space_ninja()
/mob/verb/set_debug_ninja_target() /mob/verb/set_debug_ninja_target()
set name = "Set Debug Target" set name = "Set Debug Target"

View File

@@ -45,7 +45,7 @@
obj/hud/New(var/type = 0) obj/hud/New(var/type = 0)
src.instantiate(type) instantiate(type)
..() ..()
return return
@@ -76,41 +76,37 @@ obj/hud/New(var/type = 0)
/obj/hud/proc/instantiate(var/type = 0) /obj/hud/proc/instantiate(var/type = 0)
mymob = src.loc mymob = loc
ASSERT(istype(mymob, /mob)) ASSERT(istype(mymob, /mob))
if(istype(mymob, /mob/living/carbon/human)) if(ishuman(mymob))
src.human_hud(mymob.UI) // Pass the player the UI style chosen in preferences human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
return else if(ismonkey(mymob))
monkey_hud(mymob.UI)
if(istype(mymob, /mob/living/carbon/monkey)) else if(isbrain(mymob))
src.monkey_hud(mymob.UI) brain_hud(mymob.UI)
return
//aliens else if(islarva(mymob))
if(istype(mymob, /mob/living/carbon/alien/larva)) larva_hud()
src.larva_hud()
else if(istype(mymob, /mob/living/carbon/alien))
src.alien_hud()
return
if(istype(mymob, /mob/living/silicon/ai)) else if(isalien(mymob))
src.ai_hud() alien_hud()
return
if(istype(mymob, /mob/living/silicon/robot)) else if(isAI(mymob))
src.robot_hud() ai_hud()
return
if(istype(mymob, /mob/living/silicon/hivebot)) else if(isrobot(mymob))
src.hivebot_hud() robot_hud()
return
if(istype(mymob, /mob/living/silicon/hive_mainframe)) else if(ishivebot(mymob))
src.hive_mainframe_hud() hivebot_hud()
return
if(istype(mymob, /mob/dead/observer)) else if(ishivemainframe(mymob))
src.ghost_hud() hive_mainframe_hud()
return
else if(isobserver(mymob))
ghost_hud()
return

View File

@@ -14,134 +14,134 @@
switch(state) switch(state)
if(0) if(0)
if(istype(P, /obj/item/weapon/wrench)) if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1) playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
user << "\blue You wrench the frame into place." user << "\blue You wrench the frame into place."
src.anchored = 1 anchored = 1
src.state = 1 state = 1
if(istype(P, /obj/item/weapon/weldingtool)) if(istype(P, /obj/item/weapon/weldingtool))
playsound(src.loc, 'Welder.ogg', 50, 1) playsound(loc, 'Welder.ogg', 50, 1)
P:welding = 2 P:welding = 2
if(do_after(user, 20)) if(do_after(user, 20))
user << "\blue You deconstruct the frame." user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/r_metal( src.loc, 4) new /obj/item/stack/sheet/r_metal( loc, 4)
del(src) del(src)
P:welding = 1 P:welding = 1
if(1) if(1)
if(istype(P, /obj/item/weapon/wrench)) if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'Ratchet.ogg', 50, 1) playsound(loc, 'Ratchet.ogg', 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
user << "\blue You unfasten the frame." user << "\blue You unfasten the frame."
src.anchored = 0 anchored = 0
src.state = 0 state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit) if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
playsound(src.loc, 'Deconstruct.ogg', 50, 1) playsound(loc, 'Deconstruct.ogg', 50, 1)
user << "\blue You place the circuit board inside the frame." user << "\blue You place the circuit board inside the frame."
src.icon_state = "1" icon_state = "1"
src.circuit = P circuit = P
user.drop_item() user.drop_item()
P.loc = src P.loc = src
if(istype(P, /obj/item/weapon/screwdriver) && circuit) if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'Screwdriver.ogg', 50, 1) playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You screw the circuit board into place." user << "\blue You screw the circuit board into place."
src.state = 2 state = 2
src.icon_state = "2" icon_state = "2"
if(istype(P, /obj/item/weapon/crowbar) && circuit) if(istype(P, /obj/item/weapon/crowbar) && circuit)
playsound(src.loc, 'Crowbar.ogg', 50, 1) playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the circuit board." user << "\blue You remove the circuit board."
src.state = 1 state = 1
src.icon_state = "0" icon_state = "0"
circuit.loc = src.loc circuit.loc = loc
src.circuit = null circuit = null
if(2) if(2)
if(istype(P, /obj/item/weapon/screwdriver) && circuit) if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'Screwdriver.ogg', 50, 1) playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You unfasten the circuit board." user << "\blue You unfasten the circuit board."
src.state = 1 state = 1
src.icon_state = "1" icon_state = "1"
if(istype(P, /obj/item/weapon/cable_coil)) if(istype(P, /obj/item/weapon/cable_coil))
if(P:amount >= 5) if(P:amount >= 5)
playsound(src.loc, 'Deconstruct.ogg', 50, 1) playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
P:amount -= 5 P:amount -= 5
if(!P:amount) del(P) if(!P:amount) del(P)
user << "\blue You add cables to the frame." user << "\blue You add cables to the frame."
src.state = 3 state = 3
src.icon_state = "3" icon_state = "3"
if(3) if(3)
if(istype(P, /obj/item/weapon/wirecutters)) if(istype(P, /obj/item/weapon/wirecutters))
if (src.brain) if (brain)
user << "Get that brain out of there first" user << "Get that brain out of there first"
else else
playsound(src.loc, 'wirecutter.ogg', 50, 1) playsound(loc, 'wirecutter.ogg', 50, 1)
user << "\blue You remove the cables." user << "\blue You remove the cables."
src.state = 2 state = 2
src.icon_state = "2" icon_state = "2"
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc ) var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( loc )
A.amount = 5 A.amount = 5
if(istype(P, /obj/item/stack/sheet/rglass)) if(istype(P, /obj/item/stack/sheet/rglass))
if(P:amount >= 2) if(P:amount >= 2)
playsound(src.loc, 'Deconstruct.ogg', 50, 1) playsound(loc, 'Deconstruct.ogg', 50, 1)
if(do_after(user, 20)) if(do_after(user, 20))
if (P) if (P)
P:amount -= 2 P:amount -= 2
if(!P:amount) del(P) if(!P:amount) del(P)
user << "\blue You put in the glass panel." user << "\blue You put in the glass panel."
src.state = 4 state = 4
src.icon_state = "4" icon_state = "4"
if(istype(P, /obj/item/weapon/aiModule/asimov)) if(istype(P, /obj/item/weapon/aiModule/asimov))
src.laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.") laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
src.laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.") laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
src.laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.") laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
usr << "Law module applied." usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/purge)) if(istype(P, /obj/item/weapon/aiModule/purge))
src.laws.clear_inherent_laws() laws.clear_inherent_laws()
usr << "Law module applied." usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/freeform)) if(istype(P, /obj/item/weapon/aiModule/freeform))
var/obj/item/weapon/aiModule/freeform/M = P var/obj/item/weapon/aiModule/freeform/M = P
src.laws.add_inherent_law(M.newFreeFormLaw) laws.add_inherent_law(M.newFreeFormLaw)
usr << "Added a freeform law." usr << "Added a freeform law."
if(istype(P, /obj/item/device/mmi)) if(istype(P, /obj/item/device/mmi))
if(!P:brain) if(!P:brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose." user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return return
if(P:brain.brainmob.stat == 2) if(P:brainmob.stat == 2)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose." user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return return
user.drop_item() user.drop_item()
P.loc = src P.loc = src
src.brain = P brain = P
usr << "Added a brain." usr << "Added a brain."
src.icon_state = "3b" icon_state = "3b"
if(istype(P, /obj/item/weapon/crowbar) && src.brain) if(istype(P, /obj/item/weapon/crowbar) && brain)
playsound(src.loc, 'Crowbar.ogg', 50, 1) playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the brain." user << "\blue You remove the brain."
src.brain.loc = src.loc brain.loc = loc
src.brain = null brain = null
src.icon_state = "3" icon_state = "3"
if(4) if(4)
if(istype(P, /obj/item/weapon/crowbar)) if(istype(P, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1) playsound(loc, 'Crowbar.ogg', 50, 1)
user << "\blue You remove the glass panel." user << "\blue You remove the glass panel."
src.state = 3 state = 3
if (src.brain) if (brain)
src.icon_state = "3b" icon_state = "3b"
else else
src.icon_state = "3" icon_state = "3"
new /obj/item/stack/sheet/rglass( src.loc, 2 ) new /obj/item/stack/sheet/rglass( loc, 2 )
if(istype(P, /obj/item/weapon/screwdriver)) if(istype(P, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1) playsound(loc, 'Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor." user << "\blue You connect the monitor."
new /mob/living/silicon/ai ( src.loc, laws, brain ) new /mob/living/silicon/ai ( loc, laws, brain )
del(src) del(src)
/obj/AIcore/deactivated /obj/AIcore/deactivated

View File

@@ -36,7 +36,7 @@
monkeymeat monkeymeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
output = /obj/item/weapon/reagent_containers/food/snacks/faggot output = /obj/item/weapon/reagent_containers/food/snacks/faggot
humanmeat humanmeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/human input = /obj/item/weapon/reagent_containers/food/snacks/meat/human
output = /obj/item/weapon/reagent_containers/food/snacks/faggot output = /obj/item/weapon/reagent_containers/food/snacks/faggot
@@ -48,11 +48,6 @@
/* mobs */ /* mobs */
mob mob
process(loc, what) process(loc, what)
var/mob/O = what
if (O.client)
var/mob/dead/observer/newmob = new/mob/dead/observer(O)
O.client.mob = newmob
newmob.client.eye = newmob
..() ..()
@@ -71,7 +66,7 @@
return return
var/obj/item/weapon/reagent_containers/glass/bucket/bucket_of_blood = new(loc) var/obj/item/weapon/reagent_containers/glass/bucket/bucket_of_blood = new(loc)
var/datum/reagent/blood/B = new() var/datum/reagent/blood/B = new()
B.holder = bucket_of_blood B.holder = bucket_of_blood
B.volume = 70 B.volume = 70
//set reagent data //set reagent data
B.data["donor"] = O B.data["donor"] = O
@@ -108,7 +103,7 @@
if (istype(O, /obj/item/weapon/grab)) if (istype(O, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = O var/obj/item/weapon/grab/G = O
what = G.affecting what = G.affecting
var/datum/food_processor_process/P = select_recipe(what) var/datum/food_processor_process/P = select_recipe(what)
if (!P) if (!P)
user << "\red That probably won't blend." user << "\red That probably won't blend."

View File

@@ -697,36 +697,39 @@
return 0 return 0
/obj/mecha/proc/mmi_move_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob) /obj/mecha/proc/mmi_move_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
if(!mmi_as_oc.brain || !mmi_as_oc.brain.brainmob || !mmi_as_oc.brain.brainmob.client) if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
user << "Consciousness matrix not detected." user << "Consciousness matrix not detected."
return 0 return 0
if(mmi_as_oc.brain.brainmob.stat) else if(mmi_as_oc.brainmob.stat)
user << "Beta-rhythm below acceptable level." user << "Beta-rhythm below acceptable level."
return 0 return 0
if(src.occupant) else if(occupant)
return 0 return 0
if(src.dna && src.dna!=mmi_as_oc.brain.brainmob.dna.unique_enzymes) else if(dna && dna!=mmi_as_oc.brainmob.dna.unique_enzymes)
user << "Stop it!" user << "Stop it!"
return 0 return 0
//Added a message here since people assume their first click failed or something./N
user << "Installing MMI, please stand by."
if(do_after(20)) if(do_after(20))
if(!src.occupant) if(!occupant)
return mmi_moved_inside(mmi_as_oc,user) return mmi_moved_inside(mmi_as_oc,user)
else
user << "Occupant detected."
return 0 return 0
/obj/mecha/proc/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob) /obj/mecha/proc/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
if(mmi_as_oc && user in range(1)) if(mmi_as_oc && user in range(1))
if(!mmi_as_oc.brain || !mmi_as_oc.brain.brainmob || !mmi_as_oc.brain.brainmob.client) if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
user << "Consciousness matrix not detected." user << "Consciousness matrix not detected."
return 0 return 0
if(mmi_as_oc.brain.brainmob.stat) else if(mmi_as_oc.brainmob.stat)
user << "Beta-rhythm below acceptable level." user << "Beta-rhythm below acceptable level."
return 0 return 0
user.drop_from_slot(mmi_as_oc) user.drop_from_slot(mmi_as_oc)
var/mob/brainmob = mmi_as_oc.brain.brainmob var/mob/brainmob = mmi_as_oc.brainmob
brainmob.client.eye = src brainmob.client.eye = src
brainmob.client.perspective = EYE_PERSPECTIVE brainmob.client.perspective = EYE_PERSPECTIVE
src.occupant = brainmob occupant = brainmob
brainmob.loc = src //should allow relaymove brainmob.loc = src //should allow relaymove
brainmob.canmove = 1 brainmob.canmove = 1
mmi_as_oc.loc = src mmi_as_oc.loc = src
@@ -742,7 +745,6 @@
else else
return 0 return 0
/obj/mecha/verb/view_stats() /obj/mecha/verb/view_stats()
set name = "View Stats" set name = "View Stats"
set category = "Exosuit Interface" set category = "Exosuit Interface"
@@ -776,10 +778,10 @@
/obj/mecha/proc/go_out() /obj/mecha/proc/go_out()
if(!src.occupant) return if(!src.occupant) return
var/atom/movable/mob_container var/atom/movable/mob_container
if(ishuman(src.occupant)) if(ishuman(occupant))
mob_container = src.occupant mob_container = src.occupant
else if(istype(src.occupant, /mob/living/carbon/brain)) else if(istype(occupant, /mob/living/carbon/brain))
var/mob/living/carbon/brain/brain = src.occupant var/mob/living/carbon/brain/brain = occupant
mob_container = brain.container mob_container = brain.container
else else
return return
@@ -792,8 +794,8 @@
src.occupant << browse(null, "window=exosuit") src.occupant << browse(null, "window=exosuit")
if(istype(mob_container, /obj/item/device/mmi)) if(istype(mob_container, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = mob_container var/obj/item/device/mmi/mmi = mob_container
if(mmi.brain) if(mmi.brainmob)
src.occupant.loc = mmi.brain occupant.loc = mmi
mmi.mecha = null mmi.mecha = null
src.occupant.canmove = 0 src.occupant.canmove = 0
src.verbs += /obj/mecha/verb/eject src.verbs += /obj/mecha/verb/eject
@@ -907,7 +909,7 @@
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/mmi)) if(istype(W, /obj/item/device/mmi))
if(src.mmi_move_inside(W,user)) if(mmi_move_inside(W,user))
user << "[src]-MMI interface initialized successfuly" user << "[src]-MMI interface initialized successfuly"
else else
user << "[src]-MMI interface initialization failed." user << "[src]-MMI interface initialization failed."

View File

@@ -192,6 +192,8 @@
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
if (cartridge.access_reagent_scanner) if (cartridge.access_reagent_scanner)
dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Reagent Scan'><img src=pda_reagent.png> [scanmode == 3 ? "Disable" : "Enable"] Reagent Scanner</a></li>"
if (cartridge.access_engine)
dat += "<li><a href='byond://?src=\ref[src];choice=Halogen Counter'><img src=pda_reagent.png> [scanmode == 4 ? "Disable" : "Enable"] Halogen Counter</a></li>"
if (cartridge.access_remote_door) if (cartridge.access_remote_door)
dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Toggle Door'><img src=pda_rdoor.png> Toggle Remote Door</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=3'><img src=pda_atmos.png> Atmospheric Scan</a></li>"
@@ -289,7 +291,8 @@
/obj/item/device/pda/Topic(href, href_list) /obj/item/device/pda/Topic(href, href_list)
..() ..()
var/mob/living/U = usr var/mob/living/U = usr
if (U.contents.Find(src) || U.contents.Find(master) || (istype(loc, /turf) && get_dist(src, U) <= 1)) //Looking for master was kind of pointless since PDAs don't appear to have one.
if (U.contents.Find(src) || (istype(loc, /turf) && get_dist(src, U) <= 1))
if ( !(U.stat || U.restrained()) ) if ( !(U.stat || U.restrained()) )
add_fingerprint(U) add_fingerprint(U)
@@ -368,6 +371,11 @@
scanmode = 0 scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner)) else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner))
scanmode = 3 scanmode = 3
if("Halogen Counter")
if(scanmode == 4)
scanmode = 0
else if((!isnull(cartridge)) && (cartridge.access_engine))
scanmode = 4
if("Honk") if("Honk")
if ( !(last_honk && world.time < last_honk + 20) ) if ( !(last_honk && world.time < last_honk + 20) )
playsound(loc, 'bikehorn.ogg', 50, 1) playsound(loc, 'bikehorn.ogg', 50, 1)
@@ -589,7 +597,6 @@
cartridge = C cartridge = C
if (C:radio) if (C:radio)
C:radio.hostpda = src C:radio.hostpda = src
updateUsrDialog()
else if (istype(C, /obj/item/weapon/card/id) && C:registered) else if (istype(C, /obj/item/weapon/card/id) && C:registered)
if(!owner) if(!owner)
@@ -597,18 +604,27 @@
ownjob = C:assignment ownjob = C:assignment
name = "PDA-[owner] ([ownjob])" name = "PDA-[owner] ([ownjob])"
user << "\blue Card scanned." user << "\blue Card scanned."
else if(alert("Would you like to inert the card or update owner information?",,"Insert","Update")=="Insert")
id_check(user, 2)
else else
if(!(owner == C:registered)) var/input=alert("Would you like to inert the card or update owner information?",,"Insert","Update")
user << "\blue Name on card does not match registered name. Please try again." //Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
else if((owner == C:registered) && (ownjob == C:assignment))
user << "\blue Rank is up to date." if ( (user.contents.Find(src) && user.contents.Find(C)) || (istype(loc, /turf) && get_dist(src, user) <= 1 && user.contents.Find(C)) )
else if((owner == C:registered) && (ownjob != C:assignment)) if ( !(user.stat || user.restrained()) )//If they can still act.
ownjob = C:assignment if(input=="Insert")
name = "PDA-[owner] ([ownjob])" id_check(user, 2)
user << "\blue Rank updated." else
updateSelfDialog() if(!(owner == C:registered))
user << "\blue Name on card does not match registered name. Please try again."
else if((owner == C:registered) && (ownjob == C:assignment))
user << "\blue Rank is up to date."
else if((owner == C:registered) && (ownjob != C:assignment))
ownjob = C:assignment
name = "PDA-[owner] ([ownjob])"
user << "\blue Rank updated."
updateSelfDialog()//Update self dialog on success.
return//Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
return return
/obj/item/device/pda/attack(mob/C as mob, mob/user as mob) /obj/item/device/pda/attack(mob/C as mob, mob/user as mob)
@@ -639,6 +655,16 @@
spawn(15) spawn(15)
user << "\blue Blood type: [C:blood_type]\nDNA: [C:blood_DNA]" user << "\blue Blood type: [C:blood_type]\nDNA: [C:blood_DNA]"
if(4)
for (var/mob/O in viewers(C, null))
O.show_message("\red [user] has analyzed [C]'s radiation levels!", 1)
user.show_message("\blue Analyzing Results for [C]:")
if(C.radiation)
user.show_message("\green Radiation Level: \black [C.radiation]")
else
user.show_message("\blue No radiation detected.")
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob) /obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
switch(scanmode) switch(scanmode)
if(2) if(2)

View File

@@ -292,34 +292,22 @@
src.attack_self(M) src.attack_self(M)
return return
/obj/item/brain/examine() // -- TLE /obj/item/brain/examine() // -- TLE
set src in oview(12) set src in oview(12)
if (!( usr )) if (!( usr ))
return return
usr << "This is \icon[src] \an [src.name]." usr << "This is \icon[src] \an [name]."
if(src.owner) if(brainmob)//if thar be a brain inside... the brain.
//if the brain has an owner corpse usr << "You can feel the small spark of life still left in this one."
if(src.owner.client)
//if the player hasn't ghosted
usr << "You can feel the small spark of life still in this one."
else
//if the player HAS ghosted
for(var/mob/dead/observer/O in world)
if(O.corpse == src.owner && O.client)
//find their ghost
usr << "You can feel the small spark of life still in this one."
else else
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Perhaps not." usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not."
/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) /obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob)) if(!istype(M, /mob))
return return
src.add_fingerprint(user) add_fingerprint(user)
if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human)) if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human))
return ..() return ..()
@@ -330,7 +318,7 @@
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
// you can't stab someone in the eyes wearing a mask! // you can't stab someone in the eyes wearing a mask!
user << "\blue You're going to need to remove that mask/helmet/glasses first." user << "\blue You're going to need to remove their head cover first."
return return
//since these people will be dead M != usr //since these people will be dead M != usr
@@ -350,27 +338,14 @@
else else
user << "\red You insert [src] into your head!" user << "\red You insert [src] into your head!"
if(M.client)
M.client.mob = new/mob/dead/observer(M)
//a mob can't have two clients so get rid of one
//this might actually be outdated since barring badminnery, a debrain'd body will have any client sucked out to the brain's internal mob. Leaving it anyway to be safe. --NEO //this might actually be outdated since barring badminnery, a debrain'd body will have any client sucked out to the brain's internal mob. Leaving it anyway to be safe. --NEO
src.brainmob.mind.transfer_to(M) if(M.key)//Revised. /N
src.brainmob = null M.ghostize(1)
// if(src.owner)
//if the brain has an owner corpse if(brainmob.mind)
// if(src.owner.client) brainmob.mind.transfer_to(M)
//if the player hasn't ghosted else
// src.owner.client.mob = M M.key = brainmob.key
//then put them in M
// else
//if the player HAS ghosted
// for(var/mob/dead/observer/O in world)
// if(O.corpse == src.owner && O.client)
//find their ghost
// O.client.mob = M
//put their mob in M
// del(O)
//delete thier ghost
M:brain_op_stage = 3.0 M:brain_op_stage = 3.0
@@ -388,7 +363,6 @@
..() ..()
return return
/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE /obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE
var/temp_sides var/temp_sides
if(src.sides < 1) if(src.sides < 1)

View File

@@ -65,7 +65,6 @@
var/obj/item/robot_parts/r_leg/r_leg = null var/obj/item/robot_parts/r_leg/r_leg = null
var/obj/item/robot_parts/chest/chest = null var/obj/item/robot_parts/chest/chest = null
var/obj/item/robot_parts/head/head = null var/obj/item/robot_parts/head/head = null
var/obj/item/brain/brain = null
var/created_name = "Cyborg" var/created_name = "Cyborg"
/obj/item/robot_parts/robot_suit/New() /obj/item/robot_parts/robot_suit/New()
@@ -151,50 +150,49 @@
user << "\blue You need to attach a flash to it first!" user << "\blue You need to attach a flash to it first!"
if(istype(W, /obj/item/device/mmi)) if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = W var/obj/item/device/mmi/M = W
if(src.check_completion()) if(check_completion())
if(!istype(src.loc,/turf)) if(!istype(loc,/turf))
user << "\red You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise." user << "\red You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise."
return return
if(!mmi.brain) if(!M.brainmob)
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose." user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
return return
if(mmi.brain.brainmob.stat == 2) if(M.brainmob.stat == 2)
user << "\red Sticking a dead brain into the frame would sort of defeat the purpose." user << "\red Sticking a dead brain into the frame would sort of defeat the purpose."
return return
user.drop_item()
mmi.loc = src
src.brain = mmi
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(src.loc))
if(!O) return
//O.start = 1
O.invisibility = 0
O.name = src.created_name
O.real_name = src.created_name
if (mmi.brain.brainmob && mmi.brain.brainmob.mind) var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
mmi.brain.brainmob.mind.transfer_to(O) if(!O) return
user.drop_item()
O.invisibility = 0
O.name = created_name
O.real_name = created_name
if (M.brainmob && M.brainmob.mind)
M.brainmob.mind.transfer_to(O)
else else
for(var/mob/dead/observer/G in world) for(var/mob/dead/observer/G in world)
if(G.corpse == mmi.brain.brainmob && G.client && G.corpse.mind) if(G.corpse == M.brainmob && G.client && G.corpse.mind)
G.corpse.mind.transfer_to(O) G.corpse.mind.transfer_to(O)
del(G) del(G)
break break
if(O.mind) if(O.mind && O.mind.special_role)
if(O.mind.special_role) O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite") O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
O.loc = src.loc
O << "<B>You are playing a Robot. The Robot can interact with most electronic objects in its view point.</B>" O << "<B>You are playing a Robot. The Robot can interact with most electronic objects in its view point.</B>"
O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>" O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>"
O << "To use something, simply double-click it." O << "To use something, simply double-click it."
O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."} O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
//SN src = null
O.job = "Cyborg" O.job = "Cyborg"
O.cell = src.chest.cell O.cell = chest.cell
O.cell.loc = O O.cell.loc = O
O.brain = mmi W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
O.mmi = W
del(src) del(src)
else else

View File

@@ -420,11 +420,12 @@ CIRCULAR SAW
"\red You sever your brain's connection to the spine with [src]!" \ "\red You sever your brain's connection to the spine with [src]!" \
) )
M:brain_op_stage = 4.0 var/obj/item/brain/B = new(M.loc)
M.death() B.transfer_identity(M)
M:brain_op_stage = 4.0
M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
var/obj/item/brain/B = new (M.loc)
B.owner = M
else else
..() ..()
return return

View File

@@ -13,13 +13,8 @@
src.occupied = 1 src.occupied = 1
src.meat = 5 src.meat = 5
src.meattype = 1 src.meattype = 1
var/mob/dead/observer/newmob
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
if (G.affecting.client)
newmob = new/mob/dead/observer(G.affecting)
G.affecting:client:mob = newmob
newmob:client:eye = newmob
del(G.affecting) del(G.affecting)
del(G) del(G)
@@ -31,13 +26,8 @@
src.occupied = 1 src.occupied = 1
src.meat = 5 src.meat = 5
src.meattype = 2 src.meattype = 2
var/mob/dead/observer/newmob
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!")) O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
if (G.affecting.client)
newmob = new/mob/dead/observer(G.affecting)
G.affecting:client:mob = newmob
newmob:client:eye = newmob
del(G.affecting) del(G.affecting)
del(G) del(G)
else else

View File

@@ -4,12 +4,12 @@
initialize() initialize()
/obj/item/device/radio/initialize() /obj/item/device/radio/initialize()
if(src.freerange) if(freerange)
if(src.frequency < 1200 || src.frequency > 1600) if(frequency < 1200 || frequency > 1600)
src.frequency = sanitize_frequency(src.frequency) frequency = sanitize_frequency(frequency)
else if (src.frequency < 1441 || src.frequency > 1489) else if (frequency < 1441 || frequency > 1489)
world.log << "[src] ([src.type]) has a frequency of [src.frequency], sanitizing." world.log << "[src] ([type]) has a frequency of [frequency], sanitizing."
src.frequency = sanitize_frequency(src.frequency) frequency = sanitize_frequency(frequency)
set_frequency(frequency) set_frequency(frequency)
@@ -33,12 +33,12 @@
/obj/item/device/radio/proc/interact(mob/user as mob) /obj/item/device/radio/proc/interact(mob/user as mob)
var/dat = {" var/dat = {"
<html><head><title>[src]</title></head><body><TT> <html><head><title>[src]</title></head><body><TT>
Microphone: [src.broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR> Microphone: [broadcasting ? "<A href='byond://?src=\ref[src];talk=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];talk=1'>Disengaged</A>"]<BR>
Speaker: [src.listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR> Speaker: [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
Frequency: Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A> <A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A> <A href='byond://?src=\ref[src];freq=-2'>-</A>
[format_frequency(src.frequency)] [format_frequency(frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A> <A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>"} <A href='byond://?src=\ref[src];freq=10'>+</A><BR>"}
@@ -50,13 +50,13 @@ Frequency:
return return
/obj/item/device/radio/proc/text_wires() /obj/item/device/radio/proc/text_wires()
if (!src.b_stat) if (!b_stat)
return "" return ""
return {" return {"
<hr> <hr>
Green Wire: <A href='byond://?src=\ref[src];wires=4'>[(src.wires & 4) ? "Cut" : "Mend"] Wire</A><BR> Green Wire: <A href='byond://?src=\ref[src];wires=4'>[(wires & 4) ? "Cut" : "Mend"] Wire</A><BR>
Red Wire: <A href='byond://?src=\ref[src];wires=2'>[(src.wires & 2) ? "Cut" : "Mend"] Wire</A><BR> Red Wire: <A href='byond://?src=\ref[src];wires=2'>[(wires & 2) ? "Cut" : "Mend"] Wire</A><BR>
Blue Wire: <A href='byond://?src=\ref[src];wires=1'>[(src.wires & 1) ? "Cut" : "Mend"] Wire</A><BR>"} Blue Wire: <A href='byond://?src=\ref[src];wires=1'>[(wires & 1) ? "Cut" : "Mend"] Wire</A><BR>"}
/obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat) /obj/item/device/radio/proc/text_sec_channel(var/chan_name, var/chan_stat)
@@ -75,10 +75,10 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
return return
if (\ if (\
!(\ !(\
istype(usr, /mob/living/silicon) || \ issilicon(usr) || \
(\ (\
usr.contents.Find(src) || \ usr.contents.Find(src) || \
( in_range(src, usr) && istype(src.loc, /turf) )\ ( in_range(src, usr) && istype(loc, /turf) )\
)\ )\
)\ )\
) )
@@ -93,15 +93,15 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
return return
else if (href_list["freq"]) else if (href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"])) var/new_frequency = (frequency + text2num(href_list["freq"]))
if (!src.freerange || (src.frequency < 1200 || src.frequency > 1600)) if (!freerange || (frequency < 1200 || frequency > 1600))
new_frequency = sanitize_frequency(new_frequency) new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency) set_frequency(new_frequency)
if (src.traitor_frequency && src.frequency == src.traitor_frequency) if (traitor_frequency && frequency == traitor_frequency)
usr.machine = null usr.machine = null
usr << browse(null, "window=radio") usr << browse(null, "window=radio")
// now transform the regular radio, into a (disguised)syndicate uplink! // now transform the regular radio, into a (disguised)syndicate uplink!
var/obj/item/weapon/syndicate_uplink/T = src.traitorradio var/obj/item/weapon/syndicate_uplink/T = traitorradio
var/obj/item/device/radio/R = src var/obj/item/device/radio/R = src
R.loc = T R.loc = T
T.loc = usr T.loc = usr
@@ -119,11 +119,11 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
T.attack_self(usr) T.attack_self(usr)
return return
else if (href_list["talk"]) else if (href_list["talk"])
src.broadcasting = text2num(href_list["talk"]) broadcasting = text2num(href_list["talk"])
else if (href_list["listen"]) else if (href_list["listen"])
var/chan_name = href_list["ch_name"] var/chan_name = href_list["ch_name"]
if (!chan_name) if (!chan_name)
src.listening = text2num(href_list["listen"]) listening = text2num(href_list["listen"])
else else
if (channels[chan_name] & FREQ_LISTENING) if (channels[chan_name] & FREQ_LISTENING)
channels[chan_name] &= ~FREQ_LISTENING channels[chan_name] &= ~FREQ_LISTENING
@@ -133,31 +133,31 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
var/t1 = text2num(href_list["wires"]) var/t1 = text2num(href_list["wires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) )) if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
return return
if (src.wires & t1) if (wires & t1)
src.wires &= ~t1 wires &= ~t1
else else
src.wires |= t1 wires |= t1
if (!( src.master )) if (!( master ))
if (istype(src.loc, /mob)) if (istype(loc, /mob))
interact(src.loc) interact(loc)
else else
src.updateDialog() updateDialog()
else else
if (istype(src.master.loc, /mob)) if (istype(master.loc, /mob))
interact(src.master.loc) interact(master.loc)
else else
src.updateDialog() updateDialog()
src.add_fingerprint(usr) add_fingerprint(usr)
/obj/item/device/radio/talk_into(mob/M as mob, message, channel) /obj/item/device/radio/talk_into(mob/M as mob, message, channel)
var/datum/radio_frequency/connection = null // Code shared by Mport2004 for Security Headsets -- TLE var/datum/radio_frequency/connection = null // Code shared by Mport2004 for Security Headsets -- TLE
if(channel && src.channels && src.channels.len > 0) if(channel && channels && channels.len > 0)
if (channel == "department") if (channel == "department")
//world << "DEBUG: channel=\"[channel]\" switching to \"[src.channels[1]]\"" //world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
channel = src.channels[1] channel = channels[1]
connection = secure_radio_connections[channel] connection = secure_radio_connections[channel]
else else
connection = src.radio_connection connection = radio_connection
channel = null channel = null
if (!istype(connection)) if (!istype(connection))
return return
@@ -167,19 +167,18 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
var/eqjobname var/eqjobname
if (istype(M, /mob/living/carbon/human)) if (ishuman(M))
var/mob/living/carbon/human/H = M eqjobname = M:get_assignment()
eqjobname = H.get_assignment() else if (iscarbon(M))
else if (istype(M, /mob/living/carbon))
eqjobname = "No id" //only humans can wear ID eqjobname = "No id" //only humans can wear ID
else if (istype(M,/mob/living/silicon/ai)) else if (isAI(M))
eqjobname = "AI" eqjobname = "AI"
else if (istype(M,/mob/living/silicon/robot)) else if (isrobot(M))
eqjobname = "Android" eqjobname = "Cyborg"//Androids don't really describe these too well, in my opinion.
else else
eqjobname = "Unknown" eqjobname = "Unknown"
if (!(src.wires & WIRE_TRANSMIT)) if (!(wires & WIRE_TRANSMIT))
return return
var/list/receive = list() var/list/receive = list()
@@ -197,7 +196,7 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
for (var/mob/R in receive) for (var/mob/R in receive)
if (R.say_understands(M)) if (R.say_understands(M))
if (!istype(M, /mob/living/carbon/human) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice)) if (!ishuman(M) || istype(M.wear_mask, /obj/item/clothing/mask/gas/voice))
heard_masked += R heard_masked += R
else else
heard_normal += R heard_normal += R
@@ -209,7 +208,7 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
if (length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled)) if (length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled))
var/part_a = "<span class='radio'><span class='name'>" var/part_a = "<span class='radio'><span class='name'>"
//var/part_b = "</span><b> \icon[src]\[[format_frequency(src.frequency)]\]</b> <span class='message'>" //var/part_b = "</span><b> \icon[src]\[[format_frequency(frequency)]\]</b> <span class='message'>"
var/freq_text = (display_freq!=SYND_FREQ) ? format_frequency(display_freq) : "#unkn" var/freq_text = (display_freq!=SYND_FREQ) ? format_frequency(display_freq) : "#unkn"
var/part_b = "</span><b> \icon[src]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE var/part_b = "</span><b> \icon[src]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
var/part_c = "</span></span>" var/part_c = "</span></span>"
@@ -300,12 +299,12 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
R.show_message(rendered, 2) R.show_message(rendered, 2)
/obj/item/device/radio/hear_talk(mob/M as mob, msg) /obj/item/device/radio/hear_talk(mob/M as mob, msg)
if (src.broadcasting) if (broadcasting)
talk_into(M, msg) talk_into(M, msg)
/* /*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message) /obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
if ((R.frequency == src.frequency && message)) if ((R.frequency == frequency && message))
return 1 return 1
else if else if
@@ -317,13 +316,13 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
if(last_transmission && world.time < (last_transmission + TRANSMISSION_DELAY)) if(last_transmission && world.time < (last_transmission + TRANSMISSION_DELAY))
return return
last_transmission = world.time last_transmission = world.time
if (!(src.wires & WIRE_RECEIVE)) if (!(wires & WIRE_RECEIVE))
return return
if (!freq) //recieved on main frequency if (!freq) //recieved on main frequency
if (!src.listening) if (!listening)
return return
else else
var/accept = (freq==frequency && src.listening) var/accept = (freq==frequency && listening)
if (!accept) if (!accept)
for (var/ch_name in channels) for (var/ch_name in channels)
var/datum/radio_frequency/RF = secure_radio_connections[ch_name] var/datum/radio_frequency/RF = secure_radio_connections[ch_name]
@@ -336,7 +335,7 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
var/list/hear = hearers(1, T) var/list/hear = hearers(1, T)
var/list/V var/list/V
//find mobs in lockers, cryo and intellycards //find mobs in lockers, cryo and intellicards, brains, MMIs, and so on.
for (var/mob/M in world) for (var/mob/M in world)
if (isturf(M.loc)) if (isturf(M.loc))
continue //if M can hear us it is already was found by hearers() continue //if M can hear us it is already was found by hearers()
@@ -352,8 +351,8 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
set src in view() set src in view()
..() ..()
if ((in_range(src, usr) || src.loc == usr)) if ((in_range(src, usr) || loc == usr))
if (src.b_stat) if (b_stat)
usr.show_message("\blue \the [src] can be attached and modified!") usr.show_message("\blue \the [src] can be attached and modified!")
else else
usr.show_message("\blue \the [src] can not be modified or attached!") usr.show_message("\blue \the [src] can not be modified or attached!")
@@ -364,14 +363,14 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
user.machine = src user.machine = src
if (!( istype(W, /obj/item/weapon/screwdriver) )) if (!( istype(W, /obj/item/weapon/screwdriver) ))
return return
src.b_stat = !( src.b_stat ) b_stat = !( b_stat )
if (src.b_stat) if (b_stat)
user.show_message("\blue The radio can now be attached and modified!") user.show_message("\blue The radio can now be attached and modified!")
else else
user.show_message("\blue The radio can no longer be modified or attached!") user.show_message("\blue The radio can no longer be modified or attached!")
src.updateDialog() updateDialog()
//Foreach goto(83) //Foreach goto(83)
src.add_fingerprint(user) add_fingerprint(user)
return return
/obj/item/device/radio/emp_act(severity) /obj/item/device/radio/emp_act(severity)

View File

@@ -889,6 +889,16 @@ datum
reliability_base = 76 reliability_base = 76
build_path = "/obj/item/device/mmi" build_path = "/obj/item/device/mmi"
mmi_radio
name = "Radio-enabled Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
id = "mmi_radio"
req_tech = list("biotech" = 4)
build_type = PROTOLATHE | MECHFAB
materials = list("$metal" = 1200, "$glass" = 500)
reliability_base = 74
build_path = "/obj/item/device/mmi/radio_enabled"
///////////////////////////////////////// /////////////////////////////////////////
/////////////////Weapons///////////////// /////////////////Weapons/////////////////
///////////////////////////////////////// /////////////////////////////////////////

View File

@@ -123,8 +123,8 @@ When thinking about new stuff, check here to see if there are any slots unfilled
//BIOTECH //BIOTECH
1 | Bruise Pack, Scalple 1 | Bruise Pack, Scalple
2 | PANDEMIC Board, Mass Spectrometer 2 | PANDEMIC Board, Mass Spectrometer
3 | AI Core, Brains 3 | AI Core, Brains (MMI)
4 | 4 | MMI+Radio
5 | 5 |
6 | 6 |
7 | 7 |

View File

@@ -1,8 +1,8 @@
/obj/hud/proc/ghost_hud() /obj/hud/proc/ghost_hud()
src.station_explosion = new src.h_type( src ) station_explosion = new h_type( src )
src.station_explosion.icon = 'station_explosion.dmi' station_explosion.icon = 'station_explosion.dmi'
src.station_explosion.icon_state = "start" station_explosion.icon_state = "start"
src.station_explosion.layer = 20 station_explosion.layer = 20
src.station_explosion.mouse_opacity = 0 station_explosion.mouse_opacity = 0
src.station_explosion.screen_loc = "1,3" station_explosion.screen_loc = "1,3"
return return

View File

@@ -1,54 +1,92 @@
/mob/dead/observer/New(mob/corpse) /mob/dead/observer/New(mob/body, var/safety = 0)
src.invisibility = 10 invisibility = 10
src.sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
src.see_invisible = 15 see_invisible = 15
src.see_in_dark = 100 see_in_dark = 100
src.verbs += /mob/dead/observer/proc/dead_tele verbs += /mob/dead/observer/proc/dead_tele
if(corpse) if(body)
src.corpse = corpse var/turf/location = get_turf(body)//Where is the mob located?
src.loc = get_turf(corpse) if(location)//Found turf.
src.real_name = corpse.real_name loc = location
src.name = corpse.real_name else//Safety, in case a turf cannot be found.
src.verbs += /mob/dead/observer/proc/reenter_corpse loc = pick(latejoin)
real_name = body.real_name
name = body.real_name
if(!safety)
corpse = body
verbs += /mob/dead/observer/proc/reenter_corpse
/mob/proc/ghostize() /*
set category = "Special Verbs" Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
/mob/proc/ghostize(var/transfer_mind = 0)
if(key)
if(client)
client.screen.len = null//Clear the hud, just to be sure.
var/mob/dead/observer/ghost = new(src,transfer_mind)//Transfer safety to observer spawning proc.
if(transfer_mind)//When a body is destroyed.
if(mind)
mind.transfer_to(ghost)
else//They may not have a mind and be gibbed/destroyed.
ghost.key = key
else//Else just modify their key and connect them.
ghost.key = key
verbs -= /mob/proc/ghost
if (ghost.client)
ghost.client.eye = ghost
else if(transfer_mind)//Body getting destroyed but the person is not present inside.
for(var/mob/dead/observer/O in world)
if(O.corpse == src&&O.key)//If they have the same corpse and are keyed.
if(mind)
O.mind = mind//Transfer their mind if they have one.
break
return
/*
This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues.
*/
/mob/proc/ghost()
set category = "Ghost"
set name = "Ghost" set name = "Ghost"
set desc = "You cannot be revived as a ghost" set desc = "You cannot be revived as a ghost."
/*if(src.stat != 2) //this check causes nothing but troubles. Commented out for Nar-Sie's sake. --rastaf0 /*if(stat != 2) //this check causes nothing but troubles. Commented out for Nar-Sie's sake. --rastaf0
src << "Only dead people and admins get to ghost, and admins don't use this verb to ghost while alive." src << "Only dead people and admins get to ghost, and admins don't use this verb to ghost while alive."
return*/ return*/
if(src.key) if(key)
var/mob/dead/observer/ghost = new(src) var/mob/dead/observer/ghost = new(src)
ghost.key = src.key ghost.key = key
src.verbs -= /mob/proc/ghostize verbs -= /mob/proc/ghost
if (ghost.client) if (ghost.client)
ghost.client.eye = ghost ghost.client.eye = ghost
return return
/mob/proc/adminghostize() /mob/proc/adminghostize()
if(src.client) if(client)
src.client.mob = new/mob/dead/observer(src) client.mob = new/mob/dead/observer(src)
return return
/mob/dead/observer/Move(NewLoc, direct) /mob/dead/observer/Move(NewLoc, direct)
if(NewLoc) if(NewLoc)
src.loc = NewLoc loc = NewLoc
return return
if((direct & NORTH) && src.y < world.maxy) if((direct & NORTH) && y < world.maxy)
src.y++ y++
if((direct & SOUTH) && src.y > 1) if((direct & SOUTH) && y > 1)
src.y-- y--
if((direct & EAST) && src.x < world.maxx) if((direct & EAST) && x < world.maxx)
src.x++ x++
if((direct & WEST) && src.x > 1) if((direct & WEST) && x > 1)
src.x-- x--
/mob/dead/observer/examine() /mob/dead/observer/examine()
if(usr) if(usr)
usr << src.desc usr << desc
/mob/dead/observer/can_use_hands() return 0 /mob/dead/observer/can_use_hands() return 0
/mob/dead/observer/is_active() return 0 /mob/dead/observer/is_active() return 0
@@ -56,7 +94,7 @@
/mob/dead/observer/Stat() /mob/dead/observer/Stat()
..() ..()
statpanel("Status") statpanel("Status")
if (src.client.statpanel == "Status") if (client.statpanel == "Status")
if(ticker) if(ticker)
if(ticker.mode) if(ticker.mode)
//world << "DEBUG: ticker not null" //world << "DEBUG: ticker not null"
@@ -71,19 +109,16 @@
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/dead/observer/proc/reenter_corpse() /mob/dead/observer/proc/reenter_corpse()
set category = "Special Verbs" set category = "Ghost"
set name = "Re-enter Corpse" set name = "Re-enter Corpse"
if(!corpse) if(!corpse)
alert("You don't have a corpse!") alert("You don't have a corpse!")
return return
// if(corpse.stat == 2) if(client && client.holder && client.holder.state == 2)
// alert("Your body is dead!") var/rank = client.holder.rank
// return client.clear_admin_verbs()
if(src.client && src.client.holder && src.client.holder.state == 2) client.holder.state = 1
var/rank = src.client.holder.rank client.update_admins(rank)
src.client.clear_admin_verbs()
src.client.holder.state = 1
src.client.update_admins(rank)
if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat!=2) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat!=2) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work
var/S=0 var/S=0
for(var/obj/rune/R in world) for(var/obj/rune/R in world)
@@ -94,13 +129,13 @@
return return
if(corpse.ajourn) if(corpse.ajourn)
corpse.ajourn=0 corpse.ajourn=0
src.client.mob = corpse client.mob = corpse
if (corpse.stat==2) if (corpse.stat==2)
src.verbs += /mob/proc/ghostize verbs += /mob/proc/ghost
del(src) del(src)
/mob/dead/observer/proc/dead_tele() /mob/dead/observer/proc/dead_tele()
set category = "Special Verbs" set category = "Ghost"
set name = "Teleport" set name = "Teleport"
set desc= "Teleport" set desc= "Teleport"
if((usr.stat != 2) || !istype(usr, /mob/dead/observer)) if((usr.stat != 2) || !istype(usr, /mob/dead/observer))
@@ -122,7 +157,7 @@ var/list/karma_spenders = list()
/mob/dead/observer/verb/spend_karma(var/mob/M in world) // Karma system -- TLE /mob/dead/observer/verb/spend_karma(var/mob/M in world) // Karma system -- TLE
set name = "Spend Karma" set name = "Spend Karma"
set category = "Special Verbs" set category = "Ghost"
set desc = "Let the gods know whether someone's been naughty or nice. <One use only>" set desc = "Let the gods know whether someone's been naughty or nice. <One use only>"
if(!istype(M, /mob)) if(!istype(M, /mob))
usr << "\red That's not a mob. You shouldn't have even been able to specify that. Please inform your server administrator post haste." usr << "\red That's not a mob. You shouldn't have even been able to specify that. Please inform your server administrator post haste."
@@ -131,14 +166,14 @@ var/list/karma_spenders = list()
if(!M.client) if(!M.client)
usr << "\red That mob has no client connected at the moment." usr << "\red That mob has no client connected at the moment."
return return
if(src.client.karma_spent) if(client.karma_spent)
usr << "\red You've already spent your karma for the round." usr << "\red You've already spent your karma for the round."
return return
for(var/a in karma_spenders) for(var/a in karma_spenders)
if(a == src.key) if(a == key)
usr << "\red You've already spent your karma for the round." usr << "\red You've already spent your karma for the round."
return return
if(M.key == src.key) if(M.key == key)
usr << "\red You can't spend karma on yourself!" usr << "\red You can't spend karma on yourself!"
return return
var/choice = input("Give [M.name] good karma or bad karma?", "Karma") in list("Good", "Bad", "Cancel") var/choice = input("Give [M.name] good karma or bad karma?", "Karma") in list("Good", "Bad", "Cancel")
@@ -149,8 +184,8 @@ var/list/karma_spenders = list()
if(choice == "Bad") if(choice == "Bad")
M.client.karma -= 1 M.client.karma -= 1
usr << "[choice] karma spent on [M.name]." usr << "[choice] karma spent on [M.name]."
src.client.karma_spent = 1 client.karma_spent = 1
karma_spenders.Add(src.key) karma_spenders.Add(key)
if(M.client.karma <= -2 || M.client.karma >= 2) if(M.client.karma <= -2 || M.client.karma >= 2)
var/special_role = "None" var/special_role = "None"
var/assigned_role = "None" var/assigned_role = "None"
@@ -170,13 +205,13 @@ var/list/karma_spenders = list()
/mob/dead/observer/verb/toggle_alien_candidate() /mob/dead/observer/verb/toggle_alien_candidate()
set name = "Toggle Be Alien Candidate" set name = "Toggle Be Alien Candidate"
set category = "OOC" set category = "Ghost"
set desc = "Determines whether you will or will not be an alien candidate when someone bursts." set desc = "Determines whether you will or will not be an alien candidate when someone bursts."
if(src.client.be_alien) if(client.be_alien)
src.client.be_alien = 0 client.be_alien = 0
src << "You are now excluded from alien candidate lists until end of round." src << "You are now excluded from alien candidate lists until end of round."
else if(!src.client.be_alien) else if(!client.be_alien)
src.client.be_alien = 1 client.be_alien = 1
src << "You are now included in alien candidate lists until end of round." src << "You are now included in alien candidate lists until end of round."
/mob/dead/observer/memory() /mob/dead/observer/memory()

View File

@@ -32,7 +32,7 @@
if (src.key) if (src.key)
spawn(10) spawn(10)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
if (mind) mind.store_memory("Time of death: [tod]", 0) if (mind) mind.store_memory("Time of death: [tod]", 0)

View File

@@ -556,11 +556,6 @@
if(M.stat == 2) if(M.stat == 2)
M.death(1) M.death(1)
stomach_contents.Remove(M) stomach_contents.Remove(M)
if(M.client)
var/mob/dead/observer/newmob = new(M)
M:client:mob = newmob
M.mind.transfer_to(newmob)
newmob.reset_view(null)
del(M) del(M)
continue continue
if(air_master.current_cycle%3==1) if(air_master.current_cycle%3==1)

View File

@@ -7,7 +7,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return
/* /*
@@ -99,7 +99,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return

View File

@@ -25,7 +25,7 @@
if (src.client) if (src.client)
spawn(10) spawn(10)
if(src.client && src.stat == 2) if(src.client && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
if(mind) // Skie - Added check that there's someone controlling the alien if(mind) // Skie - Added check that there's someone controlling the alien
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch

View File

@@ -493,11 +493,6 @@
if(M.stat == 2) if(M.stat == 2)
M.death(1) M.death(1)
stomach_contents.Remove(M) stomach_contents.Remove(M)
if(M.client)
var/mob/dead/observer/newmob = new(M)
M:client:mob = newmob
M.mind.transfer_to(newmob)
newmob.reset_view(null)
del(M) del(M)
continue continue
if(air_master.current_cycle%3==1) if(air_master.current_cycle%3==1)

View File

@@ -7,6 +7,6 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return

View File

@@ -6,60 +6,119 @@
w_class = 3 w_class = 3
origin_tech = "biotech=3" origin_tech = "biotech=3"
var/obj/item/brain/brain = null
var/mob/living/silicon/robot = null
var/obj/mecha = null
var/locked = 0
var/list/construction_cost = list("metal"=1000,"glass"=500) var/list/construction_cost = list("metal"=1000,"glass"=500)
var/construction_time = 75 var/construction_time = 75
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO //these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
req_access = list(access_robotics) req_access = list(access_robotics)
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
var
locked = 0
mob/living/carbon/brain/brainmob = null//The current occupant.
mob/living/silicon/robot = null//Appears unused.
obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob) attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O,/obj/item/brain) && !brain) //Time to stick a brain in it --NEO if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO
if(!O:owner) if(!O:brainmob)
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain." user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
return return
for(var/mob/V in viewers(src, null)) for(var/mob/V in viewers(src, null))
V.show_message(text("\blue [user] sticks \a [O] into \the [src].")) V.show_message(text("\blue [user] sticks \a [O] into \the [src]."))
brain = O
brainmob = O:brainmob
O:brainmob = null
brainmob.loc = src
brainmob.container = src
brainmob.stat = 0
user.drop_item() user.drop_item()
O.loc = src del(O)
brain.brainmob.container = src
brain.brainmob.stat = 0 name = "Man-Machine Interface: [brainmob.real_name]"
locked = 1
name = "Man-Machine Interface: [brain.brainmob.real_name]"
icon_state = "mmi_full" icon_state = "mmi_full"
locked = 1
return return
if((istype(O,/obj/item/weapon/card/id)||istype(O,/obj/item/device/pda)) && brain) if((istype(O,/obj/item/weapon/card/id)||istype(O,/obj/item/device/pda)) && brainmob)
if(allowed(user)) if(allowed(user))
locked = !locked locked = !locked
user << "\blue You [locked ? "lock" : "unlock"] the brain holder." user << "\blue You [locked ? "lock" : "unlock"] the brain holder."
else else
user << "\red Access denied." user << "\red Access denied."
return return
if(brain) if(brainmob)
O.attack(brain.brainmob, user) O.attack(brainmob, user)//Oh noooeeeee
return return
..() ..()
attack_self(mob/user as mob) attack_self(mob/user as mob)
if(!brain) if(!brainmob)
user << "\red You upend the MMI, but there's nothing in it." user << "\red You upend the MMI, but there's nothing in it."
else if(locked) else if(locked)
user << "\red You upend the MMI, but the brain is clamped into place." user << "\red You upend the MMI, but the brain is clamped into place."
else else
user << "\blue You upend the MMI, spilling the brain onto the floor." user << "\blue You upend the MMI, spilling the brain onto the floor."
brain.loc = user.loc var/obj/item/brain/brain = new(user.loc)
brain.brainmob.container = null brainmob.container = null//Reset brainmob mmi var.
brain.brainmob.death() brainmob.loc = brain//Throw mob into brain.
brain = null brain.brainmob = brainmob//Set the brain to use the brainmob
brainmob = null//Set mmi brainmob var to null
icon_state = "mmi_empty" icon_state = "mmi_empty"
name = "Man-Machine Interface" name = "Man-Machine Interface"
proc
transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->robot people.
brainmob = new(src)
brainmob.name = H.real_name
brainmob.real_name = H.real_name
brainmob.dna = H.dna
brainmob.container = src
name = "Man-Machine Interface: [brainmob.real_name]"
icon_state = "mmi_full"
locked = 1
return
/obj/item/device/mmi/radio_enabled
name = "Radio-enabled Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
origin_tech = "biotech=4"
var/obj/item/device/radio/radio = null//Let's give it a radio.
New()
..()
radio = new(src)//Spawns a radio inside the MMI.
radio.broadcasting = 1//So it's broadcasting from the start.
verb//Allows the brain to toggle the radio functions.
Toggle_Broadcasting()
set name = "Toggle Broadcasting"
set desc = "Toggle broadcasting channel on or off."
set category = "MMI"
set src = usr.loc//In user location, or in MMI in this case.
set popup_menu = 0//Will not appear when right clicking.
if(brainmob.stat)//Only the brainmob will trigger these so no further check is necessary.
brainmob << "Can't do that while incapacitated or dead."
radio.broadcasting = radio.broadcasting==1 ? 0 : 1
brainmob << "\blue Radio is [radio.broadcasting==1 ? "now" : "no longer"] broadcasting."
Toggle_Listening()
set name = "Toggle Listening"
set desc = "Toggle listening channel on or off."
set category = "MMI"
set src = usr.loc
set popup_menu = 0
if(brainmob.stat)
brainmob << "Can't do that while incapacitated or dead."
radio.listening = radio.listening==1 ? 0 : 1
brainmob << "\blue Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast."

View File

@@ -1,5 +1,6 @@
/mob/living/carbon/brain /mob/living/carbon/brain
var/obj/item/device/mmi/container = null var
obj/item/device/mmi/container = null
New() New()
var/datum/reagents/R = new/datum/reagents(1000) var/datum/reagents/R = new/datum/reagents(1000)
@@ -7,6 +8,13 @@
R.my_atom = src R.my_atom = src
..() ..()
Del()
if(key)//If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=2)//If not dead.
death(1)//Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize(1)//Ghostize checks for key so nothing else is necessary. (1) tells that it the original body will be destroyed.
..()
say_understands(var/other) say_understands(var/other)
if (istype(other, /mob/living/silicon/ai)) if (istype(other, /mob/living/silicon/ai))
return 1 return 1
@@ -16,41 +24,4 @@
return 1 return 1
if (istype(other, /mob/living/carbon/human)) if (istype(other, /mob/living/carbon/human))
return 1 return 1
return ..() return ..()
// verb
// body_jump()
// set category = "Special Verbs"
// set name = "Check on Original Body"
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
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"
src.blurry = new src.h_type( src )
src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.blurry.name = "Blurry"
src.blurry.icon = ui_style
src.blurry.icon_state = "blurry"
src.blurry.layer = 17
src.blurry.mouse_opacity = 0
src.druggy = new src.h_type( src )
src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
src.druggy.name = "Druggy"
src.druggy.icon = ui_style
src.druggy.icon_state = "druggy"
src.druggy.layer = 17
src.druggy.mouse_opacity = 0
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "black"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0

View File

@@ -1,22 +1,21 @@
/mob/living/carbon/brain/death(gibbed) /mob/living/carbon/brain/death(gibbed)
var/cancel if(!gibbed&&container)//If not gibbed but in a container.
if(src.container) for(var/mob/O in viewers(container, null))
if (!gibbed) O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
for(var/mob/O in viewers(src.container, null)) container.icon_state = "mmi_dead"
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2) stat = 2
src.container.icon_state = "mmi_dead"
src.stat = 2
if(src.blind) if(blind)
src.blind.layer = 0 blind.layer = 0
src.sight |= SEE_TURFS sight |= SEE_TURFS
src.sight |= SEE_MOBS sight |= SEE_MOBS
src.sight |= SEE_OBJS sight |= SEE_OBJS
src.see_in_dark = 8 see_in_dark = 8
src.see_invisible = 2 see_invisible = 2
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
var/cancel
store_memory("Time of death: [tod]", 0) store_memory("Time of death: [tod]", 0)
for(var/mob/M in world) for(var/mob/M in world)
@@ -29,8 +28,8 @@
log_game("Rebooting because of no live players") log_game("Rebooting because of no live players")
world.Reboot() world.Reboot()
return return
if (src.key) if (key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(key && stat == 2)
src.verbs += /mob/proc/ghostize verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)

View File

@@ -0,0 +1,30 @@
/obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi')
station_explosion = new h_type( src )
station_explosion.icon = 'station_explosion.dmi'
station_explosion.icon_state = "start"
station_explosion.layer = 20
station_explosion.mouse_opacity = 0
station_explosion.screen_loc = "1,3"
blurry = new h_type( src )
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.name = "Blurry"
blurry.icon = ui_style
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
druggy = new h_type( src )
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.name = "Druggy"
druggy.icon = ui_style
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
mymob.blind = new /obj/screen( null )
mymob.blind.icon = ui_style
mymob.blind.icon_state = "black"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1 to 15,15"
mymob.blind.layer = 0

View File

@@ -4,38 +4,19 @@
set invisibility = 0 set invisibility = 0
set background = 1 set background = 1
if (src.monkeyizing)
return
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
if(src.loc) if(loc)
environment = loc.return_air() environment = loc.return_air()
if (src.stat != 2) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
breathe()
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
//Apparently, the person who wrote this code designed it so that //Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the //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 //code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it. //to find it.
src.blinded = null blinded = null
//Disease Check //Disease Check
handle_virus_updates() handle_virus_updates()
//Changeling things
handle_changeling()
//Handle temperature/pressure differences between body and environment //Handle temperature/pressure differences between body and environment
if(environment) // More error checking -- TLE if(environment) // More error checking -- TLE
handle_environment(environment) handle_environment(environment)
@@ -46,24 +27,15 @@
//Chemicals in the body //Chemicals in the body
handle_chemicals_in_body() handle_chemicals_in_body()
//Disabilities
handle_disabilities()
//Status updates, death etc. //Status updates, death etc.
handle_regular_status_updates() handle_regular_status_updates()
if(client) if(client)
handle_regular_hud_updates() handle_regular_hud_updates()
//Being buckled to a chair or bed
check_if_buckled()
// Yup. // Yup.
update_canmove() update_canmove()
// Update clothing
update_clothing()
clamp_values() clamp_values()
proc proc
@@ -78,59 +50,48 @@
oxyloss = max(oxyloss, 0) oxyloss = max(oxyloss, 0)
toxloss = max(toxloss, 0) toxloss = max(toxloss, 0)
handle_disabilities()
handle_mutations_and_radiation() handle_mutations_and_radiation()
if (src.radiation) if (radiation)
if (src.radiation > 100) if (radiation > 100)
src.radiation = 100 radiation = 100
src.weakened = 10 weakened = 10
src << "\red You feel weak." src << "\red You feel weak."
// emote("collapse")
switch(src.radiation) switch(radiation)
if(1 to 49) if(1 to 49)
src.radiation-- radiation--
if(prob(25)) if(prob(25))
src.toxloss++ toxloss++
src.updatehealth() updatehealth()
if(50 to 74) if(50 to 74)
src.radiation -= 2 radiation -= 2
src.toxloss++ toxloss++
if(prob(5)) if(prob(5))
src.radiation -= 5 radiation -= 5
src.weakened = 3 weakened = 3
src << "\red You feel weak." src << "\red You feel weak."
// emote("collapse") // emote("collapse")
src.updatehealth() updatehealth()
if(75 to 100) if(75 to 100)
src.radiation -= 3 radiation -= 3
src.toxloss += 3 toxloss += 3
if(prob(1)) if(prob(1))
src << "\red You mutate!" src << "\red You mutate!"
randmutb(src) randmutb(src)
domutcheck(src,null) domutcheck(src,null)
emote("gasp") emote("gasp")
src.updatehealth() updatehealth()
breathe()
get_breath_from_internal(volume_needed)
update_canmove() update_canmove()
if(src.in_contents_of(/obj/mecha)) if(in_contents_of(/obj/mecha))
canmove = 1 canmove = 1
else else
canmove = 0 canmove = 0
return return
handle_breath(datum/gas_mixture/breath)
handle_environment(datum/gas_mixture/environment) handle_environment(datum/gas_mixture/environment)
if(!environment) if(!environment)
return return
@@ -154,7 +115,7 @@
return //TODO: DEFERRED return //TODO: DEFERRED
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(src.nodamage) return if(nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//fireloss += 2.5*discomfort //fireloss += 2.5*discomfort
fireloss += 5.0*discomfort fireloss += 5.0*discomfort
@@ -163,12 +124,12 @@
if(reagents) reagents.metabolize(src) if(reagents) reagents.metabolize(src)
if (src.drowsyness) if (drowsyness)
src.drowsyness-- drowsyness--
src.eye_blurry = max(2, src.eye_blurry) eye_blurry = max(2, eye_blurry)
if (prob(5)) if (prob(5))
src.sleeping = 1 sleeping = 1
src.paralysis = 5 paralysis = 5
confused = max(0, confused - 1) confused = max(0, confused - 1)
// decrement dizziness counter, clamped to 0 // decrement dizziness counter, clamped to 0
@@ -177,7 +138,7 @@
else else
dizziness = max(0, dizziness - 1) dizziness = max(0, dizziness - 1)
src.updatehealth() updatehealth()
return //TODO: DEFERRED return //TODO: DEFERRED
@@ -187,188 +148,153 @@
if(oxyloss > 25) paralysis = max(paralysis, 3) if(oxyloss > 25) paralysis = max(paralysis, 3)
if(src.sleeping) if(sleeping)
src.paralysis = max(src.paralysis, 5) paralysis = max(paralysis, 5)
if (prob(1) && health) spawn(0) emote("snore") if (prob(1) && health) spawn(0) emote("snore")
if(src.resting) if(resting)
src.weakened = max(src.weakened, 5) weakened = max(weakened, 5)
if(health < -100 && stat != 2) if(health < -100 && stat != 2)
death() death()
else if(src.health < 0) else if(health < 0)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") if(health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++ //if(!rejuv) oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(src.stat != 2) src.stat = 1 if(stat != 2) stat = 1
src.paralysis = max(src.paralysis, 5) paralysis = max(paralysis, 5)
if (src.stat != 2) //Alive. if (stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened || changeling_fakedeath) //Stunned etc. if (paralysis || stunned || weakened) //Stunned etc.
if (src.stunned > 0) if (stunned > 0)
src.stunned-- stunned--
src.stat = 0 stat = 0
if (src.weakened > 0) if (weakened > 0)
src.weakened-- weakened--
src.lying = 1 lying = 1
src.stat = 0 stat = 0
if (src.paralysis > 0) if (paralysis > 0)
src.paralysis-- paralysis--
src.blinded = 1 blinded = 1
src.lying = 1 lying = 1
src.stat = 1 stat = 1
var/h = src.hand var/h = hand
src.hand = 0 hand = 0
drop_item() drop_item()
src.hand = 1 hand = 1
drop_item() drop_item()
src.hand = h hand = h
else //Not stunned. else //Not stunned.
src.lying = 0 lying = 0
src.stat = 0 stat = 0
else //Dead. else //Dead.
src.lying = 1 lying = 1
src.blinded = 1 blinded = 1
src.stat = 2 stat = 2
if (src.stuttering) src.stuttering-- if (stuttering) stuttering--
if (src.eye_blind) if (eye_blind)
src.eye_blind-- eye_blind--
src.blinded = 1 blinded = 1
if (src.ear_deaf > 0) src.ear_deaf-- if (ear_deaf > 0) ear_deaf--
if (src.ear_damage < 25) if (ear_damage < 25)
src.ear_damage -= 0.05 ear_damage -= 0.05
src.ear_damage = max(src.ear_damage, 0) ear_damage = max(ear_damage, 0)
// src.density = !( src.lying ) // density = !( lying )
if (src.sdisabilities & 1) if (sdisabilities & 1)
src.blinded = 1 blinded = 1
if (src.sdisabilities & 4) if (sdisabilities & 4)
src.ear_deaf = 1 ear_deaf = 1
if (src.eye_blurry > 0) if (eye_blurry > 0)
src.eye_blurry-- eye_blurry--
src.eye_blurry = max(0, src.eye_blurry) eye_blurry = max(0, eye_blurry)
if (src.druggy > 0) if (druggy > 0)
src.druggy-- druggy--
src.druggy = max(0, src.druggy) druggy = max(0, druggy)
return 1 return 1
handle_regular_hud_updates() handle_regular_hud_updates()
if (src.stat == 2 || src.mutations & XRAY) if (stat == 2 || mutations & XRAY)
src.sight |= SEE_TURFS sight |= SEE_TURFS
src.sight |= SEE_MOBS sight |= SEE_MOBS
src.sight |= SEE_OBJS sight |= SEE_OBJS
src.see_in_dark = 8 see_in_dark = 8
src.see_invisible = 2 see_invisible = 2
else if (src.stat != 2) else if (stat != 2)
src.sight &= ~SEE_TURFS sight &= ~SEE_TURFS
src.sight &= ~SEE_MOBS sight &= ~SEE_MOBS
src.sight &= ~SEE_OBJS sight &= ~SEE_OBJS
src.see_in_dark = 2 see_in_dark = 2
src.see_invisible = 0 see_invisible = 0
if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping) if (sleep) sleep.icon_state = text("sleep[]", sleeping)
if (src.rest) src.rest.icon_state = text("rest[]", src.resting) if (rest) rest.icon_state = text("rest[]", resting)
if (src.healths) if (healths)
if (src.stat != 2) if (stat != 2)
switch(health) switch(health)
if(100 to INFINITY) if(100 to INFINITY)
src.healths.icon_state = "health0" healths.icon_state = "health0"
if(80 to 100) if(80 to 100)
src.healths.icon_state = "health1" healths.icon_state = "health1"
if(60 to 80) if(60 to 80)
src.healths.icon_state = "health2" healths.icon_state = "health2"
if(40 to 60) if(40 to 60)
src.healths.icon_state = "health3" healths.icon_state = "health3"
if(20 to 40) if(20 to 40)
src.healths.icon_state = "health4" healths.icon_state = "health4"
if(0 to 20) if(0 to 20)
src.healths.icon_state = "health5" healths.icon_state = "health5"
else else
src.healths.icon_state = "health6" healths.icon_state = "health6"
else else
src.healths.icon_state = "health7" healths.icon_state = "health7"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]" if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
client.screen -= hud_used.blurry
client.screen -= hud_used.druggy
client.screen -= hud_used.vimpaired
// if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]" if ((blind && stat != 2))
// if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]" if ((blinded))
// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]" blind.layer = 18
//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
if(345 to INFINITY)
src.bodytemp.icon_state = "temp4"
if(335 to 345)
src.bodytemp.icon_state = "temp3"
if(327 to 335)
src.bodytemp.icon_state = "temp2"
if(316 to 327)
src.bodytemp.icon_state = "temp1"
if(300 to 316)
src.bodytemp.icon_state = "temp0"
if(295 to 300)
src.bodytemp.icon_state = "temp-1"
if(280 to 295)
src.bodytemp.icon_state = "temp-2"
if(260 to 280)
src.bodytemp.icon_state = "temp-3"
else else
src.bodytemp.icon_state = "temp-4" blind.layer = 0
*/
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
if ((src.blind && src.stat != 2)) if (disabilities & 1)
if ((src.blinded)) client.screen += hud_used.vimpaired
src.blind.layer = 18
else
src.blind.layer = 0
if (src.disabilities & 1) if (eye_blurry)
src.client.screen += src.hud_used.vimpaired client.screen += hud_used.blurry
if (src.eye_blurry) if (druggy)
src.client.screen += src.hud_used.blurry client.screen += hud_used.druggy
if (src.druggy) if (stat != 2)
src.client.screen += src.hud_used.druggy if (machine)
if (!( machine.check_eye(src) ))
if (src.stat != 2) reset_view(null)
if (src.machine)
if (!( src.machine.check_eye(src) ))
src.reset_view(null)
else else
if(!client.adminobs) if(!client.adminobs)
reset_view(null) reset_view(null)
return 1 return 1
handle_random_events()
handle_virus_updates() handle_virus_updates()
if(src.bodytemperature > 406 && src.virus) if(bodytemperature > 406 && virus)
src.virus.cure() virus.cure()
return return
check_if_buckled()
handle_changeling()

View File

@@ -1,3 +1,3 @@
/mob/living/carbon/brain/say(var/message) /mob/living/carbon/brain/say(var/message)
if(!container && stat != 2) return //In case of some mysterious happenings where a "living" brain is not in an MMI, don't let it speak. --NEO if(!container) return //No container, can't speak, bucko./N
..() else ..()

View File

@@ -45,7 +45,6 @@
N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2) N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2)
. = ..(give_medal) . = ..(give_medal)
/mob/living/carbon/attack_hand(mob/M as mob) /mob/living/carbon/attack_hand(mob/M as mob)
if(!istype(M, /mob/living/carbon)) return if(!istype(M, /mob/living/carbon)) return
if(src.virus || M.virus) if(src.virus || M.virus)
@@ -114,7 +113,6 @@
src.hands.dir = SOUTH src.hands.dir = SOUTH
return return
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health > 0) if (src.health > 0)
var/t_him = "it" var/t_him = "it"

View File

@@ -38,7 +38,7 @@
if (client) if (client)
spawn(10) spawn(10)
if(client && src.stat == 2) if(client && src.stat == 2)
verbs += /mob/proc/ghostize verbs += /mob/proc/ghost
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
if(mind) if(mind)

View File

@@ -766,20 +766,20 @@
else else
seer = 0 seer = 0
see_invisible = 0 see_invisible = 0
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)) else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
switch(src.wear_mask:mode) switch(wear_mask:mode)
if(1) if(1)
src.see_in_dark = 5 see_in_dark = 5
if(!src.druggy) if(!druggy)
src.see_invisible = 0 see_invisible = 0
if(2) if(2)
src.sight |= SEE_MOBS sight |= SEE_MOBS
if(!src.druggy) if(!druggy)
src.see_invisible = 2 see_invisible = 2
if(3) if(3)
src.sight |= SEE_TURFS sight |= SEE_TURFS
if(!src.druggy) if(!druggy)
src.see_invisible = 0 see_invisible = 0
else if (istype(src.glasses, /obj/item/clothing/glasses/meson)) else if (istype(src.glasses, /obj/item/clothing/glasses/meson))
src.sight |= SEE_TURFS src.sight |= SEE_TURFS
@@ -996,11 +996,6 @@
if(M.stat == 2) if(M.stat == 2)
M.death(1) M.death(1)
stomach_contents.Remove(M) stomach_contents.Remove(M)
if(M.client)
var/mob/dead/observer/newmob = new(M)
M:client:mob = newmob
M.mind.transfer_to(newmob)
newmob.reset_view(null)
del(M) del(M)
continue continue
if(air_master.current_cycle%3==1) if(air_master.current_cycle%3==1)

View File

@@ -7,6 +7,6 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return

View File

@@ -39,6 +39,6 @@
if (src.key) if (src.key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)

View File

@@ -47,7 +47,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
if(src.name == "monkey") if(src.name == "monkey")
src.name = text("monkey ([rand(1, 1000)])") src.name = text("monkey ([rand(1, 1000)])")
src.real_name = src.name src.real_name = src.name

View File

@@ -1,6 +1,6 @@
/mob/living/proc/binarycheck() /mob/living/proc/binarycheck()
if (istype(src, /mob/living/silicon)) return 1 if (issilicon(src)) return 1
if (!istype(src, /mob/living/carbon/human)) return if (!ishuman(src)) return
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src
if (H.ears) if (H.ears)
var/obj/item/device/radio/headset/dongle = H.ears var/obj/item/device/radio/headset/dongle = H.ears
@@ -8,8 +8,8 @@
if(dongle.translate_binary) return 1 if(dongle.translate_binary) return 1
/mob/living/proc/hivecheck() /mob/living/proc/hivecheck()
if (istype(src, /mob/living/carbon/alien)) return 1 if (isalien(src)) return 1
if (!istype(src, /mob/living/carbon/human)) return if (!ishuman(src)) return
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src
if (H.ears) if (H.ears)
var/obj/item/device/radio/headset/dongle = H.ears var/obj/item/device/radio/headset/dongle = H.ears
@@ -23,39 +23,39 @@
return return
if (length(message) >= 1) if (length(message) >= 1)
if (src.miming && copytext(message, 1, 2) != "*") if (miming && copytext(message, 1, 2) != "*")
return return
if (src.stat == 2) if (stat == 2)
return src.say_dead(message) return say_dead(message)
if (src.muted || src.silent) if (muted || silent)
return return
// wtf? // wtf?
if (src.stat) if (stat)
return return
// Mute disability // Mute disability
if (src.sdisabilities & 2) if (sdisabilities & 2)
return return
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
return return
// emotes // emotes
if (copytext(message, 1, 2) == "*" && !src.stat) if (copytext(message, 1, 2) == "*" && !stat)
return src.emote(copytext(message, 2)) return emote(copytext(message, 2))
var/alt_name = "" var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && src.name != src.real_name) if (istype(src, /mob/living/carbon/human) && name != real_name)
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_visible_name()])" alt_name = " (as [H.get_visible_name()])"
var/italics = 0 var/italics = 0
var/message_range = null var/message_range = null
var/message_mode = null var/message_mode = null
if (src.brainloss >= 60 && prob(50)) if (brainloss >= 60 && prob(50))
if (ishuman(src)) if (ishuman(src))
message_mode = "headset" message_mode = "headset"
// Special message handling // Special message handling
@@ -114,7 +114,7 @@
return return
// :downs: // :downs:
if (src.brainloss >= 60) if (brainloss >= 60)
message = dd_replacetext(message, " am ", " ") message = dd_replacetext(message, " am ", " ")
message = dd_replacetext(message, " is ", " ") message = dd_replacetext(message, " is ", " ")
message = dd_replacetext(message, " are ", " ") message = dd_replacetext(message, " are ", " ")
@@ -126,16 +126,16 @@
if(prob(50)) if(prob(50))
message = uppertext(message) message = uppertext(message)
message += "[stutter(pick("!", "!!", "!!!"))]" message += "[stutter(pick("!", "!!", "!!!"))]"
if(!src.stuttering && prob(15)) if(!stuttering && prob(15))
message = stutter(message) message = stutter(message)
if (src.stuttering) if (stuttering)
message = stutter(message) message = stutter(message)
/* //qw do not have beesease atm. /* //qw do not have beesease atm.
if(src.virus) if(virus)
if(src.virus.name=="beesease" && src.virus.stage>=2) if(virus.name=="beesease" && virus.stage>=2)
if(prob(src.virus.stage*10)) if(prob(virus.stage*10))
var/bzz = length(message) var/bzz = length(message)
message = "B" message = "B"
for(var/i=0,i<bzz,i++) for(var/i=0,i<bzz,i++)
@@ -160,16 +160,16 @@
italics = 1 italics = 1
if ("right hand") if ("right hand")
if (src.r_hand) if (r_hand)
src.r_hand.talk_into(src, message) r_hand.talk_into(src, message)
used_radios += src:r_hand used_radios += src:r_hand
message_range = 1 message_range = 1
italics = 1 italics = 1
if ("left hand") if ("left hand")
if (src.l_hand) if (l_hand)
src.l_hand.talk_into(src, message) l_hand.talk_into(src, message)
used_radios += src:l_hand used_radios += src:l_hand
message_range = 1 message_range = 1
@@ -185,19 +185,19 @@
//I see no reason to restrict such way of whispering //I see no reason to restrict such way of whispering
if ("whisper") if ("whisper")
src.whisper(message) whisper(message)
return return
if ("binary") if ("binary")
if(src.robot_talk_understand || src.binarycheck()) if(robot_talk_understand || binarycheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant //message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
src.robot_talk(message) robot_talk(message)
return return
if ("alientalk") if ("alientalk")
if(src.alien_talk_understand || src.hivecheck()) if(alien_talk_understand || hivecheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant //message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
src.alien_talk(message) alien_talk(message)
return return
if ("department") if ("department")
@@ -219,8 +219,8 @@
var/list/listening var/list/listening
/* /*
if(istype(src.loc, /obj/item/device/aicard)) // -- TLE if(istype(loc, /obj/item/device/aicard)) // -- TLE
var/obj/O = src.loc var/obj/O = loc
if(istype(O.loc, /mob)) if(istype(O.loc, /mob))
var/mob/M = O.loc var/mob/M = O.loc
listening = hearers(message_range, M) listening = hearers(message_range, M)
@@ -243,7 +243,7 @@
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
listening = hearers(message_range, T) listening = hearers(message_range, T)
var/list/V = view(message_range, T) var/list/V = view(message_range, T)
//find mobs in lockers, cryo and intellycards //find mobs in lockers, cryo, intellicards, brains, MMIs, and so on.
for (var/mob/M in world) for (var/mob/M in world)
if (!M.client) if (!M.client)
continue //skip monkeys and leavers continue //skip monkeys and leavers
@@ -258,11 +258,17 @@
if (M.client && M.client.ghost_ears) if (M.client && M.client.ghost_ears)
listening|=M listening|=M
for (var/obj/O in ((V | src.contents)-used_radios)) //radio in pocket could work, radio in backpack wouldn't --rastaf0 for (var/obj/O in ((V | contents)-used_radios)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
spawn (0) spawn (0)
if (O) if (O)
O.hear_talk(src, message) O.hear_talk(src, message)
if(isbrain(src))//For brains to properly talk if they are in an MMI..or in a brain. Could be extended to other mobs I guess.
for(var/obj/O in loc)//Kinda ugly but whatever.
if(O)
spawn(0)
O.hear_talk(src, message)
var/list/heard_a = list() // understood us var/list/heard_a = list() // understood us
var/list/heard_b = list() // didn't understand us var/list/heard_b = list() // didn't understand us
@@ -274,19 +280,19 @@
var/rendered = null var/rendered = null
if (length(heard_a)) if (length(heard_a))
var/message_a = src.say_quote(message) var/message_a = say_quote(message)
if (italics) if (italics)
message_a = "<i>[message_a]</i>" message_a = "<i>[message_a]</i>"
if (!istype(src, /mob/living/carbon/human)) if (!istype(src, /mob/living/carbon/human))
rendered = "<span class='game say'><span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span>" rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice)) else if(istype(wear_mask, /obj/item/clothing/mask/gas/voice))
if(wear_mask:vchange) if(wear_mask:vchange)
rendered = "<span class='game say'><span class='name'>[src.wear_mask:voice]</span> <span class='message'>[message_a]</span></span>" rendered = "<span class='game say'><span class='name'>[wear_mask:voice]</span> <span class='message'>[message_a]</span></span>"
else else
rendered = "<span class='game say'><span class='name'>[src.name]</span> <span class='message'>[message_a]</span></span>" rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
else else
rendered = "<span class='game say'><span class='name'>[src.real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>" rendered = "<span class='game say'><span class='name'>[real_name]</span>[alt_name] <span class='message'>[message_a]</span></span>"
for (var/mob/M in heard_a) for (var/mob/M in heard_a)
M.show_message(rendered, 2) M.show_message(rendered, 2)
@@ -301,18 +307,18 @@
if (length(heard_b)) if (length(heard_b))
var/message_b var/message_b
if (src.voice_message) if (voice_message)
message_b = src.voice_message message_b = voice_message
else else
message_b = stars(message) message_b = stars(message)
message_b = src.say_quote(message_b) message_b = say_quote(message_b)
if (italics) if (italics)
message_b = "<i>[message_b]</i>" message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> <span class='message'>[message_b]</span></span>" rendered = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
for (var/mob/M in heard_b) for (var/mob/M in heard_b)
M.show_message(rendered, 2) M.show_message(rendered, 2)
log_say("[src.name]/[src.key] : [message]") log_say("[name]/[key] : [message]")

View File

@@ -7,7 +7,7 @@
real_name = name real_name = name
anchored = 1 anchored = 1
canmove = 0 canmove = 0
src.loc = loc loc = loc
proc_holder_list = new() proc_holder_list = new()
@@ -34,8 +34,8 @@
del(src)//Delete AI. del(src)//Delete AI.
return return
else else
if (B.brain.brainmob.mind) if (B.brainmob.mind)
B.brain.brainmob.mind.transfer_to(src) B.brainmob.mind.transfer_to(src)
src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>" src << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
src << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>" src << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
@@ -43,10 +43,10 @@
src << "To use something, simply double-click it." src << "To use something, simply double-click it."
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI." src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
src.show_laws() show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>" src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
src.job = "AI" job = "AI"
spawn(0) spawn(0)
ainame(src) ainame(src)
@@ -54,7 +54,7 @@
/mob/living/silicon/ai/Stat() /mob/living/silicon/ai/Stat()
..() ..()
statpanel("Status") statpanel("Status")
if (src.client.statpanel == "Status") if (client.statpanel == "Status")
if(emergency_shuttle.online && emergency_shuttle.location < 2) if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft() var/timeleft = emergency_shuttle.timeleft()
if (timeleft) if (timeleft)
@@ -63,12 +63,12 @@
if(ticker.mode.name == "AI malfunction") if(ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai) for (var/datum/mind/malfai in malf.malf_ai)
if (src.mind == malfai) if (mind == malfai)
if (malf.apcs >= 3) if (malf.apcs >= 3)
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds") stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
if(!src.stat) if(!stat)
stat(null, text("System integrity: [(src.health+100)/2]%")) stat(null, text("System integrity: [(health+100)/2]%"))
else else
stat(null, text("Systems nonfunctional")) stat(null, text("Systems nonfunctional"))
@@ -82,9 +82,9 @@
var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n" var/dat = "<HEAD><TITLE>Current Station Alerts</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
dat += "<A HREF='?src=\ref[src];mach_close=aialerts'>Close</A><BR><BR>" dat += "<A HREF='?src=\ref[src];mach_close=aialerts'>Close</A><BR><BR>"
for (var/cat in src.alarms) for (var/cat in alarms)
dat += text("<B>[]</B><BR>\n", cat) dat += text("<B>[]</B><BR>\n", cat)
var/list/L = src.alarms[cat] var/list/L = alarms[cat]
if (L.len) if (L.len)
for (var/alarm in L) for (var/alarm in L)
var/list/alm = L[alarm] var/list/alm = L[alarm]
@@ -109,7 +109,7 @@
dat += "-- All Systems Nominal<BR>\n" dat += "-- All Systems Nominal<BR>\n"
dat += "<BR>\n" dat += "<BR>\n"
src.viewalerts = 1 viewalerts = 1
src << browse(dat, "window=aialerts&can_close=0") src << browse(dat, "window=aialerts&can_close=0")
/mob/living/silicon/ai/proc/ai_roster() /mob/living/silicon/ai/proc/ai_roster()
@@ -135,15 +135,15 @@
return return
/mob/living/silicon/ai/check_eye(var/mob/user as mob) /mob/living/silicon/ai/check_eye(var/mob/user as mob)
if (!src.current) if (!current)
return null return null
user.reset_view(src.current) user.reset_view(current)
return 1 return 1
/mob/living/silicon/ai/blob_act() /mob/living/silicon/ai/blob_act()
if (src.stat != 2) if (stat != 2)
src.bruteloss += 60 bruteloss += 60
src.updatehealth() updatehealth()
return 1 return 1
return 0 return 0
@@ -154,42 +154,42 @@
if (prob(30)) if (prob(30))
switch(pick(1,2,3)) //Add Random laws. switch(pick(1,2,3)) //Add Random laws.
if(1) if(1)
src.cancel_camera() cancel_camera()
if(2) if(2)
src.lockdown() lockdown()
if(3) if(3)
src.ai_call_shuttle() ai_call_shuttle()
..() ..()
/mob/living/silicon/ai/ex_act(severity) /mob/living/silicon/ai/ex_act(severity)
flick("flash", src.flash) flick("flash", flash)
var/b_loss = src.bruteloss var/b_loss = bruteloss
var/f_loss = src.fireloss var/f_loss = fireloss
switch(severity) switch(severity)
if(1.0) if(1.0)
if (src.stat != 2) if (stat != 2)
b_loss += 100 b_loss += 100
f_loss += 100 f_loss += 100
if(2.0) if(2.0)
if (src.stat != 2) if (stat != 2)
b_loss += 60 b_loss += 60
f_loss += 60 f_loss += 60
if(3.0) if(3.0)
if (src.stat != 2) if (stat != 2)
b_loss += 30 b_loss += 30
src.bruteloss = b_loss bruteloss = b_loss
src.fireloss = f_loss fireloss = f_loss
src.updatehealth() updatehealth()
/mob/living/silicon/ai/Topic(href, href_list) /mob/living/silicon/ai/Topic(href, href_list)
..() ..()
if (href_list["mach_close"]) if (href_list["mach_close"])
if (href_list["mach_close"] == "aialerts") if (href_list["mach_close"] == "aialerts")
src.viewalerts = 0 viewalerts = 0
var/t1 = text("window=[]", href_list["mach_close"]) var/t1 = text("window=[]", href_list["mach_close"])
src.machine = null machine = null
src << browse(null, t1) src << browse(null, t1)
if (href_list["switchcamera"]) if (href_list["switchcamera"])
switchCamera(locate(href_list["switchcamera"])) switchCamera(locate(href_list["switchcamera"]))
@@ -199,22 +199,22 @@
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawc"]) var/L = text2num(href_list["lawc"])
switch(src.lawcheck[L+1]) switch(lawcheck[L+1])
if ("Yes") src.lawcheck[L+1] = "No" if ("Yes") lawcheck[L+1] = "No"
if ("No") src.lawcheck[L+1] = "Yes" if ("No") lawcheck[L+1] = "Yes"
// src << text ("Switching Law [L]'s report status to []", src.lawcheck[L+1]) // src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
src.checklaws() checklaws()
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawi"]) var/L = text2num(href_list["lawi"])
switch(src.ioncheck[L]) switch(ioncheck[L])
if ("Yes") src.ioncheck[L] = "No" if ("Yes") ioncheck[L] = "No"
if ("No") src.ioncheck[L] = "Yes" if ("No") ioncheck[L] = "Yes"
// src << text ("Switching Law [L]'s report status to []", src.lawcheck[L+1]) // src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
src.checklaws() checklaws()
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
src.statelaws() statelaws()
return return
@@ -222,38 +222,38 @@
for(var/mob/M in viewers(src, null)) for(var/mob/M in viewers(src, null))
M.show_message(text("\red [] has been hit by []", src, O), 1) M.show_message(text("\red [] has been hit by []", src, O), 1)
//Foreach goto(19) //Foreach goto(19)
if (src.health > 0) if (health > 0)
src.bruteloss += 30 bruteloss += 30
if ((O.icon_state == "flaming")) if ((O.icon_state == "flaming"))
src.fireloss += 40 fireloss += 40
src.updatehealth() updatehealth()
return return
/mob/living/silicon/ai/bullet_act(flag) /mob/living/silicon/ai/bullet_act(flag)
if (flag == PROJECTILE_BULLET) if (flag == PROJECTILE_BULLET)
if (src.stat != 2) if (stat != 2)
src.bruteloss += 60 bruteloss += 60
src.updatehealth() updatehealth()
src.weakened = 10 weakened = 10
else if (flag == PROJECTILE_TASER) else if (flag == PROJECTILE_TASER)
if (prob(75)) if (prob(75))
src.stunned = 15 stunned = 15
else else
src.weakened = 15 weakened = 15
else if (flag == PROJECTILE_DART) else if (flag == PROJECTILE_DART)
return return
else if(flag == PROJECTILE_LASER) else if(flag == PROJECTILE_LASER)
if (src.stat != 2) if (stat != 2)
src.bruteloss += 20 bruteloss += 20
src.updatehealth() updatehealth()
if (prob(25)) if (prob(25))
src.stunned = 1 stunned = 1
else if(flag == PROJECTILE_PULSE) else if(flag == PROJECTILE_PULSE)
if (src.stat != 2) if (stat != 2)
src.bruteloss += 40 bruteloss += 40
src.updatehealth() updatehealth()
if (prob(50)) if (prob(50))
src.stunned = min(5, src.stunned) stunned = min(5, stunned)
return return
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob) /mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
@@ -261,7 +261,7 @@
M << "You cannot attack people before the game has started." M << "You cannot attack people before the game has started."
return return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start)) if (istype(loc, /turf) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass." M << "No attacking people at spawn, you jackass."
return return
@@ -275,16 +275,16 @@
else //harm else //harm
var/damage = rand(10, 20) var/damage = rand(10, 20)
if (prob(90)) if (prob(90))
playsound(src.loc, 'slash.ogg', 25, 1, -1) playsound(loc, 'slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded ))) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1) O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if(prob(8)) if(prob(8))
flick("noise", src.flash) flick("noise", flash)
src.bruteloss += damage bruteloss += damage
src.updatehealth() updatehealth()
else else
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1) playsound(loc, 'slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded ))) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1) O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
@@ -302,22 +302,22 @@
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C) /mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null usr:cameraFollow = null
if (!C) if (!C)
src.machine = null machine = null
src.reset_view(null) reset_view(null)
return 0 return 0
if (stat == 2 || !C.status || C.network != src.network) return 0 if (stat == 2 || !C.status || C.network != network) return 0
// ok, we're alive, camera is good and in our network... // ok, we're alive, camera is good and in our network...
src.machine = src machine = src
src:current = C src:current = C
src.reset_view(C) reset_view(C)
return 1 return 1
/mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource) /mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
if (stat == 2) if (stat == 2)
return 1 return 1
var/list/L = src.alarms[class] var/list/L = alarms[class]
for (var/I in L) for (var/I in L)
if (I == A.name) if (I == A.name)
var/list/alarm = L[I] var/list/alarm = L[I]
@@ -348,11 +348,11 @@
src << text("--- [] alarm detected in []! (No Camera)", class, A.name) src << text("--- [] alarm detected in []! (No Camera)", class, A.name)
else else
src << text("--- [] alarm detected in []! (No Camera)", class, A.name) src << text("--- [] alarm detected in []! (No Camera)", class, A.name)
if (src.viewalerts) src.ai_alerts() if (viewalerts) ai_alerts()
return 1 return 1
/mob/living/silicon/ai/cancelAlarm(var/class, area/A as area, obj/origin) /mob/living/silicon/ai/cancelAlarm(var/class, area/A as area, obj/origin)
var/list/L = src.alarms[class] var/list/L = alarms[class]
var/cleared = 0 var/cleared = 0
for (var/I in L) for (var/I in L)
if (I == A.name) if (I == A.name)
@@ -365,14 +365,14 @@
L -= I L -= I
if (cleared) if (cleared)
src << text("--- [] alarm in [] has been cleared.", class, A.name) src << text("--- [] alarm in [] has been cleared.", class, A.name)
if (src.viewalerts) src.ai_alerts() if (viewalerts) ai_alerts()
return !cleared return !cleared
/mob/living/silicon/ai/cancel_camera() /mob/living/silicon/ai/cancel_camera()
set category = "AI Commands" set category = "AI Commands"
set name = "Cancel Camera View" set name = "Cancel Camera View"
src.reset_view(null) reset_view(null)
src.machine = null machine = null
src:cameraFollow = null src:cameraFollow = null
//Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm //Replaces /mob/living/silicon/ai/verb/change_network() in ai.dm & camera.dm
@@ -381,8 +381,8 @@
/mob/living/silicon/ai/proc/ai_network_change() /mob/living/silicon/ai/proc/ai_network_change()
set category = "AI Commands" set category = "AI Commands"
set name = "Change Camera Network" set name = "Change Camera Network"
src.reset_view(null) reset_view(null)
src.machine = null machine = null
src:cameraFollow = null src:cameraFollow = null
var/cameralist[0] var/cameralist[0]
@@ -397,14 +397,14 @@
if (ticker.mode.name == "AI malfunction") if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/M in malf.malf_ai) for (var/datum/mind/M in malf.malf_ai)
if (src.mind == M) if (mind == M)
cameralist[C.network] = C.network cameralist[C.network] = C.network
else else
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison") if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
cameralist[C.network] = C.network cameralist[C.network] = C.network
src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist network = input(usr, "Which network would you like to view?") as null|anything in cameralist
src << "\blue Switched to [src.network] camera network." src << "\blue Switched to [network] camera network."
//End of code by Mord_Sith //End of code by Mord_Sith
@@ -412,7 +412,7 @@
set category = "Malfunction" set category = "Malfunction"
set name = "Choose Module" set name = "Choose Module"
src.malf_picker.use(src) malf_picker.use(src)

View File

@@ -70,5 +70,5 @@
if (src.key) if (src.key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)

View File

@@ -18,7 +18,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
else else
for(var/obj/machinery/ai_status_display/O in world) //change status for(var/obj/machinery/ai_status_display/O in world) //change status
spawn( 0 ) spawn( 0 )

View File

@@ -8,5 +8,5 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return

View File

@@ -12,6 +12,13 @@
var/obj/machinery/camera/closest = null var/obj/machinery/camera/closest = null
var/atom/old = (user.current?user.current : user.loc) var/atom/old = (user.current?user.current : user.loc)
if(istype(user.loc, /obj/item/clothing/suit/space/space_ninja))//To make ninja suit AI holograms work.
var/obj/item/clothing/suit/space/space_ninja/S = user.loc//Ease of use.
if(S.hologram)//If there is a hologram.
S.hologram.loc = get_step(S.hologram, direct)
S.hologram.dir = direct
return//Whatever the case, return since you can't move anyway.
if(!old) return if(!old) return
var/dx = 0 var/dx = 0

View File

@@ -20,5 +20,5 @@
if (src.key) if (src.key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)

View File

@@ -7,7 +7,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
if(src.real_name == "Hiveborg") if(src.real_name == "Hiveborg")
src.real_name += " " src.real_name += " "
src.real_name += "-[rand(1, 999)]" src.real_name += "-[rand(1, 999)]"

View File

@@ -58,7 +58,7 @@
if (src.key) if (src.key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)
@@ -158,7 +158,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return return

View File

@@ -39,5 +39,5 @@
if (src.key) if (src.key)
spawn(50) spawn(50)
if(src.key && src.stat == 2) if(src.key && src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
return ..(gibbed) return ..(gibbed)

View File

@@ -7,7 +7,7 @@
src.client.eye = src.loc src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE src.client.perspective = EYE_PERSPECTIVE
if (src.stat == 2) if (src.stat == 2)
src.verbs += /mob/proc/ghostize src.verbs += /mob/proc/ghost
if(src.real_name == "Cyborg") if(src.real_name == "Cyborg")
src.real_name += " " src.real_name += " "
src.real_name += "-[rand(1, 999)]" src.real_name += "-[rand(1, 999)]"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -87,7 +87,6 @@ mob/new_player
src << browse_rsc('sos_11.png') src << browse_rsc('sos_11.png')
src << browse_rsc('sos_12.png') src << browse_rsc('sos_12.png')
src << browse_rsc('sos_13.png') src << browse_rsc('sos_13.png')
//End PDA Resource Initialisation =====================================================> //End PDA Resource Initialisation =====================================================>

View File

@@ -1,19 +1,19 @@
/mob/living/carbon/human/proc/monkeyize() /mob/living/carbon/human/proc/monkeyize()
if (src.monkeyizing) if (monkeyizing)
return return
for(var/obj/item/W in src) for(var/obj/item/W in src)
if (W==src.w_uniform) // will be teared if (W==w_uniform) // will be teared
continue continue
drop_from_slot(W) drop_from_slot(W)
src.update_clothing() update_clothing()
src.monkeyizing = 1 monkeyizing = 1
src.canmove = 0 canmove = 0
src.icon = null icon = null
src.invisibility = 101 invisibility = 101
for(var/t in src.organs) for(var/t in organs)
//src.organs[text("[]", t)] = null //organs[text("[]", t)] = null
del(src.organs[text("[]", t)]) del(organs[text("[]", t)])
var/atom/movable/overlay/animation = new /atom/movable/overlay( src.loc ) var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
animation.icon_state = "blank" animation.icon_state = "blank"
animation.icon = 'mob.dmi' animation.icon = 'mob.dmi'
animation.master = src animation.master = src
@@ -21,23 +21,23 @@
sleep(48) sleep(48)
//animation = null //animation = null
del(animation) del(animation)
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( src.loc ) var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( loc )
O.name = "monkey" O.name = "monkey"
O.dna = src.dna O.dna = dna
src.dna = null dna = null
O.dna.uni_identity = "00600200A00E0110148FC01300B009" O.dna.uni_identity = "00600200A00E0110148FC01300B009"
//O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" //O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8" O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8"
O.loc = src.loc O.loc = loc
O.virus = src.virus O.virus = virus
src.virus = null virus = null
if (O.virus) if (O.virus)
O.virus.affected_mob = O O.virus.affected_mob = O
if (src.client) if (client)
src.client.mob = O client.mob = O
if(src.mind) if(mind)
src.mind.transfer_to(O) mind.transfer_to(O)
O.a_intent = "hurt" O.a_intent = "hurt"
O << "<B>You are now a monkey.</B>" O << "<B>You are now a monkey.</B>"
var/prev_body = src var/prev_body = src
@@ -46,38 +46,45 @@
return O return O
/mob/new_player/AIize() /mob/new_player/AIize()
src.spawning = 1 spawning = 1
return ..() return ..()
/mob/living/carbon/human/AIize() /mob/living/carbon/human/AIize()
if (src.monkeyizing) if (monkeyizing)
return return
for(var/t in src.organs) for(var/t in organs)
del(src.organs[text("[]", t)]) del(organs[text("[]", t)])
return ..() return ..()
/mob/living/carbon/AIize() /mob/living/carbon/AIize()
if (src.monkeyizing) if (monkeyizing)
return return
for(var/obj/item/W in src) for(var/obj/item/W in src)
drop_from_slot(W) drop_from_slot(W)
src.update_clothing() update_clothing()
src.monkeyizing = 1 monkeyizing = 1
src.canmove = 0 canmove = 0
src.icon = null icon = null
src.invisibility = 101 invisibility = 101
return ..() return ..()
/mob/proc/AIize() /mob/proc/AIize()
client.screen.len = null if(client)
client.screen.len = null
var/mob/living/silicon/ai/O = new /mob/living/silicon/ai(loc, /datum/ai_laws/asimov,,1)//No MMI but safety is in effect. var/mob/living/silicon/ai/O = new /mob/living/silicon/ai(loc, /datum/ai_laws/asimov,,1)//No MMI but safety is in effect.
O.invisibility = 0 O.invisibility = 0
O.aiRestorePowerRoutine = 0 O.aiRestorePowerRoutine = 0
O.lastKnownIP = client.address O.lastKnownIP = client.address
mind.transfer_to(O) if(mind)
O.mind.original = O mind.transfer_to(O)
O.mind.original = O
else
O.mind = new
O.mind.current = O
O.mind.assigned_role = "AI"
O.key = key
var/obj/loc_landmark var/obj/loc_landmark
for(var/obj/landmark/start/sloc in world) for(var/obj/landmark/start/sloc in world)
@@ -126,19 +133,6 @@
spawn(0) spawn(0)
ainame(O) ainame(O)
/* var/randomname = pick(ai_names)
var/newname = input(O,"You are the AI. Would you like to change your name to something else?", "Name change",randomname)
if (length(newname) == 0)
newname = randomname
if (newname)
if (length(newname) >= 26)
newname = copytext(newname, 1, 26)
newname = dd_replacetext(newname, ">", "'")
O.real_name = newname
O.name = newname
*/
world << text("<b>[O.real_name] is the AI!</b>") world << text("<b>[O.real_name] is the AI!</b>")
spawn(50) spawn(50)
@@ -150,25 +144,25 @@
//human -> robot //human -> robot
/mob/living/carbon/human/proc/Robotize() /mob/living/carbon/human/proc/Robotize()
if (src.monkeyizing) if (monkeyizing)
return return
for(var/obj/item/W in src) for(var/obj/item/W in src)
drop_from_slot(W) drop_from_slot(W)
src.update_clothing() update_clothing()
src.monkeyizing = 1 monkeyizing = 1
src.canmove = 0 canmove = 0
src.icon = null icon = null
src.invisibility = 101 invisibility = 101
for(var/t in src.organs) for(var/t in organs)
del(src.organs[text("[t]")]) del(organs[text("[t]")])
if(src.client) if(client)
//src.client.screen -= main_hud1.contents //client.screen -= main_hud1.contents
src.client.screen -= src.hud_used.contents client.screen -= hud_used.contents
src.client.screen -= src.hud_used.adding client.screen -= hud_used.adding
src.client.screen -= src.hud_used.mon_blo client.screen -= hud_used.mon_blo
src.client.screen -= list( src.oxygen, src.throw_icon, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach ) client.screen -= list( oxygen, throw_icon, i_select, m_select, toxin, internals, fire, hands, healths, pullin, blind, flash, rest, sleep, mach )
src.client.screen -= list( src.zone_sel, src.oxygen, src.throw_icon, src.i_select, src.m_select, src.toxin, src.internals, src.fire, src.hands, src.healths, src.pullin, src.blind, src.flash, src.rest, src.sleep, src.mach ) client.screen -= list( zone_sel, oxygen, throw_icon, i_select, m_select, toxin, internals, fire, hands, healths, pullin, blind, flash, rest, sleep, mach )
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( src.loc ) var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( loc )
// cyborgs produced by Robotize get an automatic power cell // cyborgs produced by Robotize get an automatic power cell
O.cell = new(O) O.cell = new(O)
@@ -176,25 +170,25 @@
O.cell.charge = 7500 O.cell.charge = 7500
O.gender = src.gender O.gender = gender
O.invisibility = 0 O.invisibility = 0
O.name = "Cyborg" O.name = "Cyborg"
O.real_name = "Cyborg" O.real_name = "Cyborg"
O.lastKnownIP = src.client.address O.lastKnownIP = client.address
if (src.mind) if (mind)
src.mind.transfer_to(O) mind.transfer_to(O)
if (src.mind.assigned_role == "Cyborg") if (mind.assigned_role == "Cyborg")
src.mind.original = O mind.original = O
else if (src.mind.special_role) O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite") else if (mind.special_role) O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
else //welp else //welp
src.mind = new /datum/mind( ) mind = new /datum/mind( )
src.mind.key = src.key mind.key = key
src.mind.current = O mind.current = O
src.mind.original = O mind.original = O
src.mind.transfer_to(O) mind.transfer_to(O)
ticker.minds += O.mind ticker.minds += O.mind
O.loc = src.loc O.loc = loc
O << "<B>You are playing a Robot. A Robot can interact with most electronic objects in its view point.</B>" O << "<B>You are playing a Robot. A Robot can interact with most electronic objects in its view point.</B>"
O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>" O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>"
O << "To use something, simply double-click it." O << "To use something, simply double-click it."
@@ -202,34 +196,26 @@
O.job = "Cyborg" O.job = "Cyborg"
O.brain = new /obj/item/device/mmi(O) O.mmi = new /obj/item/device/mmi(O)
O.brain.name = "Man-Machine Interface: [src.name]" O.mmi.transfer_identity(src)//Does not transfer key/client.
O.brain.icon_state = "mmi_full"
O.brain.brain = new /obj/item/brain(O.brain)
O.brain.brain.name = "[src.name]'s brain"
O.brain.brain.brainmob = new /mob/living/carbon/brain(O.brain.brain)
O.brain.brain.brainmob.name = "[src.name]"
O.brain.brain.brainmob.container = O.brain
del(src) del(src)
return O return O
//human -> alien //human -> alien
/mob/living/carbon/human/proc/Alienize() /mob/living/carbon/human/proc/Alienize()
if (src.monkeyizing) if (monkeyizing)
return return
for(var/obj/item/W in src) for(var/obj/item/W in src)
drop_from_slot(W) drop_from_slot(W)
src.update_clothing() update_clothing()
src.monkeyizing = 1 monkeyizing = 1
src.canmove = 0 canmove = 0
src.icon = null icon = null
src.invisibility = 101 invisibility = 101
for(var/t in src.organs) for(var/t in organs)
del(src.organs[t]) del(organs[t])
// var/atom/movable/overlay/animation = new /atom/movable/overlay( src.loc ) // var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
// animation.icon_state = "blank" // animation.icon_state = "blank"
// animation.icon = 'mob.dmi' // animation.icon = 'mob.dmi'
// animation.master = src // animation.master = src
@@ -241,14 +227,14 @@
var/mob/O var/mob/O
switch(CASTE) switch(CASTE)
if("Hunter") if("Hunter")
O = new /mob/living/carbon/alien/humanoid/hunter (src.loc) O = new /mob/living/carbon/alien/humanoid/hunter (loc)
if("Sentinel") if("Sentinel")
O = new /mob/living/carbon/alien/humanoid/sentinel (src.loc) O = new /mob/living/carbon/alien/humanoid/sentinel (loc)
if("Drone") if("Drone")
O = new /mob/living/carbon/alien/humanoid/drone (src.loc) O = new /mob/living/carbon/alien/humanoid/drone (loc)
O.dna = src.dna O.dna = dna
src.dna = null dna = null
O.dna.uni_identity = "00600200A00E0110148FC01300B009" O.dna.uni_identity = "00600200A00E0110148FC01300B009"
O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8" O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
@@ -256,12 +242,12 @@
O.mind.current = O O.mind.current = O
O.mind.assigned_role = "Alien" O.mind.assigned_role = "Alien"
O.mind.special_role = CASTE O.mind.special_role = CASTE
O.mind.key = src.key O.mind.key = key
if(src.client) if(client)
src.client.mob = O client.mob = O
O.loc = src.loc O.loc = loc
O << "<B>You are now an alien.</B>" O << "<B>You are now an alien.</B>"
del(src) del(src)
return return

View File

@@ -130,7 +130,6 @@
#define FILE_DIR "icons/turf" #define FILE_DIR "icons/turf"
#define FILE_DIR "interface" #define FILE_DIR "interface"
#define FILE_DIR "maps" #define FILE_DIR "maps"
#define FILE_DIR "maps/backup"
#define FILE_DIR "sound" #define FILE_DIR "sound"
#define FILE_DIR "sound/ambience" #define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/announcer" #define FILE_DIR "sound/announcer"
@@ -681,6 +680,7 @@
#include "code\modules\mob\living\carbon\beast\death.dm" #include "code\modules\mob\living\carbon\beast\death.dm"
#include "code\modules\mob\living\carbon\brain\brain.dm" #include "code\modules\mob\living\carbon\brain\brain.dm"
#include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\death.dm"
#include "code\modules\mob\living\carbon\brain\hud.dm"
#include "code\modules\mob\living\carbon\brain\life.dm" #include "code\modules\mob\living\carbon\brain\life.dm"
#include "code\modules\mob\living\carbon\brain\MMI.dm" #include "code\modules\mob\living\carbon\brain\MMI.dm"
#include "code\modules\mob\living\carbon\brain\say.dm" #include "code\modules\mob\living\carbon\brain\say.dm"