mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
#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:
@@ -8,7 +8,7 @@
|
||||
invocation = "GIN'YU CAPAN"
|
||||
invocation_type = "whisper"
|
||||
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/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)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/obj/item/weapon/cell/cell = 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/emagged = 0
|
||||
|
||||
@@ -26,6 +26,12 @@
|
||||
|
||||
// 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/last_special = 0
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
@@ -40,79 +46,79 @@
|
||||
var/other_mobs = null
|
||||
var/memory = ""
|
||||
var/poll_answer = 0.0
|
||||
var/sdisabilities = 0
|
||||
var/disabilities = 0
|
||||
var/sdisabilities = 0//Carbon
|
||||
var/disabilities = 0//Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/stat = 0.0
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/monkeyizing = null
|
||||
var/monkeyizing = null//Human, maybe Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
var/eye_blind = null
|
||||
var/eye_blurry = null
|
||||
var/ear_deaf = null
|
||||
var/ear_damage = null
|
||||
var/stuttering = null
|
||||
var/eye_blind = null//Carbon
|
||||
var/eye_blurry = null//Carbon
|
||||
var/ear_deaf = null//Carbon
|
||||
var/ear_damage = null//Carbon
|
||||
var/stuttering = null//Carbon
|
||||
var/real_name = null
|
||||
var/blinded = null
|
||||
var/bhunger = 0
|
||||
var/bhunger = 0//Carbon
|
||||
var/ajourn = 0
|
||||
var/rejuv = null
|
||||
var/druggy = 0
|
||||
var/confused = 0
|
||||
var/druggy = 0//Carbon
|
||||
var/confused = 0//Carbon
|
||||
var/antitoxs = null
|
||||
var/plasma = null
|
||||
var/sleeping = 0.0
|
||||
var/resting = 0.0
|
||||
var/sleeping = 0.0//Carbon
|
||||
var/resting = 0.0//Carbon
|
||||
var/lying = 0.0
|
||||
var/canmove = 1.0
|
||||
var/eye_stat = null
|
||||
var/oxyloss = 0.0
|
||||
var/toxloss = 0.0
|
||||
var/fireloss = 0.0
|
||||
var/timeofdeath = 0.0
|
||||
var/bruteloss = 0.0
|
||||
var/cpr_time = 1.0
|
||||
var/health = 100
|
||||
var/eye_stat = null//Living, potentially Carbon
|
||||
var/oxyloss = 0.0//Living
|
||||
var/toxloss = 0.0//Living
|
||||
var/fireloss = 0.0//Living
|
||||
var/bruteloss = 0.0//Living
|
||||
var/timeofdeath = 0.0//Living
|
||||
var/cpr_time = 1.0//Carbon
|
||||
var/health = 100//Living
|
||||
var/bodytemperature = 310.055 //98.7 F
|
||||
var/drowsyness = 0.0
|
||||
var/dizziness = 0
|
||||
var/drowsyness = 0.0//Carbon
|
||||
var/dizziness = 0//Carbon
|
||||
var/is_dizzy = 0
|
||||
var/is_jittery = 0
|
||||
var/jitteriness = 0
|
||||
var/jitteriness = 0//Carbon
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0
|
||||
var/overeatduration = 0 // How long this guy is overeating
|
||||
var/nutrition = 400.0//Carbon
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/paralysis = 0.0
|
||||
var/stunned = 0.0
|
||||
var/weakened = 0.0
|
||||
var/losebreath = 0.0
|
||||
var/metabslow = 0 // Metabolism slowed
|
||||
var/intent = null
|
||||
var/losebreath = 0.0//Carbon
|
||||
var/metabslow = 0 // Metabolism slowed//Carbon
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = "help"
|
||||
var/m_int = null
|
||||
var/m_intent = "run"
|
||||
var/a_intent = "help"//Living
|
||||
var/m_int = null//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/lastDblClick = 0
|
||||
var/lastKnownIP = null
|
||||
var/obj/stool/buckled = null
|
||||
var/obj/item/weapon/handcuffs/handcuffed = null
|
||||
var/obj/item/l_hand = null
|
||||
var/obj/item/r_hand = null
|
||||
var/obj/item/weapon/back = null
|
||||
var/obj/item/weapon/tank/internal = null
|
||||
var/obj/item/weapon/storage/s_active = null
|
||||
var/obj/item/clothing/mask/wear_mask = null
|
||||
var/obj/stool/buckled = null//Living, unless you can buckle silicons.
|
||||
var/obj/item/weapon/handcuffs/handcuffed = null//Living, unless you can cuff silicons.
|
||||
var/obj/item/l_hand = null//Living
|
||||
var/obj/item/r_hand = null//Living
|
||||
var/obj/item/weapon/back = null//Human
|
||||
var/obj/item/weapon/tank/internal = null//Human/Monkey
|
||||
var/obj/item/weapon/storage/s_active = null//Carbon
|
||||
var/obj/item/clothing/mask/wear_mask = null//Carbon
|
||||
var/r_epil = 0
|
||||
var/r_ch_cou = 0
|
||||
var/r_Tourette = 0
|
||||
var/cloneloss = 0
|
||||
var/seer = 0 //for cult
|
||||
var/r_Tourette = 0//Carbon
|
||||
var/cloneloss = 0//Carbon
|
||||
var/seer = 0 //for cult//Carbon
|
||||
|
||||
var/miming = null //checks if the guy is a mime
|
||||
var/silent = null //Can't talk. Value goes down every life proc.
|
||||
var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment
|
||||
var/miming = null //checks if the guy is a mime//Human
|
||||
var/silent = null //Can't talk. Value goes down every life proc.//Human
|
||||
var/muted = null //Can't talk in any way shape or form (Even OOC or emote). An admin punishment//Human
|
||||
|
||||
var/obj/hud/hud_used = null
|
||||
|
||||
@@ -131,25 +137,25 @@
|
||||
|
||||
var/music_lastplayed = "null"
|
||||
|
||||
var/job = null
|
||||
var/job = null//Living
|
||||
|
||||
var/knowledge = 0.0
|
||||
|
||||
var/nodamage = 0
|
||||
var/logged_in = 0
|
||||
|
||||
var/underwear = 1
|
||||
var/be_syndicate = 0
|
||||
var/underwear = 1//Human
|
||||
var/be_syndicate = 0//This really should be a client variable.
|
||||
var/be_random_name = 0
|
||||
var/const/blindness = 1
|
||||
var/const/deafness = 2
|
||||
var/const/muteness = 4
|
||||
var/brainloss = 0
|
||||
var/const/blindness = 1//Carbon
|
||||
var/const/deafness = 2//Carbon
|
||||
var/const/muteness = 4//Carbon
|
||||
var/brainloss = 0//Carbon
|
||||
|
||||
var/datum/dna/dna = null
|
||||
var/radiation = 0.0
|
||||
var/datum/dna/dna = null//Carbon
|
||||
var/radiation = 0.0//Carbon
|
||||
|
||||
var/mutations = 0
|
||||
var/mutations = 0//Carbon
|
||||
//telekinesis = 1
|
||||
//firemut = 2
|
||||
//xray = 4
|
||||
@@ -175,7 +181,7 @@
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
//Changeling mode stuff
|
||||
//Changeling mode stuff//Carbon
|
||||
var/changeling_level = 0
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
@@ -189,7 +195,10 @@
|
||||
var/robot_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
|
||||
|
||||
|
||||
|
||||
@@ -730,6 +730,7 @@
|
||||
/obj/overlay
|
||||
name = "overlay"
|
||||
unacidable = 1
|
||||
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
|
||||
|
||||
/obj/portal
|
||||
name = "portal"
|
||||
@@ -1008,6 +1009,7 @@
|
||||
anchored = 1
|
||||
unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr
|
||||
|
||||
//BEGIN BRAINS=====================================================
|
||||
/obj/item/brain
|
||||
name = "brain"
|
||||
icon = 'surgery.dmi'
|
||||
@@ -1020,37 +1022,30 @@
|
||||
throw_range = 5
|
||||
origin_tech = "biotech=3"
|
||||
|
||||
var/mob/living/carbon/human/owner = null
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
var
|
||||
mob/living/carbon/brain/brainmob = null
|
||||
|
||||
|
||||
/obj/item/brain/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(src.owner)
|
||||
src.name = "[src.owner]'s brain"
|
||||
//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)
|
||||
New()
|
||||
..()
|
||||
//Shifting the brain "mob" over to the brain object so it's easier to keep track of. --NEO
|
||||
//WASSSSSUUUPPPP /N
|
||||
spawn(5)
|
||||
if(brainmob&&brainmob.client)
|
||||
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()
|
||||
if(src.brainmob)
|
||||
if(src.brainmob.client)
|
||||
var/mob/dead/observer/newmob
|
||||
newmob = new/mob/dead/observer
|
||||
newmob.loc = get_turf(src)
|
||||
src.brainmob:client:mob = newmob
|
||||
newmob:client:eye = newmob
|
||||
..()
|
||||
proc
|
||||
transfer_identity(var/mob/living/carbon/human/H)
|
||||
name = "[H]'s brain"
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna
|
||||
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
|
||||
name = "Notice Board"
|
||||
@@ -1069,8 +1064,6 @@
|
||||
desc = "Some clutter the detective has accumalated over the years..."
|
||||
anchored = 1
|
||||
|
||||
|
||||
|
||||
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
// TODO: robust mixology system! (and merge with beakers, maybe)
|
||||
|
||||
@@ -395,24 +395,30 @@
|
||||
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)
|
||||
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
|
||||
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
|
||||
name = "pirate coat"
|
||||
desc = "Yarr."
|
||||
|
||||
@@ -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.
|
||||
switch(rand(1,2))//Mainly to add more options later.
|
||||
if(1)
|
||||
code_phrase += pick(pick(first_names_male,first_names_female))
|
||||
code_phrase += " "
|
||||
code_phrase += pick(last_names)
|
||||
var/name_list[] = list()
|
||||
for(var/datum/data/record/t in data_core.general)//Picks from crew manifest.
|
||||
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)
|
||||
code_phrase += pick(get_all_jobs())//Returns a job.
|
||||
safety.Remove(1)
|
||||
|
||||
@@ -100,19 +100,11 @@
|
||||
src:life()
|
||||
|
||||
/obj/bhole/Bumped(atom/A)
|
||||
var/mob/dead/observer/newmob
|
||||
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)
|
||||
if (istype(A,/mob/living))
|
||||
del(A)
|
||||
else
|
||||
A:ex_act(1.0)
|
||||
|
||||
|
||||
|
||||
/obj/bhole/proc/life() //Oh man , this will LAG
|
||||
|
||||
if (prob(10))
|
||||
@@ -167,13 +159,7 @@
|
||||
//if (hascall(D,"blackholed"))
|
||||
// call(D,"blackholed")(null)
|
||||
// continue
|
||||
var/mob/dead/observer/newmob
|
||||
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)
|
||||
if (istype(D,/mob/living))
|
||||
del(D)
|
||||
else
|
||||
D:ex_act(1.0)
|
||||
|
||||
@@ -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.
|
||||
/mob/proc/ninjacost(var/C = 0,var/X = 0)
|
||||
var/mob/living/carbon/human/U = src
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(var/C = 0,var/X = 0)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
|
||||
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
|
||||
return 1
|
||||
else if(C&&S.cell.charge<C*10)
|
||||
else if(C&&cell.charge<C*10)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
if(1)
|
||||
if(S.active)
|
||||
if(active)
|
||||
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
|
||||
return 1
|
||||
if(2)
|
||||
if(S.sbombs<=0)
|
||||
if(sbombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 1
|
||||
if(3)
|
||||
if(S.aboost<=0)
|
||||
if(aboost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
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
|
||||
//Summons smoke in radius of user.
|
||||
//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 desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0//Will not see it when right clicking.
|
||||
|
||||
if(!ninjacost(,2))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
S.sbombs--
|
||||
src << "\blue There are <B>[S.sbombs]</B> smoke bombs remaining."
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
U << "\blue There are <B>[sbombs]</B> smoke bombs remaining."
|
||||
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()
|
||||
playsound(loc, 'bamf.ogg', 50, 2)
|
||||
S.coold = 1
|
||||
playsound(U.loc, 'bamf.ogg', 50, 2)
|
||||
sbombs--
|
||||
coold = 1
|
||||
return
|
||||
|
||||
//9-10 Tile Teleport
|
||||
//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 desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 100
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/turf/destination = get_teleport_loc(loc,src,9,1,3,1,0,1)
|
||||
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,src,'mob.dmi',,"phaseout")
|
||||
|
||||
if(istype(get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
var/obj/item/weapon/grab/G = get_active_hand()
|
||||
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
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.
|
||||
if(istype(get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = get_inactive_hand()
|
||||
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
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.
|
||||
loc = destination
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
S.spark_system.start()
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(loc,src,'mob.dmi',,"phasein")
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'mob.dmi',,"phasein")
|
||||
|
||||
spawn(0)
|
||||
destination.kill_creatures(src)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
|
||||
S.coold = 1
|
||||
S.cell.charge-=(C*10)
|
||||
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
|
||||
coold = 1
|
||||
cell.charge-=(C*10)
|
||||
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
|
||||
|
||||
//Right Click Teleport
|
||||
//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 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 src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(!T.density&&istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(loc, 'sparks4.ogg', 50, 1)
|
||||
playsound(U.loc, 'sparks4.ogg', 50, 1)
|
||||
anim(mobloc,src,'mob.dmi',,"phaseout")
|
||||
|
||||
if(istype(get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
var/obj/item/weapon/grab/G = get_active_hand()
|
||||
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
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.
|
||||
if(istype(get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = get_inactive_hand()
|
||||
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
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.
|
||||
loc = T
|
||||
U.loc = T
|
||||
|
||||
spawn(0)
|
||||
S.spark_system.start()
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, 'sparks2.ogg', 50, 1)
|
||||
anim(loc,src,'mob.dmi',,"phasein")
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(U.loc, 'sparks2.ogg', 50, 1)
|
||||
anim(U.loc,U,'mob.dmi',,"phasein")
|
||||
|
||||
spawn(0)//Any living mobs in teleport area are gibbed.
|
||||
T.kill_creatures(src)
|
||||
S.coold = 1
|
||||
S.cell.charge-=(C*10)
|
||||
T.kill_creatures(U)
|
||||
coold = 1
|
||||
cell.charge-=(C*10)
|
||||
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
|
||||
|
||||
//EMP Pulse
|
||||
//Disables nearby tech equipment.
|
||||
/mob/proc/ninjapulse()
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (25E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 250
|
||||
if(!ninjacost(C,1))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
playsound(loc, 'EMPulse.ogg', 60, 2)
|
||||
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
S.coold = 2
|
||||
S.cell.charge-=(C*10)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'EMPulse.ogg', 60, 2)
|
||||
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
coold = 2
|
||||
cell.charge-=(C*10)
|
||||
return
|
||||
|
||||
//Summon Energy Blade
|
||||
//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 desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 50
|
||||
if(!ninjacost(C))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
if(!S.kamikaze)
|
||||
if(!get_active_hand()&&!istype(get_inactive_hand(), /obj/item/weapon/blade))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!kamikaze)
|
||||
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/blade))
|
||||
var/obj/item/weapon/blade/W = new()
|
||||
W.spark_system.start()
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
put_in_hand(W)
|
||||
S.cell.charge-=(C*10)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hand(W)
|
||||
cell.charge-=(C*10)
|
||||
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.
|
||||
if(!get_active_hand())
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/blade/W = new()
|
||||
put_in_hand(W)
|
||||
if(!get_inactive_hand())
|
||||
U.put_in_hand(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/blade/W = new()
|
||||
put_in_inactive_hand(W)
|
||||
S.spark_system.start()
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
S.coold = 1
|
||||
U.put_in_inactive_hand(W)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
coold = 1
|
||||
return
|
||||
|
||||
//Shoot Ninja Stars
|
||||
//Shoots ninja stars at random people.
|
||||
//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 desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 30
|
||||
if(!ninjacost(C))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/targets[]//So yo can shoot while yo throw dawg
|
||||
targets = new()
|
||||
for(var/mob/living/M in oview(7))
|
||||
if(M.stat==2) continue//Doesn't target corpses.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[] = list()//So yo can shoot while yo throw dawg
|
||||
for(var/mob/living/M in oview(loc))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
|
||||
targets.Add(M)
|
||||
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/turf/curloc = loc
|
||||
var/turf/curloc = U.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
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.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
S.cell.charge-=(C*10)
|
||||
cell.charge-=(C*10)
|
||||
A.process()
|
||||
else
|
||||
src << "\red There are no targets in view."
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
//Energy Net
|
||||
//Allows the ninja to capture people, I guess.
|
||||
//Must right click on a mob to activate.
|
||||
/mob/proc/ninjanet(var/mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net"
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(var/mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (20E)"
|
||||
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
set category = null
|
||||
set src = usr.contents
|
||||
|
||||
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.
|
||||
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.
|
||||
for(var/turf/T in getline(loc, M.loc))
|
||||
if(T==loc||T==M.loc) continue
|
||||
for(var/turf/T in getline(U.loc, M.loc))
|
||||
if(T==U.loc||T==M.loc) continue
|
||||
spawn(0)
|
||||
anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(loc,M.loc))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
anim(T,M,'projectiles.dmi',"energy",,,get_dir_to(U.loc,M.loc))
|
||||
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)
|
||||
E.layer = M.layer+1//To have it appear one layer above the mob.
|
||||
for(var/mob/O in viewers(src, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", src, M), 1)
|
||||
for(var/mob/O in viewers(U, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
|
||||
E.affecting = M
|
||||
E.master = src
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
S.cell.charge-=(C*10)
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
src << "They will bring no honor to your Clan!"
|
||||
U << "They will bring no honor to your Clan!"
|
||||
return
|
||||
|
||||
//Adrenaline Boost
|
||||
//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.
|
||||
/mob/proc/ninjaboost()
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
|
||||
set name = "Adrenaline Boost"
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effects."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
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.
|
||||
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
|
||||
paralysis = 0
|
||||
stunned = 0
|
||||
weakened = 0
|
||||
U.paralysis = 0
|
||||
U.stunned = 0
|
||||
U.weakened = 0
|
||||
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)
|
||||
S.reagents.reaction(src, 2)
|
||||
S.reagents.trans_id_to(src, "radium", S.transfera)
|
||||
src << "\red You are beginning to feel the after-effects of the injection."
|
||||
S.aboost--
|
||||
S.coold = 3
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "radium", transfera)
|
||||
U << "\red You are beginning to feel the after-effects of the injection."
|
||||
aboost--
|
||||
coold = 3
|
||||
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.
|
||||
//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 desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!incorporeal_move)
|
||||
incorporeal_move = 2
|
||||
density = 0
|
||||
src << "\blue You will now phase through solid matter."
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!U.incorporeal_move)
|
||||
U.incorporeal_move = 2
|
||||
U.density = 0
|
||||
U << "\blue You will now phase through solid matter."
|
||||
else
|
||||
incorporeal_move = 0
|
||||
density = 1
|
||||
src << "\blue You will no-longer phase through solid matter."
|
||||
U.incorporeal_move = 0
|
||||
U.density = 1
|
||||
U << "\blue You will no-longer phase through solid matter."
|
||||
return
|
||||
|
||||
/*
|
||||
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 desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
|
||||
var/turf/destination = get_teleport_loc(loc,src,5)
|
||||
var/turf/mobloc = get_turf(loc)//To make sure that certain things work properly below.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,5)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))
|
||||
say("Ai Satsugai!")
|
||||
U.say("Ai Satsugai!")
|
||||
spawn(0)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(mobloc,src,'mob.dmi',,"phaseout")
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'mob.dmi',,"phaseout")
|
||||
|
||||
spawn(0)
|
||||
for(var/turf/T in getline(mobloc, destination))
|
||||
spawn(0)
|
||||
T.kill_creatures(src)
|
||||
T.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,src,'mob.dmi',,"phasein")
|
||||
anim(T,U,'mob.dmi',,"phasein")
|
||||
|
||||
loc = destination
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
S.spark_system.start()
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(loc,src,'mob.dmi',,"phasein")
|
||||
S.coold = 1
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'mob.dmi',,"phasein")
|
||||
coold = 1
|
||||
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
|
||||
|
||||
//Appear behind a randomly chosen mob while a few decoy teleports appear.
|
||||
//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 desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
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[]
|
||||
targets = new()
|
||||
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)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)
|
||||
@@ -373,32 +383,32 @@ Allows to gib up to five squares in a straight line. Seriously.*/
|
||||
safety = 1
|
||||
else safety=1
|
||||
if(!safety&&istype(mobloc, /turf))
|
||||
say("Kumo no Shinkiro!")
|
||||
U.say("Kumo no Shinkiro!")
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(mobloc,src,'mob.dmi',,"phaseout")
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'mob.dmi',,"phaseout")
|
||||
|
||||
spawn(0)
|
||||
var/limit = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
anim(T,src,'mob.dmi',,"phasein")
|
||||
anim(T,U,'mob.dmi',,"phasein")
|
||||
limit--
|
||||
if(limit<=0) break
|
||||
|
||||
loc = picked
|
||||
dir = target.dir
|
||||
U.loc = picked
|
||||
U.dir = target.dir
|
||||
|
||||
spawn(0)
|
||||
S.spark_system.start()
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
anim(loc,src,'mob.dmi',,"phasein")
|
||||
S.coold = 1
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'mob.dmi',,"phasein")
|
||||
coold = 1
|
||||
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
|
||||
src << "\red There are no targets in view."
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
@@ -11,6 +11,8 @@ ________________________________________________________________________________
|
||||
/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/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.set_up(5, 0, 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("nutriment", 80)
|
||||
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()
|
||||
if(AI)//If there are AIs present when the ninja kicks the bucket.
|
||||
@@ -33,11 +35,11 @@ ________________________________________________________________________________
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/killai(var/mob/living/silicon/ai/A as mob)
|
||||
A << "\red Self-destruct protocol dete-- *bzzzzz*"
|
||||
A << browse(null, "window=hack spideros")
|
||||
if(A.client)
|
||||
A << "\red Self-destruct protocol dete-- *bzzzzz*"
|
||||
A << browse(null, "window=hack spideros")
|
||||
AI = null
|
||||
A.death()//Kill
|
||||
A.ghostize()//Turn into ghost
|
||||
A.death(1)//Kill
|
||||
del(AI)
|
||||
return
|
||||
|
||||
@@ -50,7 +52,6 @@ ________________________________________________________________________________
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
|
||||
set hidden = 1
|
||||
set background = 1
|
||||
|
||||
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>."
|
||||
sleep(40)
|
||||
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/spideros
|
||||
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire
|
||||
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
initialize=1
|
||||
affecting=U
|
||||
slowdown=0
|
||||
U.shoes:slowdown--
|
||||
ntick(U)
|
||||
else
|
||||
@@ -176,14 +175,12 @@ ________________________________________________________________________________
|
||||
U << "\blue Now de-initializing..."
|
||||
if(kamikaze)
|
||||
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
|
||||
U.remove_kamikaze_verbs()
|
||||
kamikaze = 0
|
||||
unlock = 0
|
||||
remove_kamikaze_verbs()
|
||||
U.incorporeal_move = 0
|
||||
U.density = 1
|
||||
spideros = 0
|
||||
sleep(40)
|
||||
U.remove_ninja_verbs()
|
||||
remove_ninja_verbs()
|
||||
U << "\blue Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>."
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
sleep(40)
|
||||
@@ -239,7 +236,6 @@ ________________________________________________________________________________
|
||||
set name = "Display SpiderOS"
|
||||
set desc = "Utilize built-in computer system."
|
||||
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.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
@@ -351,33 +347,39 @@ ________________________________________________________________________________
|
||||
dat += "<h5>How they relate to other SS13 organizations:</h5>"
|
||||
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>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>Changeling Hivemind</b>: extremely dangerous and to be killed on sight.</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>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. 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. 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 += "<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 += "<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 += "<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 += "<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 += "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>Equipment</b>: cannot be tracked by AI (passive), faster speed (passive), stealth (active), vision switch (passive if toggled), voice masking (passive), SpiderOS (passive if toggled), energy drain (passive if toggled)."
|
||||
dat += "<ul>"
|
||||
dat += "<li><i>Voice masking</i> generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.</li>"
|
||||
dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision.</li>"
|
||||
dat += "<li><i>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 += "</ul>"
|
||||
dat += "<b>Verbpowers</b>:"
|
||||
dat += "<b>Abilities</b>:"
|
||||
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>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>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 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>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>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 += "<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 += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
|
||||
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>"
|
||||
|
||||
if (A.stat == 2)//If AI dies while inside the card.
|
||||
if(A.client)//If they are still in their body.
|
||||
A.ghostize()//Throw them into a ghost.
|
||||
AI = null
|
||||
del(A)//Delete A.
|
||||
else
|
||||
del(A)
|
||||
if (A.stat == 2)//If AI dies while inside the card, such as suiciding.
|
||||
AI = null
|
||||
del(A)//Delete A.
|
||||
U << "Artificial Intelligence has self-terminated. Rebooting..."
|
||||
spideros()//Refresh.
|
||||
else
|
||||
@@ -546,8 +544,7 @@ ________________________________________________________________________________
|
||||
sleep(10)
|
||||
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.
|
||||
kamikaze = 1
|
||||
active = 0
|
||||
grant_kamikaze_verbs()
|
||||
icon_state = "s-ninjak"
|
||||
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
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/toggled
|
||||
U.update_clothing()
|
||||
U.grant_kamikaze_verbs()
|
||||
U.ninjablade()
|
||||
ninjablade()
|
||||
message_admins("\blue [U.key] used KAMIKAZE mode.", 1)
|
||||
else
|
||||
U << "Nevermind, you cheater."
|
||||
@@ -568,6 +564,7 @@ ________________________________________________________________________________
|
||||
U << "\red ERROR: WRONG PASSWORD!"
|
||||
unlock = 0
|
||||
spideros = 0
|
||||
//BEGIN MEDICAL//
|
||||
if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names.
|
||||
if(!reagents.get_reagent_amount("anti_toxin"))
|
||||
U << "\red Error: the suit cannot perform this function. Out of dylovene."
|
||||
@@ -603,7 +600,7 @@ ________________________________________________________________________________
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "nutriment", 5)
|
||||
U << "You feel a tiny prick and a sudden rush of substance in to your veins."
|
||||
|
||||
//BEGIN AI//
|
||||
if("Override Laws")
|
||||
var/mob/living/silicon/ai/A = locate(href_list["target"])
|
||||
var/law_zero = A.laws_object.zeroth//Remembers law zero, if there is one.
|
||||
@@ -624,41 +621,29 @@ ________________________________________________________________________________
|
||||
spideros = 0
|
||||
unlock = 0
|
||||
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)
|
||||
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
|
||||
spawn(40)
|
||||
if(AI==A)
|
||||
A << "Shutting down external protocol..."
|
||||
U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%"
|
||||
active = 0
|
||||
spawn(40)
|
||||
if(AI==A)
|
||||
A << "Connecting to kernel..."
|
||||
U << "\red <b>WARNING</b>: ER-RR04"
|
||||
A.control_disabled = 0
|
||||
spawn(40)
|
||||
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
|
||||
A << "Shutting down external protocol..."
|
||||
U << "\red <b>WARNING</b>: PPPFRRROGrESS 677^%"
|
||||
active = 0
|
||||
sleep(40)
|
||||
if(AI==A)
|
||||
A << "Connecting to kernel..."
|
||||
U << "\red <b>WARNING</b>: ER-RR04"
|
||||
A.control_disabled = 0
|
||||
sleep(40)
|
||||
A << "Connection established and secured. Menu updated."
|
||||
U << "\red <b>WARNING</b>: #%@!!WEL4P54@ \nUnABBBL3 TO LO-o-LOCAT2 ##$!ERNE0"
|
||||
grant_AI_verbs()
|
||||
return
|
||||
U << "\blue Hacking attempt disconnected. Resuming normal operation."
|
||||
remove_AI_verbs()
|
||||
else
|
||||
flush = 1
|
||||
A.suiciding = 1
|
||||
@@ -685,6 +670,7 @@ ________________________________________________________________________________
|
||||
A << browse(null, "window=hack spideros")
|
||||
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.
|
||||
|
||||
switch(href_list["choice"])
|
||||
@@ -697,7 +683,7 @@ ________________________________________________________________________________
|
||||
spideros=0
|
||||
else
|
||||
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.
|
||||
if(damage>1)//So they don't spam it when energy is a factor.
|
||||
spark_system.start()//SPARKS THERE SHALL BE SPARKS
|
||||
@@ -715,6 +701,10 @@ ________________________________________________________________________________
|
||||
spideros=3
|
||||
if("32")
|
||||
spideros=32
|
||||
if("4")
|
||||
spideros=4
|
||||
if("5")
|
||||
spideros=5
|
||||
if("Message")
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
var/t = input(U, "Please enter untraceable message.") as text
|
||||
@@ -724,6 +714,8 @@ ________________________________________________________________________________
|
||||
return
|
||||
if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists.
|
||||
A << "\red Error: unable to deliver message."
|
||||
//hack_spideros()
|
||||
//Remove this if verbs work.
|
||||
ninja_spideros.Click()
|
||||
return
|
||||
P.tnote += "<i><b>← From [A]:</b></i><br>[t]<br>"//Oh ai, u so silly
|
||||
@@ -735,6 +727,7 @@ ________________________________________________________________________________
|
||||
P.overlays += image('pda.dmi', "pda-r")
|
||||
if("Unlock Kamikaze")
|
||||
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(!reagents.get_reagent_amount("anti_toxin"))
|
||||
A << "\red Error: the suit cannot perform this function. Out of dylovene."
|
||||
@@ -783,7 +776,55 @@ ________________________________________________________________________________
|
||||
reagents.trans_id_to(U, "nutriment", 5)
|
||||
A << "Injecting..."
|
||||
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
|
||||
|
||||
/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)
|
||||
//Var Initialize
|
||||
var/mob/living/carbon/human/U = loc
|
||||
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/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)
|
||||
anim(M.loc,M,'mob.dmi',,"phaseout")
|
||||
|
||||
M.loc = pick(prisonwarp)//Throw mob in prison.
|
||||
density = 0//Make the net pass-through.
|
||||
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.
|
||||
M.loc = pick(prisonwarp)//Throw mob in prison.
|
||||
|
||||
spawn(0)
|
||||
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
|
||||
|
||||
@@ -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/tank/emergency_oxygen(new_ninja), new_ninja.slot_s_store)
|
||||
|
||||
/mob/proc/grant_ninja_verbs()
|
||||
verbs += /mob/proc/ninjashift
|
||||
verbs += /mob/proc/ninjajaunt
|
||||
verbs += /mob/proc/ninjasmoke
|
||||
verbs += /mob/proc/ninjaboost
|
||||
verbs += /mob/proc/ninjapulse
|
||||
verbs += /mob/proc/ninjablade
|
||||
verbs += /mob/proc/ninjastar
|
||||
verbs += /mob/proc/ninjanet
|
||||
mind.special_verbs += /mob/proc/ninjashift
|
||||
mind.special_verbs += /mob/proc/ninjajaunt
|
||||
mind.special_verbs += /mob/proc/ninjasmoke
|
||||
mind.special_verbs += /mob/proc/ninjaboost
|
||||
mind.special_verbs += /mob/proc/ninjapulse
|
||||
mind.special_verbs += /mob/proc/ninjablade
|
||||
mind.special_verbs += /mob/proc/ninjastar
|
||||
mind.special_verbs += /mob/proc/ninjanet
|
||||
//VERB MODIFIERS===================================
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_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/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
|
||||
|
||||
initialize=1
|
||||
slowdown=0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_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/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
|
||||
|
||||
/mob/proc/remove_ninja_verbs()
|
||||
verbs -= /mob/proc/ninjashift
|
||||
verbs -= /mob/proc/ninjajaunt
|
||||
verbs -= /mob/proc/ninjasmoke
|
||||
verbs -= /mob/proc/ninjaboost
|
||||
verbs -= /mob/proc/ninjapulse
|
||||
verbs -= /mob/proc/ninjablade
|
||||
verbs -= /mob/proc/ninjastar
|
||||
verbs -= /mob/proc/ninjanet
|
||||
mind.special_verbs -= /mob/proc/ninjashift
|
||||
mind.special_verbs -= /mob/proc/ninjajaunt
|
||||
mind.special_verbs -= /mob/proc/ninjasmoke
|
||||
mind.special_verbs -= /mob/proc/ninjaboost
|
||||
mind.special_verbs -= /mob/proc/ninjapulse
|
||||
mind.special_verbs -= /mob/proc/ninjablade
|
||||
mind.special_verbs -= /mob/proc/ninjastar
|
||||
mind.special_verbs -= /mob/proc/ninjanet
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_process()
|
||||
set background = 1
|
||||
|
||||
spawn while(hologram&&initialize&&AI)//Suit on and there is an AI present.
|
||||
if(!initialize||get_dist(affecting,hologram.loc)>3)//Once suit is de-initialized or hologram reaches out of bounds.
|
||||
del(hologram.i_attached)
|
||||
del(hologram)
|
||||
|
||||
if(!control)//Meant to be used all the time but for now this'll do.
|
||||
var/obj/proc_holder/ai_holo_clear/D_C = locate() in AI
|
||||
AI.proc_holder_list -= D_C
|
||||
//verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
|
||||
|
||||
return
|
||||
sleep(10)//Checks every second.
|
||||
|
||||
|
||||
/*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
|
||||
|
||||
/mob/proc/grant_kamikaze_verbs()
|
||||
verbs -= /mob/proc/ninjashift
|
||||
verbs -= /mob/proc/ninjajaunt
|
||||
verbs -= /mob/proc/ninjapulse
|
||||
verbs -= /mob/proc/ninjastar
|
||||
verbs -= /mob/proc/ninjanet
|
||||
mind.special_verbs -= /mob/proc/ninjashift
|
||||
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
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja()
|
||||
set name = "Hack SpiderOS"
|
||||
set desc = "Hack directly into the Black Widow(tm) neuro-interface."
|
||||
set category = "AI Ninja Equip"
|
||||
set src = usr.loc
|
||||
|
||||
hack_spideros()
|
||||
return
|
||||
|
||||
/mob/proc/remove_kamikaze_verbs()
|
||||
verbs += /mob/proc/ninjashift
|
||||
verbs += /mob/proc/ninjajaunt
|
||||
verbs += /mob/proc/ninjapulse
|
||||
verbs += /mob/proc/ninjastar
|
||||
verbs += /mob/proc/ninjanet
|
||||
mind.special_verbs += /mob/proc/ninjashift
|
||||
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
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ai_return_control()
|
||||
set name = "Relinquish Control"
|
||||
set desc = "Return control to the user."
|
||||
set category = "AI Ninja Equip"
|
||||
set src = usr.loc
|
||||
|
||||
AI << browse(null, "window=hack spideros")//Close window
|
||||
AI << "You have seized your hacking attempt. [affecting] has regained control."
|
||||
affecting << "<b>UPDATE</b>: [AI.real_name] has ceased hacking attempt. All systems clear."
|
||||
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear
|
||||
|
||||
return
|
||||
*/
|
||||
|
||||
//Workaround
|
||||
/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
|
||||
|
||||
//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.
|
||||
name = "Hack SpiderOS"
|
||||
desc = "Hack directly into the Black Widow(tm) neuro-interface."
|
||||
panel = "AI Hacking"
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/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()
|
||||
return
|
||||
|
||||
/obj/proc_holder/ai_return_control
|
||||
name = "Relinquish Control"
|
||||
desc = "Return control to the user."
|
||||
panel = "AI Hacking"
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
@@ -197,16 +339,9 @@ ________________________________________________________________________________
|
||||
var/mob/living/silicon/ai/A = loc
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = A.loc
|
||||
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."
|
||||
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
|
||||
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)
|
||||
S.remove_AI_verbs()
|
||||
return
|
||||
|
||||
/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 += "<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=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=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>"
|
||||
@@ -308,16 +444,28 @@ ________________________________________________________________________________
|
||||
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 += "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>"
|
||||
|
||||
A << browse(dat,"window=hack spideros;size=400x444;border=1;can_resize=0;can_close=0;can_minimize=0")
|
||||
|
||||
|
||||
|
||||
|
||||
//DEBUG===================================
|
||||
|
||||
/*
|
||||
Most of these are at various points of incomplete.
|
||||
|
||||
/mob/verb/grant_object_panel()
|
||||
set name = "Grant AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
@@ -367,17 +515,40 @@ mob/verb/remove_object_panel()
|
||||
|
||||
world << "DIR: [get_dir_to(src.loc,M.loc)]"
|
||||
return
|
||||
|
||||
//Switches keys with AI stored inside suit. Useful for quickly testing things.
|
||||
|
||||
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"
|
||||
//
|
||||
/mob/verb/kill_self_debug()
|
||||
set name = "DEBUG Kill Self"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
if(!M.client)
|
||||
client.mob = M
|
||||
src:death()
|
||||
|
||||
/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()
|
||||
set name = "Set Debug Target"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
obj/hud/New(var/type = 0)
|
||||
src.instantiate(type)
|
||||
instantiate(type)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -76,41 +76,37 @@ obj/hud/New(var/type = 0)
|
||||
|
||||
/obj/hud/proc/instantiate(var/type = 0)
|
||||
|
||||
mymob = src.loc
|
||||
mymob = loc
|
||||
ASSERT(istype(mymob, /mob))
|
||||
|
||||
if(istype(mymob, /mob/living/carbon/human))
|
||||
src.human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
|
||||
if(ishuman(mymob))
|
||||
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))
|
||||
src.monkey_hud(mymob.UI)
|
||||
return
|
||||
else if(isbrain(mymob))
|
||||
brain_hud(mymob.UI)
|
||||
|
||||
//aliens
|
||||
if(istype(mymob, /mob/living/carbon/alien/larva))
|
||||
src.larva_hud()
|
||||
else if(istype(mymob, /mob/living/carbon/alien))
|
||||
src.alien_hud()
|
||||
return
|
||||
else if(islarva(mymob))
|
||||
larva_hud()
|
||||
|
||||
if(istype(mymob, /mob/living/silicon/ai))
|
||||
src.ai_hud()
|
||||
return
|
||||
else if(isalien(mymob))
|
||||
alien_hud()
|
||||
|
||||
if(istype(mymob, /mob/living/silicon/robot))
|
||||
src.robot_hud()
|
||||
return
|
||||
else if(isAI(mymob))
|
||||
ai_hud()
|
||||
|
||||
if(istype(mymob, /mob/living/silicon/hivebot))
|
||||
src.hivebot_hud()
|
||||
return
|
||||
else if(isrobot(mymob))
|
||||
robot_hud()
|
||||
|
||||
if(istype(mymob, /mob/living/silicon/hive_mainframe))
|
||||
src.hive_mainframe_hud()
|
||||
return
|
||||
else if(ishivebot(mymob))
|
||||
hivebot_hud()
|
||||
|
||||
if(istype(mymob, /mob/dead/observer))
|
||||
src.ghost_hud()
|
||||
return
|
||||
else if(ishivemainframe(mymob))
|
||||
hive_mainframe_hud()
|
||||
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
|
||||
return
|
||||
|
||||
@@ -14,134 +14,134 @@
|
||||
switch(state)
|
||||
if(0)
|
||||
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))
|
||||
user << "\blue You wrench the frame into place."
|
||||
src.anchored = 1
|
||||
src.state = 1
|
||||
anchored = 1
|
||||
state = 1
|
||||
if(istype(P, /obj/item/weapon/weldingtool))
|
||||
playsound(src.loc, 'Welder.ogg', 50, 1)
|
||||
playsound(loc, 'Welder.ogg', 50, 1)
|
||||
P:welding = 2
|
||||
if(do_after(user, 20))
|
||||
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)
|
||||
P:welding = 1
|
||||
if(1)
|
||||
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))
|
||||
user << "\blue You unfasten the frame."
|
||||
src.anchored = 0
|
||||
src.state = 0
|
||||
anchored = 0
|
||||
state = 0
|
||||
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."
|
||||
src.icon_state = "1"
|
||||
src.circuit = P
|
||||
icon_state = "1"
|
||||
circuit = P
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
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."
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
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."
|
||||
src.state = 1
|
||||
src.icon_state = "0"
|
||||
circuit.loc = src.loc
|
||||
src.circuit = null
|
||||
state = 1
|
||||
icon_state = "0"
|
||||
circuit.loc = loc
|
||||
circuit = null
|
||||
if(2)
|
||||
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."
|
||||
src.state = 1
|
||||
src.icon_state = "1"
|
||||
state = 1
|
||||
icon_state = "1"
|
||||
if(istype(P, /obj/item/weapon/cable_coil))
|
||||
if(P:amount >= 5)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
P:amount -= 5
|
||||
if(!P:amount) del(P)
|
||||
user << "\blue You add cables to the frame."
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
if(3)
|
||||
if(istype(P, /obj/item/weapon/wirecutters))
|
||||
if (src.brain)
|
||||
if (brain)
|
||||
user << "Get that brain out of there first"
|
||||
else
|
||||
playsound(src.loc, 'wirecutter.ogg', 50, 1)
|
||||
playsound(loc, 'wirecutter.ogg', 50, 1)
|
||||
user << "\blue You remove the cables."
|
||||
src.state = 2
|
||||
src.icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( src.loc )
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
var/obj/item/weapon/cable_coil/A = new /obj/item/weapon/cable_coil( loc )
|
||||
A.amount = 5
|
||||
|
||||
if(istype(P, /obj/item/stack/sheet/rglass))
|
||||
if(P:amount >= 2)
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if (P)
|
||||
P:amount -= 2
|
||||
if(!P:amount) del(P)
|
||||
user << "\blue You put in the glass panel."
|
||||
src.state = 4
|
||||
src.icon_state = "4"
|
||||
state = 4
|
||||
icon_state = "4"
|
||||
|
||||
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.")
|
||||
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.")
|
||||
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 may not injure a human being or, through inaction, allow a human being to come to harm.")
|
||||
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 protect your own existence as long as such does not conflict with the First or Second Law.")
|
||||
usr << "Law module applied."
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/purge))
|
||||
src.laws.clear_inherent_laws()
|
||||
laws.clear_inherent_laws()
|
||||
usr << "Law module applied."
|
||||
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/freeform))
|
||||
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."
|
||||
|
||||
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."
|
||||
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."
|
||||
return
|
||||
user.drop_item()
|
||||
P.loc = src
|
||||
src.brain = P
|
||||
brain = P
|
||||
usr << "Added a brain."
|
||||
src.icon_state = "3b"
|
||||
icon_state = "3b"
|
||||
|
||||
if(istype(P, /obj/item/weapon/crowbar) && src.brain)
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/weapon/crowbar) && brain)
|
||||
playsound(loc, 'Crowbar.ogg', 50, 1)
|
||||
user << "\blue You remove the brain."
|
||||
src.brain.loc = src.loc
|
||||
src.brain = null
|
||||
src.icon_state = "3"
|
||||
brain.loc = loc
|
||||
brain = null
|
||||
icon_state = "3"
|
||||
|
||||
if(4)
|
||||
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."
|
||||
src.state = 3
|
||||
if (src.brain)
|
||||
src.icon_state = "3b"
|
||||
state = 3
|
||||
if (brain)
|
||||
icon_state = "3b"
|
||||
else
|
||||
src.icon_state = "3"
|
||||
new /obj/item/stack/sheet/rglass( src.loc, 2 )
|
||||
icon_state = "3"
|
||||
new /obj/item/stack/sheet/rglass( loc, 2 )
|
||||
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."
|
||||
|
||||
new /mob/living/silicon/ai ( src.loc, laws, brain )
|
||||
new /mob/living/silicon/ai ( loc, laws, brain )
|
||||
del(src)
|
||||
|
||||
/obj/AIcore/deactivated
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
monkeymeat
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
|
||||
|
||||
humanmeat
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
@@ -48,11 +48,6 @@
|
||||
/* mobs */
|
||||
mob
|
||||
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
|
||||
var/obj/item/weapon/reagent_containers/glass/bucket/bucket_of_blood = new(loc)
|
||||
var/datum/reagent/blood/B = new()
|
||||
B.holder = bucket_of_blood
|
||||
B.holder = bucket_of_blood
|
||||
B.volume = 70
|
||||
//set reagent data
|
||||
B.data["donor"] = O
|
||||
@@ -108,7 +103,7 @@
|
||||
if (istype(O, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = O
|
||||
what = G.affecting
|
||||
|
||||
|
||||
var/datum/food_processor_process/P = select_recipe(what)
|
||||
if (!P)
|
||||
user << "\red That probably won't blend."
|
||||
|
||||
@@ -697,36 +697,39 @@
|
||||
return 0
|
||||
|
||||
/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."
|
||||
return 0
|
||||
if(mmi_as_oc.brain.brainmob.stat)
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "Beta-rhythm below acceptable level."
|
||||
return 0
|
||||
if(src.occupant)
|
||||
else if(occupant)
|
||||
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!"
|
||||
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(!src.occupant)
|
||||
if(!occupant)
|
||||
return mmi_moved_inside(mmi_as_oc,user)
|
||||
else
|
||||
user << "Occupant detected."
|
||||
return 0
|
||||
|
||||
|
||||
/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.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."
|
||||
return 0
|
||||
if(mmi_as_oc.brain.brainmob.stat)
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "Beta-rhythm below acceptable level."
|
||||
return 0
|
||||
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.perspective = EYE_PERSPECTIVE
|
||||
src.occupant = brainmob
|
||||
occupant = brainmob
|
||||
brainmob.loc = src //should allow relaymove
|
||||
brainmob.canmove = 1
|
||||
mmi_as_oc.loc = src
|
||||
@@ -742,7 +745,6 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/mecha/verb/view_stats()
|
||||
set name = "View Stats"
|
||||
set category = "Exosuit Interface"
|
||||
@@ -776,10 +778,10 @@
|
||||
/obj/mecha/proc/go_out()
|
||||
if(!src.occupant) return
|
||||
var/atom/movable/mob_container
|
||||
if(ishuman(src.occupant))
|
||||
if(ishuman(occupant))
|
||||
mob_container = src.occupant
|
||||
else if(istype(src.occupant, /mob/living/carbon/brain))
|
||||
var/mob/living/carbon/brain/brain = src.occupant
|
||||
else if(istype(occupant, /mob/living/carbon/brain))
|
||||
var/mob/living/carbon/brain/brain = occupant
|
||||
mob_container = brain.container
|
||||
else
|
||||
return
|
||||
@@ -792,8 +794,8 @@
|
||||
src.occupant << browse(null, "window=exosuit")
|
||||
if(istype(mob_container, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/mmi = mob_container
|
||||
if(mmi.brain)
|
||||
src.occupant.loc = mmi.brain
|
||||
if(mmi.brainmob)
|
||||
occupant.loc = mmi
|
||||
mmi.mecha = null
|
||||
src.occupant.canmove = 0
|
||||
src.verbs += /obj/mecha/verb/eject
|
||||
@@ -907,7 +909,7 @@
|
||||
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
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"
|
||||
else
|
||||
user << "[src]-MMI interface initialization failed."
|
||||
|
||||
@@ -192,6 +192,8 @@
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=40'><img src=pda_signaler.png> Signaler System</a></li>"
|
||||
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>"
|
||||
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)
|
||||
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>"
|
||||
@@ -289,7 +291,8 @@
|
||||
/obj/item/device/pda/Topic(href, href_list)
|
||||
..()
|
||||
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()) )
|
||||
|
||||
add_fingerprint(U)
|
||||
@@ -368,6 +371,11 @@
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_reagent_scanner))
|
||||
scanmode = 3
|
||||
if("Halogen Counter")
|
||||
if(scanmode == 4)
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_engine))
|
||||
scanmode = 4
|
||||
if("Honk")
|
||||
if ( !(last_honk && world.time < last_honk + 20) )
|
||||
playsound(loc, 'bikehorn.ogg', 50, 1)
|
||||
@@ -589,7 +597,6 @@
|
||||
cartridge = C
|
||||
if (C:radio)
|
||||
C:radio.hostpda = src
|
||||
updateUsrDialog()
|
||||
|
||||
else if (istype(C, /obj/item/weapon/card/id) && C:registered)
|
||||
if(!owner)
|
||||
@@ -597,18 +604,27 @@
|
||||
ownjob = C:assignment
|
||||
name = "PDA-[owner] ([ownjob])"
|
||||
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
|
||||
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()
|
||||
var/input=alert("Would you like to inert the card or update owner information?",,"Insert","Update")
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
|
||||
if ( (user.contents.Find(src) && user.contents.Find(C)) || (istype(loc, /turf) && get_dist(src, user) <= 1 && user.contents.Find(C)) )
|
||||
if ( !(user.stat || user.restrained()) )//If they can still act.
|
||||
if(input=="Insert")
|
||||
id_check(user, 2)
|
||||
else
|
||||
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
|
||||
|
||||
/obj/item/device/pda/attack(mob/C as mob, mob/user as mob)
|
||||
@@ -639,6 +655,16 @@
|
||||
spawn(15)
|
||||
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)
|
||||
switch(scanmode)
|
||||
if(2)
|
||||
|
||||
@@ -292,34 +292,22 @@
|
||||
src.attack_self(M)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/brain/examine() // -- TLE
|
||||
set src in oview(12)
|
||||
if (!( usr ))
|
||||
return
|
||||
usr << "This is \icon[src] \an [src.name]."
|
||||
usr << "This is \icon[src] \an [name]."
|
||||
|
||||
if(src.owner)
|
||||
//if the brain has an owner corpse
|
||||
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."
|
||||
if(brainmob)//if thar be a brain inside... the brain.
|
||||
usr << "You can feel the small spark of life still left in this one."
|
||||
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)
|
||||
if(!istype(M, /mob))
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human))
|
||||
return ..()
|
||||
@@ -330,7 +318,7 @@
|
||||
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)))
|
||||
// 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
|
||||
|
||||
//since these people will be dead M != usr
|
||||
@@ -350,27 +338,14 @@
|
||||
else
|
||||
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
|
||||
src.brainmob.mind.transfer_to(M)
|
||||
src.brainmob = null
|
||||
// if(src.owner)
|
||||
//if the brain has an owner corpse
|
||||
// if(src.owner.client)
|
||||
//if the player hasn't ghosted
|
||||
// src.owner.client.mob = M
|
||||
//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
|
||||
if(M.key)//Revised. /N
|
||||
M.ghostize(1)
|
||||
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(M)
|
||||
else
|
||||
M.key = brainmob.key
|
||||
|
||||
M:brain_op_stage = 3.0
|
||||
|
||||
@@ -388,7 +363,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE
|
||||
var/temp_sides
|
||||
if(src.sides < 1)
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
var/obj/item/robot_parts/r_leg/r_leg = null
|
||||
var/obj/item/robot_parts/chest/chest = null
|
||||
var/obj/item/robot_parts/head/head = null
|
||||
var/obj/item/brain/brain = null
|
||||
var/created_name = "Cyborg"
|
||||
|
||||
/obj/item/robot_parts/robot_suit/New()
|
||||
@@ -151,50 +150,49 @@
|
||||
user << "\blue You need to attach a flash to it first!"
|
||||
|
||||
if(istype(W, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/mmi = W
|
||||
if(src.check_completion())
|
||||
if(!istype(src.loc,/turf))
|
||||
var/obj/item/device/mmi/M = W
|
||||
if(check_completion())
|
||||
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."
|
||||
return
|
||||
if(!mmi.brain)
|
||||
if(!M.brainmob)
|
||||
user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose."
|
||||
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."
|
||||
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)
|
||||
mmi.brain.brainmob.mind.transfer_to(O)
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
|
||||
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
|
||||
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)
|
||||
del(G)
|
||||
break
|
||||
if(O.mind)
|
||||
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")
|
||||
if(O.mind && 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.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 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 << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
|
||||
|
||||
//SN src = null
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.cell = src.chest.cell
|
||||
O.cell = chest.cell
|
||||
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)
|
||||
else
|
||||
|
||||
@@ -420,11 +420,12 @@ CIRCULAR SAW
|
||||
"\red You sever your brain's connection to the spine with [src]!" \
|
||||
)
|
||||
|
||||
M:brain_op_stage = 4.0
|
||||
M.death()
|
||||
var/obj/item/brain/B = new(M.loc)
|
||||
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
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -13,13 +13,8 @@
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 1
|
||||
var/mob/dead/observer/newmob
|
||||
for(var/mob/O in viewers(src, null))
|
||||
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)
|
||||
|
||||
@@ -31,13 +26,8 @@
|
||||
src.occupied = 1
|
||||
src.meat = 5
|
||||
src.meattype = 2
|
||||
var/mob/dead/observer/newmob
|
||||
for(var/mob/O in viewers(src, null))
|
||||
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)
|
||||
else
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
initialize()
|
||||
|
||||
/obj/item/device/radio/initialize()
|
||||
if(src.freerange)
|
||||
if(src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
else if (src.frequency < 1441 || src.frequency > 1489)
|
||||
world.log << "[src] ([src.type]) has a frequency of [src.frequency], sanitizing."
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
if(freerange)
|
||||
if(frequency < 1200 || frequency > 1600)
|
||||
frequency = sanitize_frequency(frequency)
|
||||
else if (frequency < 1441 || frequency > 1489)
|
||||
world.log << "[src] ([type]) has a frequency of [frequency], sanitizing."
|
||||
frequency = sanitize_frequency(frequency)
|
||||
|
||||
set_frequency(frequency)
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
/obj/item/device/radio/proc/interact(mob/user as mob)
|
||||
var/dat = {"
|
||||
<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>
|
||||
Speaker: [src.listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=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: [listening ? "<A href='byond://?src=\ref[src];listen=0'>Engaged</A>" : "<A href='byond://?src=\ref[src];listen=1'>Disengaged</A>"]<BR>
|
||||
Frequency:
|
||||
<A href='byond://?src=\ref[src];freq=-10'>-</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=10'>+</A><BR>"}
|
||||
|
||||
@@ -50,13 +50,13 @@ Frequency:
|
||||
return
|
||||
|
||||
/obj/item/device/radio/proc/text_wires()
|
||||
if (!src.b_stat)
|
||||
if (!b_stat)
|
||||
return ""
|
||||
return {"
|
||||
<hr>
|
||||
Green Wire: <A href='byond://?src=\ref[src];wires=4'>[(src.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>
|
||||
Blue Wire: <A href='byond://?src=\ref[src];wires=1'>[(src.wires & 1) ? "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'>[(wires & 2) ? "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)
|
||||
@@ -75,10 +75,10 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
|
||||
return
|
||||
if (\
|
||||
!(\
|
||||
istype(usr, /mob/living/silicon) || \
|
||||
issilicon(usr) || \
|
||||
(\
|
||||
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
|
||||
else if (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)
|
||||
set_frequency(new_frequency)
|
||||
|
||||
if (src.traitor_frequency && src.frequency == src.traitor_frequency)
|
||||
if (traitor_frequency && frequency == traitor_frequency)
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=radio")
|
||||
// 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
|
||||
R.loc = T
|
||||
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)
|
||||
return
|
||||
else if (href_list["talk"])
|
||||
src.broadcasting = text2num(href_list["talk"])
|
||||
broadcasting = text2num(href_list["talk"])
|
||||
else if (href_list["listen"])
|
||||
var/chan_name = href_list["ch_name"]
|
||||
if (!chan_name)
|
||||
src.listening = text2num(href_list["listen"])
|
||||
listening = text2num(href_list["listen"])
|
||||
else
|
||||
if (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"])
|
||||
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
|
||||
return
|
||||
if (src.wires & t1)
|
||||
src.wires &= ~t1
|
||||
if (wires & t1)
|
||||
wires &= ~t1
|
||||
else
|
||||
src.wires |= t1
|
||||
if (!( src.master ))
|
||||
if (istype(src.loc, /mob))
|
||||
interact(src.loc)
|
||||
wires |= t1
|
||||
if (!( master ))
|
||||
if (istype(loc, /mob))
|
||||
interact(loc)
|
||||
else
|
||||
src.updateDialog()
|
||||
updateDialog()
|
||||
else
|
||||
if (istype(src.master.loc, /mob))
|
||||
interact(src.master.loc)
|
||||
if (istype(master.loc, /mob))
|
||||
interact(master.loc)
|
||||
else
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
updateDialog()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/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
|
||||
if(channel && src.channels && src.channels.len > 0)
|
||||
if(channel && channels && channels.len > 0)
|
||||
if (channel == "department")
|
||||
//world << "DEBUG: channel=\"[channel]\" switching to \"[src.channels[1]]\""
|
||||
channel = src.channels[1]
|
||||
//world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\""
|
||||
channel = channels[1]
|
||||
connection = secure_radio_connections[channel]
|
||||
else
|
||||
connection = src.radio_connection
|
||||
connection = radio_connection
|
||||
channel = null
|
||||
if (!istype(connection))
|
||||
return
|
||||
@@ -167,19 +167,18 @@ Speaker: <A href='byond://?src=\ref[src];ch_name=[chan_name];listen=[!list]'>[li
|
||||
|
||||
var/eqjobname
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
eqjobname = H.get_assignment()
|
||||
else if (istype(M, /mob/living/carbon))
|
||||
if (ishuman(M))
|
||||
eqjobname = M:get_assignment()
|
||||
else if (iscarbon(M))
|
||||
eqjobname = "No id" //only humans can wear ID
|
||||
else if (istype(M,/mob/living/silicon/ai))
|
||||
else if (isAI(M))
|
||||
eqjobname = "AI"
|
||||
else if (istype(M,/mob/living/silicon/robot))
|
||||
eqjobname = "Android"
|
||||
else if (isrobot(M))
|
||||
eqjobname = "Cyborg"//Androids don't really describe these too well, in my opinion.
|
||||
else
|
||||
eqjobname = "Unknown"
|
||||
|
||||
if (!(src.wires & WIRE_TRANSMIT))
|
||||
if (!(wires & WIRE_TRANSMIT))
|
||||
return
|
||||
|
||||
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)
|
||||
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
|
||||
else
|
||||
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))
|
||||
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/part_b = "</span><b> \icon[src]\[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
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)
|
||||
|
||||
/obj/item/device/radio/hear_talk(mob/M as mob, msg)
|
||||
if (src.broadcasting)
|
||||
if (broadcasting)
|
||||
talk_into(M, msg)
|
||||
/*
|
||||
/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
|
||||
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))
|
||||
return
|
||||
last_transmission = world.time
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
if (!(wires & WIRE_RECEIVE))
|
||||
return
|
||||
if (!freq) //recieved on main frequency
|
||||
if (!src.listening)
|
||||
if (!listening)
|
||||
return
|
||||
else
|
||||
var/accept = (freq==frequency && src.listening)
|
||||
var/accept = (freq==frequency && listening)
|
||||
if (!accept)
|
||||
for (var/ch_name in channels)
|
||||
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/list/hear = hearers(1, T)
|
||||
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)
|
||||
if (isturf(M.loc))
|
||||
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()
|
||||
|
||||
..()
|
||||
if ((in_range(src, usr) || src.loc == usr))
|
||||
if (src.b_stat)
|
||||
if ((in_range(src, usr) || loc == usr))
|
||||
if (b_stat)
|
||||
usr.show_message("\blue \the [src] can be attached and modified!")
|
||||
else
|
||||
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
|
||||
if (!( istype(W, /obj/item/weapon/screwdriver) ))
|
||||
return
|
||||
src.b_stat = !( src.b_stat )
|
||||
if (src.b_stat)
|
||||
b_stat = !( b_stat )
|
||||
if (b_stat)
|
||||
user.show_message("\blue The radio can now be attached and modified!")
|
||||
else
|
||||
user.show_message("\blue The radio can no longer be modified or attached!")
|
||||
src.updateDialog()
|
||||
updateDialog()
|
||||
//Foreach goto(83)
|
||||
src.add_fingerprint(user)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/emp_act(severity)
|
||||
|
||||
@@ -889,6 +889,16 @@ datum
|
||||
reliability_base = 76
|
||||
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/////////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
@@ -123,8 +123,8 @@ When thinking about new stuff, check here to see if there are any slots unfilled
|
||||
//BIOTECH
|
||||
1 | Bruise Pack, Scalple
|
||||
2 | PANDEMIC Board, Mass Spectrometer
|
||||
3 | AI Core, Brains
|
||||
4 |
|
||||
3 | AI Core, Brains (MMI)
|
||||
4 | MMI+Radio
|
||||
5 |
|
||||
6 |
|
||||
7 |
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/obj/hud/proc/ghost_hud()
|
||||
src.station_explosion = new src.h_type( src )
|
||||
src.station_explosion.icon = 'station_explosion.dmi'
|
||||
src.station_explosion.icon_state = "start"
|
||||
src.station_explosion.layer = 20
|
||||
src.station_explosion.mouse_opacity = 0
|
||||
src.station_explosion.screen_loc = "1,3"
|
||||
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"
|
||||
return
|
||||
@@ -1,54 +1,92 @@
|
||||
/mob/dead/observer/New(mob/corpse)
|
||||
src.invisibility = 10
|
||||
src.sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
src.see_invisible = 15
|
||||
src.see_in_dark = 100
|
||||
src.verbs += /mob/dead/observer/proc/dead_tele
|
||||
/mob/dead/observer/New(mob/body, var/safety = 0)
|
||||
invisibility = 10
|
||||
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
|
||||
see_invisible = 15
|
||||
see_in_dark = 100
|
||||
verbs += /mob/dead/observer/proc/dead_tele
|
||||
|
||||
if(corpse)
|
||||
src.corpse = corpse
|
||||
src.loc = get_turf(corpse)
|
||||
src.real_name = corpse.real_name
|
||||
src.name = corpse.real_name
|
||||
src.verbs += /mob/dead/observer/proc/reenter_corpse
|
||||
if(body)
|
||||
var/turf/location = get_turf(body)//Where is the mob located?
|
||||
if(location)//Found turf.
|
||||
loc = location
|
||||
else//Safety, in case a turf cannot be found.
|
||||
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 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."
|
||||
return*/
|
||||
if(src.key)
|
||||
if(key)
|
||||
var/mob/dead/observer/ghost = new(src)
|
||||
ghost.key = src.key
|
||||
src.verbs -= /mob/proc/ghostize
|
||||
ghost.key = key
|
||||
verbs -= /mob/proc/ghost
|
||||
if (ghost.client)
|
||||
ghost.client.eye = ghost
|
||||
return
|
||||
|
||||
/mob/proc/adminghostize()
|
||||
if(src.client)
|
||||
src.client.mob = new/mob/dead/observer(src)
|
||||
if(client)
|
||||
client.mob = new/mob/dead/observer(src)
|
||||
return
|
||||
|
||||
/mob/dead/observer/Move(NewLoc, direct)
|
||||
if(NewLoc)
|
||||
src.loc = NewLoc
|
||||
loc = NewLoc
|
||||
return
|
||||
if((direct & NORTH) && src.y < world.maxy)
|
||||
src.y++
|
||||
if((direct & SOUTH) && src.y > 1)
|
||||
src.y--
|
||||
if((direct & EAST) && src.x < world.maxx)
|
||||
src.x++
|
||||
if((direct & WEST) && src.x > 1)
|
||||
src.x--
|
||||
if((direct & NORTH) && y < world.maxy)
|
||||
y++
|
||||
if((direct & SOUTH) && y > 1)
|
||||
y--
|
||||
if((direct & EAST) && x < world.maxx)
|
||||
x++
|
||||
if((direct & WEST) && x > 1)
|
||||
x--
|
||||
|
||||
/mob/dead/observer/examine()
|
||||
if(usr)
|
||||
usr << src.desc
|
||||
usr << desc
|
||||
|
||||
/mob/dead/observer/can_use_hands() return 0
|
||||
/mob/dead/observer/is_active() return 0
|
||||
@@ -56,7 +94,7 @@
|
||||
/mob/dead/observer/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
if (client.statpanel == "Status")
|
||||
if(ticker)
|
||||
if(ticker.mode)
|
||||
//world << "DEBUG: ticker not null"
|
||||
@@ -71,19 +109,16 @@
|
||||
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
|
||||
|
||||
/mob/dead/observer/proc/reenter_corpse()
|
||||
set category = "Special Verbs"
|
||||
set category = "Ghost"
|
||||
set name = "Re-enter Corpse"
|
||||
if(!corpse)
|
||||
alert("You don't have a corpse!")
|
||||
return
|
||||
// if(corpse.stat == 2)
|
||||
// alert("Your body is dead!")
|
||||
// return
|
||||
if(src.client && src.client.holder && src.client.holder.state == 2)
|
||||
var/rank = src.client.holder.rank
|
||||
src.client.clear_admin_verbs()
|
||||
src.client.holder.state = 1
|
||||
src.client.update_admins(rank)
|
||||
if(client && client.holder && client.holder.state == 2)
|
||||
var/rank = client.holder.rank
|
||||
client.clear_admin_verbs()
|
||||
client.holder.state = 1
|
||||
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
|
||||
var/S=0
|
||||
for(var/obj/rune/R in world)
|
||||
@@ -94,13 +129,13 @@
|
||||
return
|
||||
if(corpse.ajourn)
|
||||
corpse.ajourn=0
|
||||
src.client.mob = corpse
|
||||
client.mob = corpse
|
||||
if (corpse.stat==2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
verbs += /mob/proc/ghost
|
||||
del(src)
|
||||
|
||||
/mob/dead/observer/proc/dead_tele()
|
||||
set category = "Special Verbs"
|
||||
set category = "Ghost"
|
||||
set name = "Teleport"
|
||||
set desc= "Teleport"
|
||||
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
|
||||
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>"
|
||||
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."
|
||||
@@ -131,14 +166,14 @@ var/list/karma_spenders = list()
|
||||
if(!M.client)
|
||||
usr << "\red That mob has no client connected at the moment."
|
||||
return
|
||||
if(src.client.karma_spent)
|
||||
if(client.karma_spent)
|
||||
usr << "\red You've already spent your karma for the round."
|
||||
return
|
||||
for(var/a in karma_spenders)
|
||||
if(a == src.key)
|
||||
if(a == key)
|
||||
usr << "\red You've already spent your karma for the round."
|
||||
return
|
||||
if(M.key == src.key)
|
||||
if(M.key == key)
|
||||
usr << "\red You can't spend karma on yourself!"
|
||||
return
|
||||
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")
|
||||
M.client.karma -= 1
|
||||
usr << "[choice] karma spent on [M.name]."
|
||||
src.client.karma_spent = 1
|
||||
karma_spenders.Add(src.key)
|
||||
client.karma_spent = 1
|
||||
karma_spenders.Add(key)
|
||||
if(M.client.karma <= -2 || M.client.karma >= 2)
|
||||
var/special_role = "None"
|
||||
var/assigned_role = "None"
|
||||
@@ -170,13 +205,13 @@ var/list/karma_spenders = list()
|
||||
|
||||
/mob/dead/observer/verb/toggle_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."
|
||||
if(src.client.be_alien)
|
||||
src.client.be_alien = 0
|
||||
if(client.be_alien)
|
||||
client.be_alien = 0
|
||||
src << "You are now excluded from alien candidate lists until end of round."
|
||||
else if(!src.client.be_alien)
|
||||
src.client.be_alien = 1
|
||||
else if(!client.be_alien)
|
||||
client.be_alien = 1
|
||||
src << "You are now included in alien candidate lists until end of round."
|
||||
|
||||
/mob/dead/observer/memory()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if (src.key)
|
||||
spawn(10)
|
||||
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
|
||||
if (mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
@@ -556,11 +556,6 @@
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
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)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
/*
|
||||
@@ -99,7 +99,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if (src.client)
|
||||
spawn(10)
|
||||
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
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
|
||||
@@ -493,11 +493,6 @@
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
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)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
|
||||
@@ -6,60 +6,119 @@
|
||||
w_class = 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/construction_time = 75
|
||||
//these vars are so the mecha fabricator doesn't shit itself anymore. --NEO
|
||||
|
||||
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)
|
||||
if(istype(O,/obj/item/brain) && !brain) //Time to stick a brain in it --NEO
|
||||
if(!O:owner)
|
||||
if(istype(O,/obj/item/brain) && !brainmob) //Time to stick a brain in it --NEO
|
||||
if(!O:brainmob)
|
||||
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
|
||||
return
|
||||
for(var/mob/V in viewers(src, null))
|
||||
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()
|
||||
O.loc = src
|
||||
brain.brainmob.container = src
|
||||
brain.brainmob.stat = 0
|
||||
locked = 1
|
||||
name = "Man-Machine Interface: [brain.brainmob.real_name]"
|
||||
del(O)
|
||||
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
|
||||
locked = 1
|
||||
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))
|
||||
locked = !locked
|
||||
user << "\blue You [locked ? "lock" : "unlock"] the brain holder."
|
||||
else
|
||||
user << "\red Access denied."
|
||||
return
|
||||
if(brain)
|
||||
O.attack(brain.brainmob, user)
|
||||
if(brainmob)
|
||||
O.attack(brainmob, user)//Oh noooeeeee
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(!brain)
|
||||
if(!brainmob)
|
||||
user << "\red You upend the MMI, but there's nothing in it."
|
||||
else if(locked)
|
||||
user << "\red You upend the MMI, but the brain is clamped into place."
|
||||
else
|
||||
user << "\blue You upend the MMI, spilling the brain onto the floor."
|
||||
brain.loc = user.loc
|
||||
brain.brainmob.container = null
|
||||
brain.brainmob.death()
|
||||
brain = null
|
||||
var/obj/item/brain/brain = new(user.loc)
|
||||
brainmob.container = null//Reset brainmob mmi var.
|
||||
brainmob.loc = brain//Throw mob into brain.
|
||||
brain.brainmob = brainmob//Set the brain to use the brainmob
|
||||
brainmob = null//Set mmi brainmob var to null
|
||||
|
||||
icon_state = "mmi_empty"
|
||||
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."
|
||||
@@ -1,5 +1,6 @@
|
||||
/mob/living/carbon/brain
|
||||
var/obj/item/device/mmi/container = null
|
||||
var
|
||||
obj/item/device/mmi/container = null
|
||||
|
||||
New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
@@ -7,6 +8,13 @@
|
||||
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)
|
||||
if (istype(other, /mob/living/silicon/ai))
|
||||
return 1
|
||||
@@ -16,41 +24,4 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/human))
|
||||
return 1
|
||||
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
|
||||
return ..()
|
||||
@@ -1,22 +1,21 @@
|
||||
/mob/living/carbon/brain/death(gibbed)
|
||||
var/cancel
|
||||
if(src.container)
|
||||
if (!gibbed)
|
||||
for(var/mob/O in viewers(src.container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
src.container.icon_state = "mmi_dead"
|
||||
src.stat = 2
|
||||
if(!gibbed&&container)//If not gibbed but in a container.
|
||||
for(var/mob/O in viewers(container, null))
|
||||
O.show_message(text("\red <B>[]'s MMI flatlines!</B>", src), 1, "\red You hear something flatline.", 2)
|
||||
container.icon_state = "mmi_dead"
|
||||
stat = 2
|
||||
|
||||
if(src.blind)
|
||||
src.blind.layer = 0
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
if(blind)
|
||||
blind.layer = 0
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
|
||||
var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch
|
||||
var/cancel
|
||||
store_memory("Time of death: [tod]", 0)
|
||||
|
||||
for(var/mob/M in world)
|
||||
@@ -29,8 +28,8 @@
|
||||
log_game("Rebooting because of no live players")
|
||||
world.Reboot()
|
||||
return
|
||||
if (src.key)
|
||||
if (key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
if(key && stat == 2)
|
||||
verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
30
code/modules/mob/living/carbon/brain/hud.dm
Normal file
30
code/modules/mob/living/carbon/brain/hud.dm
Normal 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
|
||||
@@ -4,38 +4,19 @@
|
||||
set invisibility = 0
|
||||
set background = 1
|
||||
|
||||
if (src.monkeyizing)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
if(src.loc)
|
||||
if(loc)
|
||||
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
|
||||
//blinded get reset each cycle and then get activated later in the
|
||||
//code. Very ugly. I dont care. Moving this stuff here so its easy
|
||||
//to find it.
|
||||
src.blinded = null
|
||||
blinded = null
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
//Changeling things
|
||||
handle_changeling()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
@@ -46,24 +27,15 @@
|
||||
//Chemicals in the body
|
||||
handle_chemicals_in_body()
|
||||
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
// Update clothing
|
||||
update_clothing()
|
||||
|
||||
clamp_values()
|
||||
|
||||
proc
|
||||
@@ -78,59 +50,48 @@
|
||||
oxyloss = max(oxyloss, 0)
|
||||
toxloss = max(toxloss, 0)
|
||||
|
||||
handle_disabilities()
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if (src.radiation)
|
||||
if (src.radiation > 100)
|
||||
src.radiation = 100
|
||||
src.weakened = 10
|
||||
if (radiation)
|
||||
if (radiation > 100)
|
||||
radiation = 100
|
||||
weakened = 10
|
||||
src << "\red You feel weak."
|
||||
// emote("collapse")
|
||||
|
||||
switch(src.radiation)
|
||||
switch(radiation)
|
||||
if(1 to 49)
|
||||
src.radiation--
|
||||
radiation--
|
||||
if(prob(25))
|
||||
src.toxloss++
|
||||
src.updatehealth()
|
||||
toxloss++
|
||||
updatehealth()
|
||||
|
||||
if(50 to 74)
|
||||
src.radiation -= 2
|
||||
src.toxloss++
|
||||
radiation -= 2
|
||||
toxloss++
|
||||
if(prob(5))
|
||||
src.radiation -= 5
|
||||
src.weakened = 3
|
||||
radiation -= 5
|
||||
weakened = 3
|
||||
src << "\red You feel weak."
|
||||
// emote("collapse")
|
||||
src.updatehealth()
|
||||
updatehealth()
|
||||
|
||||
if(75 to 100)
|
||||
src.radiation -= 3
|
||||
src.toxloss += 3
|
||||
radiation -= 3
|
||||
toxloss += 3
|
||||
if(prob(1))
|
||||
src << "\red You mutate!"
|
||||
randmutb(src)
|
||||
domutcheck(src,null)
|
||||
emote("gasp")
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
breathe()
|
||||
|
||||
get_breath_from_internal(volume_needed)
|
||||
updatehealth()
|
||||
|
||||
update_canmove()
|
||||
if(src.in_contents_of(/obj/mecha))
|
||||
if(in_contents_of(/obj/mecha))
|
||||
canmove = 1
|
||||
else
|
||||
canmove = 0
|
||||
return
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
|
||||
|
||||
handle_environment(datum/gas_mixture/environment)
|
||||
if(!environment)
|
||||
return
|
||||
@@ -154,7 +115,7 @@
|
||||
return //TODO: DEFERRED
|
||||
|
||||
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)
|
||||
//fireloss += 2.5*discomfort
|
||||
fireloss += 5.0*discomfort
|
||||
@@ -163,12 +124,12 @@
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if (src.drowsyness)
|
||||
src.drowsyness--
|
||||
src.eye_blurry = max(2, src.eye_blurry)
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
src.sleeping = 1
|
||||
src.paralysis = 5
|
||||
sleeping = 1
|
||||
paralysis = 5
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
@@ -177,7 +138,7 @@
|
||||
else
|
||||
dizziness = max(0, dizziness - 1)
|
||||
|
||||
src.updatehealth()
|
||||
updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
@@ -187,188 +148,153 @@
|
||||
|
||||
if(oxyloss > 25) paralysis = max(paralysis, 3)
|
||||
|
||||
if(src.sleeping)
|
||||
src.paralysis = max(src.paralysis, 5)
|
||||
if(sleeping)
|
||||
paralysis = max(paralysis, 5)
|
||||
if (prob(1) && health) spawn(0) emote("snore")
|
||||
|
||||
if(src.resting)
|
||||
src.weakened = max(src.weakened, 5)
|
||||
if(resting)
|
||||
weakened = max(weakened, 5)
|
||||
|
||||
if(health < -100 && stat != 2)
|
||||
death()
|
||||
else if(src.health < 0)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
else if(health < 0)
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) oxyloss++
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
src.paralysis = max(src.paralysis, 5)
|
||||
if(stat != 2) stat = 1
|
||||
paralysis = max(paralysis, 5)
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
if (stat != 2) //Alive.
|
||||
|
||||
if (src.paralysis || src.stunned || src.weakened || changeling_fakedeath) //Stunned etc.
|
||||
if (src.stunned > 0)
|
||||
src.stunned--
|
||||
src.stat = 0
|
||||
if (src.weakened > 0)
|
||||
src.weakened--
|
||||
src.lying = 1
|
||||
src.stat = 0
|
||||
if (src.paralysis > 0)
|
||||
src.paralysis--
|
||||
src.blinded = 1
|
||||
src.lying = 1
|
||||
src.stat = 1
|
||||
var/h = src.hand
|
||||
src.hand = 0
|
||||
if (paralysis || stunned || weakened) //Stunned etc.
|
||||
if (stunned > 0)
|
||||
stunned--
|
||||
stat = 0
|
||||
if (weakened > 0)
|
||||
weakened--
|
||||
lying = 1
|
||||
stat = 0
|
||||
if (paralysis > 0)
|
||||
paralysis--
|
||||
blinded = 1
|
||||
lying = 1
|
||||
stat = 1
|
||||
var/h = hand
|
||||
hand = 0
|
||||
drop_item()
|
||||
src.hand = 1
|
||||
hand = 1
|
||||
drop_item()
|
||||
src.hand = h
|
||||
hand = h
|
||||
|
||||
else //Not stunned.
|
||||
src.lying = 0
|
||||
src.stat = 0
|
||||
lying = 0
|
||||
stat = 0
|
||||
|
||||
else //Dead.
|
||||
src.lying = 1
|
||||
src.blinded = 1
|
||||
src.stat = 2
|
||||
lying = 1
|
||||
blinded = 1
|
||||
stat = 2
|
||||
|
||||
if (src.stuttering) src.stuttering--
|
||||
if (stuttering) stuttering--
|
||||
|
||||
if (src.eye_blind)
|
||||
src.eye_blind--
|
||||
src.blinded = 1
|
||||
if (eye_blind)
|
||||
eye_blind--
|
||||
blinded = 1
|
||||
|
||||
if (src.ear_deaf > 0) src.ear_deaf--
|
||||
if (src.ear_damage < 25)
|
||||
src.ear_damage -= 0.05
|
||||
src.ear_damage = max(src.ear_damage, 0)
|
||||
if (ear_deaf > 0) ear_deaf--
|
||||
if (ear_damage < 25)
|
||||
ear_damage -= 0.05
|
||||
ear_damage = max(ear_damage, 0)
|
||||
|
||||
// src.density = !( src.lying )
|
||||
// density = !( lying )
|
||||
|
||||
if (src.sdisabilities & 1)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & 4)
|
||||
src.ear_deaf = 1
|
||||
if (sdisabilities & 1)
|
||||
blinded = 1
|
||||
if (sdisabilities & 4)
|
||||
ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
src.eye_blurry--
|
||||
src.eye_blurry = max(0, src.eye_blurry)
|
||||
if (eye_blurry > 0)
|
||||
eye_blurry--
|
||||
eye_blurry = max(0, eye_blurry)
|
||||
|
||||
if (src.druggy > 0)
|
||||
src.druggy--
|
||||
src.druggy = max(0, src.druggy)
|
||||
if (druggy > 0)
|
||||
druggy--
|
||||
druggy = max(0, druggy)
|
||||
|
||||
return 1
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.mutations & XRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = 2
|
||||
else if (src.stat != 2)
|
||||
src.sight &= ~SEE_TURFS
|
||||
src.sight &= ~SEE_MOBS
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 2
|
||||
src.see_invisible = 0
|
||||
if (stat == 2 || mutations & XRAY)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = 2
|
||||
else if (stat != 2)
|
||||
sight &= ~SEE_TURFS
|
||||
sight &= ~SEE_MOBS
|
||||
sight &= ~SEE_OBJS
|
||||
see_in_dark = 2
|
||||
see_invisible = 0
|
||||
|
||||
if (src.sleep) src.sleep.icon_state = text("sleep[]", src.sleeping)
|
||||
if (src.rest) src.rest.icon_state = text("rest[]", src.resting)
|
||||
if (sleep) sleep.icon_state = text("sleep[]", sleeping)
|
||||
if (rest) rest.icon_state = text("rest[]", resting)
|
||||
|
||||
if (src.healths)
|
||||
if (src.stat != 2)
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
if(100 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
src.healths.icon_state = "health1"
|
||||
healths.icon_state = "health1"
|
||||
if(60 to 80)
|
||||
src.healths.icon_state = "health2"
|
||||
healths.icon_state = "health2"
|
||||
if(40 to 60)
|
||||
src.healths.icon_state = "health3"
|
||||
healths.icon_state = "health3"
|
||||
if(20 to 40)
|
||||
src.healths.icon_state = "health4"
|
||||
healths.icon_state = "health4"
|
||||
if(0 to 20)
|
||||
src.healths.icon_state = "health5"
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if(src.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 (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
|
||||
// if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
|
||||
//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"
|
||||
if ((blind && stat != 2))
|
||||
if ((blinded))
|
||||
blind.layer = 18
|
||||
else
|
||||
src.bodytemp.icon_state = "temp-4"
|
||||
*/
|
||||
src.client.screen -= src.hud_used.blurry
|
||||
src.client.screen -= src.hud_used.druggy
|
||||
src.client.screen -= src.hud_used.vimpaired
|
||||
blind.layer = 0
|
||||
|
||||
if ((src.blind && src.stat != 2))
|
||||
if ((src.blinded))
|
||||
src.blind.layer = 18
|
||||
else
|
||||
src.blind.layer = 0
|
||||
if (disabilities & 1)
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (src.disabilities & 1)
|
||||
src.client.screen += src.hud_used.vimpaired
|
||||
if (eye_blurry)
|
||||
client.screen += hud_used.blurry
|
||||
|
||||
if (src.eye_blurry)
|
||||
src.client.screen += src.hud_used.blurry
|
||||
if (druggy)
|
||||
client.screen += hud_used.druggy
|
||||
|
||||
if (src.druggy)
|
||||
src.client.screen += src.hud_used.druggy
|
||||
|
||||
if (src.stat != 2)
|
||||
if (src.machine)
|
||||
if (!( src.machine.check_eye(src) ))
|
||||
src.reset_view(null)
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
reset_view(null)
|
||||
else
|
||||
if(!client.adminobs)
|
||||
reset_view(null)
|
||||
|
||||
return 1
|
||||
|
||||
handle_random_events()
|
||||
|
||||
handle_virus_updates()
|
||||
if(src.bodytemperature > 406 && src.virus)
|
||||
src.virus.cure()
|
||||
return
|
||||
|
||||
check_if_buckled()
|
||||
|
||||
|
||||
handle_changeling()
|
||||
if(bodytemperature > 406 && virus)
|
||||
virus.cure()
|
||||
return
|
||||
@@ -1,3 +1,3 @@
|
||||
/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 ..()
|
||||
@@ -45,7 +45,6 @@
|
||||
N.show_message(text("\red <B>[M] bursts out of [src]!</B>"), 2)
|
||||
. = ..(give_medal)
|
||||
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if(src.virus || M.virus)
|
||||
@@ -114,7 +113,6 @@
|
||||
src.hands.dir = SOUTH
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health > 0)
|
||||
var/t_him = "it"
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if (client)
|
||||
spawn(10)
|
||||
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
|
||||
if(mind)
|
||||
|
||||
@@ -766,20 +766,20 @@
|
||||
else
|
||||
seer = 0
|
||||
see_invisible = 0
|
||||
else if (istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
switch(src.wear_mask:mode)
|
||||
else if (istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja))
|
||||
switch(wear_mask:mode)
|
||||
if(1)
|
||||
src.see_in_dark = 5
|
||||
if(!src.druggy)
|
||||
src.see_invisible = 0
|
||||
see_in_dark = 5
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
if(2)
|
||||
src.sight |= SEE_MOBS
|
||||
if(!src.druggy)
|
||||
src.see_invisible = 2
|
||||
sight |= SEE_MOBS
|
||||
if(!druggy)
|
||||
see_invisible = 2
|
||||
if(3)
|
||||
src.sight |= SEE_TURFS
|
||||
if(!src.druggy)
|
||||
src.see_invisible = 0
|
||||
sight |= SEE_TURFS
|
||||
if(!druggy)
|
||||
see_invisible = 0
|
||||
|
||||
else if (istype(src.glasses, /obj/item/clothing/glasses/meson))
|
||||
src.sight |= SEE_TURFS
|
||||
@@ -996,11 +996,6 @@
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
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)
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return
|
||||
@@ -39,6 +39,6 @@
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
|
||||
src.verbs += /mob/proc/ghost
|
||||
|
||||
return ..(gibbed)
|
||||
@@ -47,7 +47,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.name == "monkey")
|
||||
src.name = text("monkey ([rand(1, 1000)])")
|
||||
src.real_name = src.name
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/mob/living/proc/binarycheck()
|
||||
if (istype(src, /mob/living/silicon)) return 1
|
||||
if (!istype(src, /mob/living/carbon/human)) return
|
||||
if (issilicon(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
@@ -8,8 +8,8 @@
|
||||
if(dongle.translate_binary) return 1
|
||||
|
||||
/mob/living/proc/hivecheck()
|
||||
if (istype(src, /mob/living/carbon/alien)) return 1
|
||||
if (!istype(src, /mob/living/carbon/human)) return
|
||||
if (isalien(src)) return 1
|
||||
if (!ishuman(src)) return
|
||||
var/mob/living/carbon/human/H = src
|
||||
if (H.ears)
|
||||
var/obj/item/device/radio/headset/dongle = H.ears
|
||||
@@ -23,39 +23,39 @@
|
||||
return
|
||||
|
||||
if (length(message) >= 1)
|
||||
if (src.miming && copytext(message, 1, 2) != "*")
|
||||
if (miming && copytext(message, 1, 2) != "*")
|
||||
return
|
||||
|
||||
if (src.stat == 2)
|
||||
return src.say_dead(message)
|
||||
if (stat == 2)
|
||||
return say_dead(message)
|
||||
|
||||
if (src.muted || src.silent)
|
||||
if (muted || silent)
|
||||
return
|
||||
|
||||
// wtf?
|
||||
if (src.stat)
|
||||
if (stat)
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (src.sdisabilities & 2)
|
||||
if (sdisabilities & 2)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
// emotes
|
||||
if (copytext(message, 1, 2) == "*" && !src.stat)
|
||||
return src.emote(copytext(message, 2))
|
||||
if (copytext(message, 1, 2) == "*" && !stat)
|
||||
return emote(copytext(message, 2))
|
||||
|
||||
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
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
var/italics = 0
|
||||
var/message_range = null
|
||||
var/message_mode = null
|
||||
|
||||
if (src.brainloss >= 60 && prob(50))
|
||||
if (brainloss >= 60 && prob(50))
|
||||
if (ishuman(src))
|
||||
message_mode = "headset"
|
||||
// Special message handling
|
||||
@@ -114,7 +114,7 @@
|
||||
return
|
||||
|
||||
// :downs:
|
||||
if (src.brainloss >= 60)
|
||||
if (brainloss >= 60)
|
||||
message = dd_replacetext(message, " am ", " ")
|
||||
message = dd_replacetext(message, " is ", " ")
|
||||
message = dd_replacetext(message, " are ", " ")
|
||||
@@ -126,16 +126,16 @@
|
||||
if(prob(50))
|
||||
message = uppertext(message)
|
||||
message += "[stutter(pick("!", "!!", "!!!"))]"
|
||||
if(!src.stuttering && prob(15))
|
||||
if(!stuttering && prob(15))
|
||||
message = stutter(message)
|
||||
|
||||
if (src.stuttering)
|
||||
if (stuttering)
|
||||
message = stutter(message)
|
||||
|
||||
/* //qw do not have beesease atm.
|
||||
if(src.virus)
|
||||
if(src.virus.name=="beesease" && src.virus.stage>=2)
|
||||
if(prob(src.virus.stage*10))
|
||||
if(virus)
|
||||
if(virus.name=="beesease" && virus.stage>=2)
|
||||
if(prob(virus.stage*10))
|
||||
var/bzz = length(message)
|
||||
message = "B"
|
||||
for(var/i=0,i<bzz,i++)
|
||||
@@ -160,16 +160,16 @@
|
||||
italics = 1
|
||||
|
||||
if ("right hand")
|
||||
if (src.r_hand)
|
||||
src.r_hand.talk_into(src, message)
|
||||
if (r_hand)
|
||||
r_hand.talk_into(src, message)
|
||||
used_radios += src:r_hand
|
||||
|
||||
message_range = 1
|
||||
italics = 1
|
||||
|
||||
if ("left hand")
|
||||
if (src.l_hand)
|
||||
src.l_hand.talk_into(src, message)
|
||||
if (l_hand)
|
||||
l_hand.talk_into(src, message)
|
||||
used_radios += src:l_hand
|
||||
|
||||
message_range = 1
|
||||
@@ -185,19 +185,19 @@
|
||||
|
||||
//I see no reason to restrict such way of whispering
|
||||
if ("whisper")
|
||||
src.whisper(message)
|
||||
whisper(message)
|
||||
return
|
||||
|
||||
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
|
||||
src.robot_talk(message)
|
||||
robot_talk(message)
|
||||
return
|
||||
|
||||
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
|
||||
src.alien_talk(message)
|
||||
alien_talk(message)
|
||||
return
|
||||
|
||||
if ("department")
|
||||
@@ -219,8 +219,8 @@
|
||||
|
||||
var/list/listening
|
||||
/*
|
||||
if(istype(src.loc, /obj/item/device/aicard)) // -- TLE
|
||||
var/obj/O = src.loc
|
||||
if(istype(loc, /obj/item/device/aicard)) // -- TLE
|
||||
var/obj/O = loc
|
||||
if(istype(O.loc, /mob))
|
||||
var/mob/M = O.loc
|
||||
listening = hearers(message_range, M)
|
||||
@@ -243,7 +243,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
listening = hearers(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)
|
||||
if (!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
@@ -258,11 +258,17 @@
|
||||
if (M.client && M.client.ghost_ears)
|
||||
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)
|
||||
if (O)
|
||||
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_b = list() // didn't understand us
|
||||
|
||||
@@ -274,19 +280,19 @@
|
||||
|
||||
var/rendered = null
|
||||
if (length(heard_a))
|
||||
var/message_a = src.say_quote(message)
|
||||
var/message_a = say_quote(message)
|
||||
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
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))
|
||||
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
|
||||
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
|
||||
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)
|
||||
M.show_message(rendered, 2)
|
||||
@@ -301,18 +307,18 @@
|
||||
if (length(heard_b))
|
||||
var/message_b
|
||||
|
||||
if (src.voice_message)
|
||||
message_b = src.voice_message
|
||||
if (voice_message)
|
||||
message_b = voice_message
|
||||
else
|
||||
message_b = stars(message)
|
||||
message_b = src.say_quote(message_b)
|
||||
message_b = say_quote(message_b)
|
||||
|
||||
if (italics)
|
||||
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)
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
log_say("[src.name]/[src.key] : [message]")
|
||||
log_say("[name]/[key] : [message]")
|
||||
@@ -7,7 +7,7 @@
|
||||
real_name = name
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
src.loc = loc
|
||||
loc = loc
|
||||
|
||||
proc_holder_list = new()
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
del(src)//Delete AI.
|
||||
return
|
||||
else
|
||||
if (B.brain.brainmob.mind)
|
||||
B.brain.brainmob.mind.transfer_to(src)
|
||||
if (B.brainmob.mind)
|
||||
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>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 << "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.job = "AI"
|
||||
job = "AI"
|
||||
|
||||
spawn(0)
|
||||
ainame(src)
|
||||
@@ -54,7 +54,7 @@
|
||||
/mob/living/silicon/ai/Stat()
|
||||
..()
|
||||
statpanel("Status")
|
||||
if (src.client.statpanel == "Status")
|
||||
if (client.statpanel == "Status")
|
||||
if(emergency_shuttle.online && emergency_shuttle.location < 2)
|
||||
var/timeleft = emergency_shuttle.timeleft()
|
||||
if (timeleft)
|
||||
@@ -63,12 +63,12 @@
|
||||
if(ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (src.mind == malfai)
|
||||
if (mind == malfai)
|
||||
if (malf.apcs >= 3)
|
||||
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
|
||||
|
||||
if(!src.stat)
|
||||
stat(null, text("System integrity: [(src.health+100)/2]%"))
|
||||
if(!stat)
|
||||
stat(null, text("System integrity: [(health+100)/2]%"))
|
||||
else
|
||||
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"
|
||||
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)
|
||||
var/list/L = src.alarms[cat]
|
||||
var/list/L = alarms[cat]
|
||||
if (L.len)
|
||||
for (var/alarm in L)
|
||||
var/list/alm = L[alarm]
|
||||
@@ -109,7 +109,7 @@
|
||||
dat += "-- All Systems Nominal<BR>\n"
|
||||
dat += "<BR>\n"
|
||||
|
||||
src.viewalerts = 1
|
||||
viewalerts = 1
|
||||
src << browse(dat, "window=aialerts&can_close=0")
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_roster()
|
||||
@@ -135,15 +135,15 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
|
||||
if (!src.current)
|
||||
if (!current)
|
||||
return null
|
||||
user.reset_view(src.current)
|
||||
user.reset_view(current)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/blob_act()
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.updatehealth()
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
updatehealth()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -154,42 +154,42 @@
|
||||
if (prob(30))
|
||||
switch(pick(1,2,3)) //Add Random laws.
|
||||
if(1)
|
||||
src.cancel_camera()
|
||||
cancel_camera()
|
||||
if(2)
|
||||
src.lockdown()
|
||||
lockdown()
|
||||
if(3)
|
||||
src.ai_call_shuttle()
|
||||
ai_call_shuttle()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/ai/ex_act(severity)
|
||||
flick("flash", src.flash)
|
||||
flick("flash", flash)
|
||||
|
||||
var/b_loss = src.bruteloss
|
||||
var/f_loss = src.fireloss
|
||||
var/b_loss = bruteloss
|
||||
var/f_loss = fireloss
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
if (src.stat != 2)
|
||||
if (stat != 2)
|
||||
b_loss += 100
|
||||
f_loss += 100
|
||||
if(2.0)
|
||||
if (src.stat != 2)
|
||||
if (stat != 2)
|
||||
b_loss += 60
|
||||
f_loss += 60
|
||||
if(3.0)
|
||||
if (src.stat != 2)
|
||||
if (stat != 2)
|
||||
b_loss += 30
|
||||
src.bruteloss = b_loss
|
||||
src.fireloss = f_loss
|
||||
src.updatehealth()
|
||||
bruteloss = b_loss
|
||||
fireloss = f_loss
|
||||
updatehealth()
|
||||
|
||||
|
||||
/mob/living/silicon/ai/Topic(href, href_list)
|
||||
..()
|
||||
if (href_list["mach_close"])
|
||||
if (href_list["mach_close"] == "aialerts")
|
||||
src.viewalerts = 0
|
||||
viewalerts = 0
|
||||
var/t1 = text("window=[]", href_list["mach_close"])
|
||||
src.machine = null
|
||||
machine = null
|
||||
src << browse(null, t1)
|
||||
if (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
|
||||
var/L = text2num(href_list["lawc"])
|
||||
switch(src.lawcheck[L+1])
|
||||
if ("Yes") src.lawcheck[L+1] = "No"
|
||||
if ("No") src.lawcheck[L+1] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", src.lawcheck[L+1])
|
||||
src.checklaws()
|
||||
switch(lawcheck[L+1])
|
||||
if ("Yes") lawcheck[L+1] = "No"
|
||||
if ("No") lawcheck[L+1] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(src.ioncheck[L])
|
||||
if ("Yes") src.ioncheck[L] = "No"
|
||||
if ("No") src.ioncheck[L] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", src.lawcheck[L+1])
|
||||
src.checklaws()
|
||||
switch(ioncheck[L])
|
||||
if ("Yes") ioncheck[L] = "No"
|
||||
if ("No") ioncheck[L] = "Yes"
|
||||
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
|
||||
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
|
||||
src.statelaws()
|
||||
statelaws()
|
||||
|
||||
return
|
||||
|
||||
@@ -222,38 +222,38 @@
|
||||
for(var/mob/M in viewers(src, null))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
//Foreach goto(19)
|
||||
if (src.health > 0)
|
||||
src.bruteloss += 30
|
||||
if (health > 0)
|
||||
bruteloss += 30
|
||||
if ((O.icon_state == "flaming"))
|
||||
src.fireloss += 40
|
||||
src.updatehealth()
|
||||
fireloss += 40
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/bullet_act(flag)
|
||||
if (flag == PROJECTILE_BULLET)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 60
|
||||
src.updatehealth()
|
||||
src.weakened = 10
|
||||
if (stat != 2)
|
||||
bruteloss += 60
|
||||
updatehealth()
|
||||
weakened = 10
|
||||
else if (flag == PROJECTILE_TASER)
|
||||
if (prob(75))
|
||||
src.stunned = 15
|
||||
stunned = 15
|
||||
else
|
||||
src.weakened = 15
|
||||
weakened = 15
|
||||
else if (flag == PROJECTILE_DART)
|
||||
return
|
||||
else if(flag == PROJECTILE_LASER)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 20
|
||||
src.updatehealth()
|
||||
if (stat != 2)
|
||||
bruteloss += 20
|
||||
updatehealth()
|
||||
if (prob(25))
|
||||
src.stunned = 1
|
||||
stunned = 1
|
||||
else if(flag == PROJECTILE_PULSE)
|
||||
if (src.stat != 2)
|
||||
src.bruteloss += 40
|
||||
src.updatehealth()
|
||||
if (stat != 2)
|
||||
bruteloss += 40
|
||||
updatehealth()
|
||||
if (prob(50))
|
||||
src.stunned = min(5, src.stunned)
|
||||
stunned = min(5, stunned)
|
||||
return
|
||||
|
||||
/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."
|
||||
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."
|
||||
return
|
||||
|
||||
@@ -275,16 +275,16 @@
|
||||
else //harm
|
||||
var/damage = rand(10, 20)
|
||||
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))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
|
||||
if(prob(8))
|
||||
flick("noise", src.flash)
|
||||
src.bruteloss += damage
|
||||
src.updatehealth()
|
||||
flick("noise", flash)
|
||||
bruteloss += damage
|
||||
updatehealth()
|
||||
else
|
||||
playsound(src.loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
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)
|
||||
usr:cameraFollow = null
|
||||
if (!C)
|
||||
src.machine = null
|
||||
src.reset_view(null)
|
||||
machine = null
|
||||
reset_view(null)
|
||||
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...
|
||||
|
||||
src.machine = src
|
||||
machine = src
|
||||
src:current = C
|
||||
src.reset_view(C)
|
||||
reset_view(C)
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/ai/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
|
||||
if (stat == 2)
|
||||
return 1
|
||||
var/list/L = src.alarms[class]
|
||||
var/list/L = alarms[class]
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
var/list/alarm = L[I]
|
||||
@@ -348,11 +348,11 @@
|
||||
src << text("--- [] alarm detected in []! (No Camera)", class, A.name)
|
||||
else
|
||||
src << text("--- [] alarm detected in []! (No Camera)", class, A.name)
|
||||
if (src.viewalerts) src.ai_alerts()
|
||||
if (viewalerts) ai_alerts()
|
||||
return 1
|
||||
|
||||
/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
|
||||
for (var/I in L)
|
||||
if (I == A.name)
|
||||
@@ -365,14 +365,14 @@
|
||||
L -= I
|
||||
if (cleared)
|
||||
src << text("--- [] alarm in [] has been cleared.", class, A.name)
|
||||
if (src.viewalerts) src.ai_alerts()
|
||||
if (viewalerts) ai_alerts()
|
||||
return !cleared
|
||||
|
||||
/mob/living/silicon/ai/cancel_camera()
|
||||
set category = "AI Commands"
|
||||
set name = "Cancel Camera View"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
reset_view(null)
|
||||
machine = null
|
||||
src:cameraFollow = null
|
||||
|
||||
//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()
|
||||
set category = "AI Commands"
|
||||
set name = "Change Camera Network"
|
||||
src.reset_view(null)
|
||||
src.machine = null
|
||||
reset_view(null)
|
||||
machine = null
|
||||
src:cameraFollow = null
|
||||
var/cameralist[0]
|
||||
|
||||
@@ -397,14 +397,14 @@
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/M in malf.malf_ai)
|
||||
if (src.mind == M)
|
||||
if (mind == M)
|
||||
cameralist[C.network] = C.network
|
||||
else
|
||||
if(C.network != "CREED" && C.network != "thunder" && C.network != "RD" && C.network != "toxins" && C.network != "Prison")
|
||||
cameralist[C.network] = C.network
|
||||
|
||||
src.network = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
src << "\blue Switched to [src.network] camera network."
|
||||
network = input(usr, "Which network would you like to view?") as null|anything in cameralist
|
||||
src << "\blue Switched to [network] camera network."
|
||||
//End of code by Mord_Sith
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
set category = "Malfunction"
|
||||
set name = "Choose Module"
|
||||
|
||||
src.malf_picker.use(src)
|
||||
malf_picker.use(src)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,5 +70,5 @@
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
@@ -18,7 +18,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
else
|
||||
for(var/obj/machinery/ai_status_display/O in world) //change status
|
||||
spawn( 0 )
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return
|
||||
@@ -12,6 +12,13 @@
|
||||
var/obj/machinery/camera/closest = null
|
||||
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
|
||||
|
||||
var/dx = 0
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
@@ -7,7 +7,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.real_name == "Hiveborg")
|
||||
src.real_name += " "
|
||||
src.real_name += "-[rand(1, 999)]"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -39,5 +39,5 @@
|
||||
if (src.key)
|
||||
spawn(50)
|
||||
if(src.key && src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
return ..(gibbed)
|
||||
@@ -7,7 +7,7 @@
|
||||
src.client.eye = src.loc
|
||||
src.client.perspective = EYE_PERSPECTIVE
|
||||
if (src.stat == 2)
|
||||
src.verbs += /mob/proc/ghostize
|
||||
src.verbs += /mob/proc/ghost
|
||||
if(src.real_name == "Cyborg")
|
||||
src.real_name += " "
|
||||
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
@@ -87,7 +87,6 @@ mob/new_player
|
||||
src << browse_rsc('sos_11.png')
|
||||
src << browse_rsc('sos_12.png')
|
||||
src << browse_rsc('sos_13.png')
|
||||
|
||||
//End PDA Resource Initialisation =====================================================>
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/mob/living/carbon/human/proc/monkeyize()
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
if (W==src.w_uniform) // will be teared
|
||||
if (W==w_uniform) // will be teared
|
||||
continue
|
||||
drop_from_slot(W)
|
||||
src.update_clothing()
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
src.invisibility = 101
|
||||
for(var/t in src.organs)
|
||||
//src.organs[text("[]", t)] = null
|
||||
del(src.organs[text("[]", t)])
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( src.loc )
|
||||
update_clothing()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/t in organs)
|
||||
//organs[text("[]", t)] = null
|
||||
del(organs[text("[]", t)])
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
animation.master = src
|
||||
@@ -21,23 +21,23 @@
|
||||
sleep(48)
|
||||
//animation = null
|
||||
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.dna = src.dna
|
||||
src.dna = null
|
||||
O.dna = dna
|
||||
dna = null
|
||||
O.dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
//O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*13)]BB8"
|
||||
O.loc = src.loc
|
||||
O.virus = src.virus
|
||||
src.virus = null
|
||||
O.loc = loc
|
||||
O.virus = virus
|
||||
virus = null
|
||||
if (O.virus)
|
||||
O.virus.affected_mob = O
|
||||
if (src.client)
|
||||
src.client.mob = O
|
||||
if(src.mind)
|
||||
src.mind.transfer_to(O)
|
||||
if (client)
|
||||
client.mob = O
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
O.a_intent = "hurt"
|
||||
O << "<B>You are now a monkey.</B>"
|
||||
var/prev_body = src
|
||||
@@ -46,38 +46,45 @@
|
||||
return O
|
||||
|
||||
/mob/new_player/AIize()
|
||||
src.spawning = 1
|
||||
spawning = 1
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/AIize()
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/t in src.organs)
|
||||
del(src.organs[text("[]", t)])
|
||||
for(var/t in organs)
|
||||
del(organs[text("[]", t)])
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/AIize()
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_slot(W)
|
||||
src.update_clothing()
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
src.invisibility = 101
|
||||
update_clothing()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
return ..()
|
||||
|
||||
|
||||
/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.
|
||||
O.invisibility = 0
|
||||
O.aiRestorePowerRoutine = 0
|
||||
O.lastKnownIP = client.address
|
||||
|
||||
mind.transfer_to(O)
|
||||
O.mind.original = O
|
||||
if(mind)
|
||||
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
|
||||
for(var/obj/landmark/start/sloc in world)
|
||||
@@ -126,19 +133,6 @@
|
||||
|
||||
spawn(0)
|
||||
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>")
|
||||
|
||||
spawn(50)
|
||||
@@ -150,25 +144,25 @@
|
||||
|
||||
//human -> robot
|
||||
/mob/living/carbon/human/proc/Robotize()
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_slot(W)
|
||||
src.update_clothing()
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
src.invisibility = 101
|
||||
for(var/t in src.organs)
|
||||
del(src.organs[text("[t]")])
|
||||
if(src.client)
|
||||
//src.client.screen -= main_hud1.contents
|
||||
src.client.screen -= src.hud_used.contents
|
||||
src.client.screen -= src.hud_used.adding
|
||||
src.client.screen -= src.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 )
|
||||
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 )
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot( src.loc )
|
||||
update_clothing()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/t in organs)
|
||||
del(organs[text("[t]")])
|
||||
if(client)
|
||||
//client.screen -= main_hud1.contents
|
||||
client.screen -= hud_used.contents
|
||||
client.screen -= hud_used.adding
|
||||
client.screen -= hud_used.mon_blo
|
||||
client.screen -= list( oxygen, throw_icon, i_select, m_select, toxin, internals, fire, hands, healths, pullin, blind, flash, rest, sleep, 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( loc )
|
||||
|
||||
// cyborgs produced by Robotize get an automatic power cell
|
||||
O.cell = new(O)
|
||||
@@ -176,25 +170,25 @@
|
||||
O.cell.charge = 7500
|
||||
|
||||
|
||||
O.gender = src.gender
|
||||
O.gender = gender
|
||||
O.invisibility = 0
|
||||
O.name = "Cyborg"
|
||||
O.real_name = "Cyborg"
|
||||
O.lastKnownIP = src.client.address
|
||||
if (src.mind)
|
||||
src.mind.transfer_to(O)
|
||||
if (src.mind.assigned_role == "Cyborg")
|
||||
src.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")
|
||||
O.lastKnownIP = client.address
|
||||
if (mind)
|
||||
mind.transfer_to(O)
|
||||
if (mind.assigned_role == "Cyborg")
|
||||
mind.original = O
|
||||
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
|
||||
src.mind = new /datum/mind( )
|
||||
src.mind.key = src.key
|
||||
src.mind.current = O
|
||||
src.mind.original = O
|
||||
src.mind.transfer_to(O)
|
||||
mind = new /datum/mind( )
|
||||
mind.key = key
|
||||
mind.current = O
|
||||
mind.original = O
|
||||
mind.transfer_to(O)
|
||||
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 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."
|
||||
@@ -202,34 +196,26 @@
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
O.brain = new /obj/item/device/mmi(O)
|
||||
O.brain.name = "Man-Machine Interface: [src.name]"
|
||||
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
|
||||
|
||||
|
||||
O.mmi = new /obj/item/device/mmi(O)
|
||||
O.mmi.transfer_identity(src)//Does not transfer key/client.
|
||||
|
||||
del(src)
|
||||
return O
|
||||
|
||||
//human -> alien
|
||||
/mob/living/carbon/human/proc/Alienize()
|
||||
if (src.monkeyizing)
|
||||
if (monkeyizing)
|
||||
return
|
||||
for(var/obj/item/W in src)
|
||||
drop_from_slot(W)
|
||||
src.update_clothing()
|
||||
src.monkeyizing = 1
|
||||
src.canmove = 0
|
||||
src.icon = null
|
||||
src.invisibility = 101
|
||||
for(var/t in src.organs)
|
||||
del(src.organs[t])
|
||||
// var/atom/movable/overlay/animation = new /atom/movable/overlay( src.loc )
|
||||
update_clothing()
|
||||
monkeyizing = 1
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/t in organs)
|
||||
del(organs[t])
|
||||
// var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
// animation.icon_state = "blank"
|
||||
// animation.icon = 'mob.dmi'
|
||||
// animation.master = src
|
||||
@@ -241,14 +227,14 @@
|
||||
var/mob/O
|
||||
switch(CASTE)
|
||||
if("Hunter")
|
||||
O = new /mob/living/carbon/alien/humanoid/hunter (src.loc)
|
||||
O = new /mob/living/carbon/alien/humanoid/hunter (loc)
|
||||
if("Sentinel")
|
||||
O = new /mob/living/carbon/alien/humanoid/sentinel (src.loc)
|
||||
O = new /mob/living/carbon/alien/humanoid/sentinel (loc)
|
||||
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
|
||||
src.dna = null
|
||||
O.dna = dna
|
||||
dna = null
|
||||
O.dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
|
||||
@@ -256,12 +242,12 @@
|
||||
O.mind.current = O
|
||||
O.mind.assigned_role = "Alien"
|
||||
O.mind.special_role = CASTE
|
||||
O.mind.key = src.key
|
||||
if(src.client)
|
||||
src.client.mob = O
|
||||
O.mind.key = key
|
||||
if(client)
|
||||
client.mob = O
|
||||
|
||||
|
||||
O.loc = src.loc
|
||||
O.loc = loc
|
||||
O << "<B>You are now an alien.</B>"
|
||||
del(src)
|
||||
return
|
||||
@@ -130,7 +130,6 @@
|
||||
#define FILE_DIR "icons/turf"
|
||||
#define FILE_DIR "interface"
|
||||
#define FILE_DIR "maps"
|
||||
#define FILE_DIR "maps/backup"
|
||||
#define FILE_DIR "sound"
|
||||
#define FILE_DIR "sound/ambience"
|
||||
#define FILE_DIR "sound/announcer"
|
||||
@@ -681,6 +680,7 @@
|
||||
#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\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\MMI.dm"
|
||||
#include "code\modules\mob\living\carbon\brain\say.dm"
|
||||
|
||||
Reference in New Issue
Block a user