mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-27 02:22:26 +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:
@@ -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
|
||||
Reference in New Issue
Block a user