#Fixed Chaplain hoodie sprite.

#Respawn_character() now properly respawns aliens and monkeys if specified to do so.
#Added more options in admin quick panel (for players) to get, send, check if traitor, narrate, and subtle message mob.
#Admins can now click an X by admin name, in asay, to jump to that admin. Makes things easier.
#Moved admin transform verbs into fun tab.
#Removed boom boom shake the room since not even hosts are allowed to use it.
#Pierrot's throat now has a 35% chance of being cured by eating bananas. Up from 5.
#Fixed AI cards.
#ed209 and Beepsky now properly figure in deafness when speaking. Doesn't affect voice files.
#Fixed Syndicate PDA not triggering door.
#Aliens can no longer magically crawl to the prison station and back.
#Aliens can now quickly (5 seconds) break out of cuffs by resisting. No change to buckled.
#Facehuggers will now properly set the alien_egg_flag if the target was infected or not. Curing the alien egg should also reset the flag. I think it will be best to get rid of the flag entirely in the future.
#Added isalienadult(mob) proc to check for humanoid aliens.
#Probably fixed death squad spawning. They pick by key now, instead of mob name.
#Spawning xenos now uses the client match method so you can specify who you want to respawn if wanted.

#Ninjas now tell admins what their set mission is. If given objectives by admin, it should report them at round end for certain rounds.
#Spawning ninjas now uses the same method as respawn character (typing in key/ckey).
#Added a ninjify admnin verb. Possible to right click.
#Can now resize spiderOS window.
#Misc fixes and adjustments. Minor map change to CentCom holding facility.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1685 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-06-12 18:10:53 +00:00
parent 48ad28e20c
commit 1dfe1cda8e
36 changed files with 4303 additions and 4065 deletions
+65 -24
View File
@@ -570,7 +570,7 @@ var/showadminmessages = 1
if (href_list["adminplayeropts"])
var/mob/M = locate(href_list["adminplayeropts"])
if(!M)
usr << "You seem to be selecting a mob that doesn't exist."
usr << "You seem to be selecting a mob that doesn't exist anymore."
return
var/dat = "<html><head><title>Options for [M.key]</title></head>"
var/foo = "\[ "
@@ -581,13 +581,13 @@ var/showadminmessages = 1
foo += text("<B>Authorized</B> | ")
foo += text("<A HREF='?src=\ref[src];prom_demot=\ref[M.client]'>Promote/Demote</A> | ")
if(!istype(M, /mob/new_player))
if(!istype(M, /mob/living/carbon/monkey))
if(!ismonkey(M))
foo += text("<A HREF='?src=\ref[src];monkeyone=\ref[M]'>Monkeyize</A> | ")
else
foo += text("<B>Monkeyized</B> | ")
if(istype(M, /mob/living/silicon/ai))
if(isAI(M))
foo += text("<B>Is an AI</B> | ")
else if(istype(M, /mob/living/carbon/human))
else if(ishuman(M))
foo += text("<A HREF='?src=\ref[src];makeai=\ref[M]'>Make AI</A> | ")
foo += text("<A HREF='?src=\ref[src];tdome1=\ref[M]'>Thunderdome 1</A> | ")
foo += text("<A HREF='?src=\ref[src];tdome2=\ref[M]'>Thunderdome 2</A> | ")
@@ -595,25 +595,61 @@ var/showadminmessages = 1
foo += text("<A HREF='?src=\ref[src];tdomeobserve=\ref[M]'>Thunderdome Observer</A> | ")
foo += text("<A HREF='?src=\ref[src];sendtoprison=\ref[M]'>Prison</A> | ")
foo += text("<A HREF='?src=\ref[src];sendtomaze=\ref[M]'>Maze</A> | ")
foo += text("<A HREF='?src=\ref[src];revive=\ref[M]'>Heal/Revive</A> | ")
else
foo += text("<B>Hasn't Entered Game</B> | ")
foo += text("<A HREF='?src=\ref[src];forcespeech=\ref[M]'>Say</A> | ")
foo += text("<A href='?src=\ref[src];forcespeech=\ref[M]'>Forcesay</A> | ")
foo += text("<A href='?src=\ref[src];mute2=\ref[M]'>Mute: [(M.muted ? "Muted" : "Voiced")]</A> | ")
foo += text("<A href='?src=\ref[src];boot2=\ref[M]'>Boot</A> | ")
foo += text("<A href='?src=\ref[src];boot2=\ref[M]'>Boot</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];jumpto=\ref[M]'>Jump to</A> | ")
foo += text("<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> \]")
foo += text("<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> | ")
foo += text("<A href='?src=\ref[src];getmob=\ref[M]'>Get</A> | ")
foo += text("<A href='?src=\ref[src];sendmob=\ref[M]'>Send</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];traitor=\ref[M]'>Traitor?</A> | ")
foo += text("<A href='?src=\ref[src];narrateto=\ref[M]'>Narrate to</A> | ")
foo += text("<A href='?src=\ref[src];subtlemessage=\ref[M]'>Subtle message</A>")
foo += text("<br>")
foo += text("<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> | ")
foo += text("<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A>")
dat += text("<body>[foo]</body></html>")
usr << browse(dat, "window=adminplayeropts;size=480x100")
usr << browse(dat, "window=adminplayeropts;size=480x150")
if (href_list["jumpto"])
if(( src.level in list(6, 5, 4) ) || ((src.level in list(3, 2)) && (src.state == 2)))
if(rank in list("Badmin", "Game Admin", "Game Master"))
var/mob/M = locate(href_list["jumpto"])
usr.client.jumptomob(M)
else
alert("You are not a high enough administrator or you aren't observing!")
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (href_list["getmob"])
if(rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master"))
var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M)
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (href_list["sendmob"])
if(rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master"))
var/mob/M = locate(href_list["sendmob"])
usr.client.sendmob(M)
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (href_list["narrateto"])
if(rank in list("Game Admin", "Game Master"))
var/mob/M = locate(href_list["narrateto"])
usr.client.cmd_admin_direct_narrate(M)
else
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
if (href_list["subtlemessage"])
var/mob/M = locate(href_list["subtlemessage"])
usr.client.cmd_admin_subtle_message(M)
if (href_list["traitor"])
if(!ticker || !ticker.mode)
@@ -622,7 +658,7 @@ var/showadminmessages = 1
var/mob/M = locate(href_list["traitor"])
var/datum/game_mode/current_mode = ticker.mode
if (istype(M, /mob/living/carbon/human) && M:mind)
if (ishuman(M) && M:mind)
M:mind.edit_memory()
return
@@ -665,11 +701,17 @@ var/showadminmessages = 1
if(M.mind in current_mode:syndicates)
alert("Is a Syndicate operative!", "[M.key]")
return
if(istype(M,/mob/living/silicon/robot))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.emagged)
alert("Is emagged!\n0th law: [R.laws.zeroth]", "[R.key]")
return
if(isalien(M))
alert("Is an [M.mind ? M.mind.special_role : "Alien"]!", "[M.key]")
return
// traitor, or other modes where traitors/counteroperatives would be.
if(M.mind in current_mode.traitors)
var/datum/mind/antagonist = M.mind
@@ -683,13 +725,12 @@ var/showadminmessages = 1
return
//they're nothing so turn them into a traitor!
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
if(ishuman(M) || issilicon(M))
var/traitorize = alert("Is not a traitor, make Traitor?", "Traitor", "Yes", "Cancel")
if(traitorize == "Cancel")
return
if(traitorize == "Yes")
traitorize(M,,1)
//they're a ghost/monkey
else
alert("Cannot make this mob a traitor")
if (href_list["create_object"])
@@ -1481,21 +1522,21 @@ var/showadminmessages = 1
currentkarma = query.item[1]
dat += "<tr><td>[M.name]</td>"
if(istype(M, /mob/living/silicon/ai))
if(isAI(M))
dat += "<td>AI</td>"
if(istype(M, /mob/living/silicon/robot))
if(isrobot(M))
dat += "<td>Cyborg</td>"
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
dat += "<td>[M.real_name]</td>"
if(istype(M, /mob/living/silicon/pai))
dat += "<td>pAI</td>"
if(istype(M, /mob/new_player))
dat += "<td>New Player</td>"
if(istype(M, /mob/dead/observer))
if(isobserver(M))
dat += "<td>Ghost</td>"
if(istype(M, /mob/living/carbon/monkey))
if(ismonkey(M))
dat += "<td>Monkey</td>"
if(istype(M, /mob/living/carbon/alien))
if(isalien(M))
dat += "<td>Alien</td>"
dat += {"<td>[(M.client ? "[(M.client.goon ? "<font color=red>" : "<font>")][M.client]</font>" : "No client")]</td>
<td align=center><A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>X</A></td>
@@ -2023,11 +2064,11 @@ var/showadminmessages = 1
if("changeling")
if(M.mind in ticker.mode:changelings)
return 1
if(istype(M,/mob/living/silicon/robot))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.emagged)
return 1
if(M.mind in ticker.mode.traitors)
if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
return 1
return 0
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -24,5 +24,5 @@
if (src.holder.rank == "Admin Observer")
M << "<span class=\"gfartadmin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]:</span> <span class=\"message\">[msg]</span></span>"
else
M << "<span class=\"admin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]:</span> <span class=\"message\">[msg]</span></span>"
M << "<span class=\"admin\"><span class=\"prefix\">ADMIN:</span> <span class=\"name\">[key_name(usr, M)]</span><a href='?src=\ref[M.client.holder];jumpto=\ref[mob]'>X</a>: <span class=\"message\">[msg]</span></span>"
+36 -9
View File
@@ -138,7 +138,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
usr.show_message(t, 1)
/client/proc/cmd_admin_robotize(var/mob/M in world)
set category = "Admin"
set category = "Fun"
set name = "Make Robot"
if(!ticker)
@@ -152,22 +152,48 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
alert("Invalid mob")
/client/proc/makepAI(var/turf/T in world)
set category = "Fun"
set name = "Make pAI"
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
var/list/available = list()
for(var/mob/C in world)
if(C.key)
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
if(!choice)
return 0
if(!istype(choice, /mob/dead/observer))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
if(confirm != "Yes")
return 0
var/obj/item/device/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
pai.real_name = pai.name
pai.key = choice.key
card.pai = pai
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
if(candidate.key == choice.key)
paiController.pai_candidates.Remove(candidate)
/client/proc/cmd_admin_alienize(var/mob/M in world)
set category = "Admin"
set category = "Fun"
set name = "Make Alien"
if(!ticker)
alert("Wait until the game starts")
return
if(istype(M, /mob/living/carbon/human))
log_admin("[key_name(src)] is attempting to alienize [M.key].")
if(ishuman(M))
log_admin("[key_name(src)] has alienized [M.key].")
spawn(10)
M:Alienize()
else
alert("Invalid mob")
/client/proc/cmd_admin_monkeyize(var/mob/M in world)
set category = "Admin"
set category = "Fun"
set name = "Make Monkey"
if(!ticker)
@@ -182,7 +208,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
alert("Invalid mob")
/client/proc/cmd_admin_changelinginize(var/mob/M in world)
set category = "Admin"
set category = "Fun"
set name = "Make Changeling"
if(!ticker)
@@ -198,8 +224,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
alert("Invalid mob")
/*
/client/proc/cmd_admin_abominize(var/mob/M in world)
set category = "Admin"
set category = null
set name = "Make Abomination"
usr << "Ruby Mode disabled. Command aborted."
@@ -213,9 +240,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
spawn(10)
M.make_abomination()
*/
*/
/client/proc/make_cultist(var/mob/M in world) // -- TLE, modified by Urist
set category = "Admin"
set category = "Fun"
set name = "Make Cultist"
set desc = "Makes target a cultist"
if(!wordtravel)
+127 -100
View File
@@ -1,7 +1,7 @@
/client/proc/cmd_admin_drop_everything(mob/M as mob in world)
set category = null
set name = "Drop Everything"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
for(var/obj/item/W in M)
@@ -13,7 +13,7 @@
/client/proc/cmd_admin_prison(mob/M as mob in world)
set category = "Admin"
set name = "Prison"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if (ismob(M))
@@ -40,7 +40,7 @@
set category = "Special Verbs"
set name = "Subtle Message"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -60,7 +60,7 @@
set category = "Special Verbs"
set name = "Global Narrate"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -76,7 +76,7 @@
set category = "Special Verbs"
set name = "Direct Narrate"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
@@ -87,17 +87,17 @@
/client/proc/cmd_admin_pm(mob/M as mob in world)
set category = "Admin"
set name = "Admin PM"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if(M)
if(src.mob.muted)
if(mob.muted)
src << "You are muted have a nice day"
return
if (!( ismob(M) ))
return
var/t = input("Message:", text("Private message to [M.key]")) as text|null
if(src.holder.rank != "Game Admin" && src.holder.rank != "Game Master")
if(holder.rank != "Game Admin" && holder.rank != "Game Master")
t = strip_html(t,500)
if (!( t ))
return
@@ -120,7 +120,7 @@
/client/proc/cmd_admin_godmode(mob/M as mob in world)
set category = "Special Verbs"
set name = "Godmode"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if (M.nodamage == 1)
@@ -136,10 +136,10 @@
/client/proc/cmd_admin_mute(mob/M as mob in world)
set category = "Special Verbs"
set name = "Admin Mute"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if (M.client && M.client.holder && (M.client.holder.level >= src.holder.level))
if (M.client && M.client.holder && (M.client.holder.level >= holder.level))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
M.muted = !M.muted
@@ -153,7 +153,7 @@
/client/proc/cmd_admin_add_random_ai_law()
set category = "Fun"
set name = "Add Random AI Law"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -184,7 +184,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
for(var/mob/living/carbon/human/pos in world)
pos_crew += pos.real_name
crew = pick(pos_crew)
switch(pick(1,2,3,4,5,6,7,8,9,10,11,12))
switch(rand(1,12))
if(1)
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
@@ -272,57 +272,67 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
command_alert("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert")
world << sound('ionstorm.ogg')
/client/proc/spawn_xeno() //Stealth spawns xenos /N
/*
Stealth spawns xenos
Changed to accomodate specific spawning. It was annoying before. /N
*/
/client/proc/spawn_xeno()
set category = "Fun"
set name = "Spawn Xeno"
set desc = "Spawns a xenomorph for all those boring rounds, without having you to do so manually."
if(!src.authenticated || !src.holder)
set popup_menu = 0
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/list/xeno_list = list()
for(var/obj/landmark/X in world)
if (X.name == "xeno_spawn")
xeno_list.Add(X)
if(!xeno_list.len)
alert("There are no available spots to spawn the xeno. Aborting command.")
return
var/CASTE = alert(src, "Please choose which caste to spawn.",,"Hunter","Sentinel","Drone")
create_xeno()
return
var/obj/landmark/spawn_here = pick(xeno_list)
//I use this proc for respawn character too. /N
/proc/create_xeno(mob/dead/observer/G)
var/alien_caste = alert(src, "Please choose which caste to spawn.",,"Hunter","Sentinel","Drone")
var/mob/new_xeno
switch(CASTE)
var/obj/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
new_xeno = new /mob/living/carbon/alien/humanoid/hunter (spawn_here.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/hunter (spawn_here)
if("Sentinel")
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel (spawn_here.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel (spawn_here)
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone (spawn_here.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/drone (spawn_here)
var/list/candidates = list() // Picks a random ghost for the role. Mostly a copy of alien burst code. Doesn't spawn the one using the command.
for(var/mob/dead/observer/G in world)
if(G.client)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
candidates.Add(G)
if(candidates.len)
var/mob/dead/observer/G = pick(candidates)
message_admins("\blue [key_name_admin(usr)] has spawned [G.key] as a filthy xeno.", 1)
// Picks a random ghost for the role if none is specified. Mostly a copy of alien burst code.
var/candidates_list[] = list()
if(G)//If G exists through a passed argument.
candidates_list += G.client
else//Else we need to find them.
for(G in world)
if(G.client)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
candidates_list += G.client//We want their client, not their ghost.
if(candidates_list.len)//If there are people to spawn.
if(!G)//If G was not passed through an argument.
var/client/G_client = input("Pick the client you want to respawn as a xeno.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate.
if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise.
G = G_client.mob
new_xeno.mind = new//Mind initialize stuff.
new_xeno.mind.current = new_xeno
new_xeno.mind.assigned_role = "Alien"
new_xeno.mind.special_role = CASTE
new_xeno.mind.key = G.key
if(G.client)
G.client.mob = new_xeno
if(G)//If G exists.
message_admins("\blue [key_name_admin(usr)] has spawned [G.key] as a filthy xeno.", 1)
new_xeno.mind_initialize(G, alien_caste)
new_xeno.key = G.key
else//We won't be reporting duds.
del(new_xeno)
del(G)
else
alert("There are no available ghosts to throw into the xeno. Aborting command.")
del(new_xeno)
return
alert("There are no available ghosts to throw into the xeno. Aborting command.")
del(new_xeno)
return
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
@@ -345,17 +355,63 @@ Traitors and the like can also be revived with the previous role mostly intact.
G_found = G
break
if(!G_found)//If a ghost was found.
if(!G_found)//If a ghost was not found.
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
return
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(src)//The mob being spawned.
/*Second, we try and locate a record for the person being respawned through data_core.
//Second, we check if they are an alien or monkey.
var/adj_name = copytext(G_found.name,1,7)//What is their name?
if(G_found.mind&&G_found.mind.special_role=="Alien")//If they have a mind, are they an alien?
adj_name="alien "
if( adj_name==("alien "||"monkey"))
if(alert("This character appears to either be an an alien or monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")//If you do.
switch(adj_name)//Let's check based on adjusted name.
if("monkey")//A monkey. Monkeys don't have a mind, so we can safely spawn them here if needed.
var/mob/living/carbon/monkey/M = new(pick(latejoin))//Spawn a monkey at latejoin.
M.key = G_found.key//They are now a monkey. Nothing else needs doing.
if("alien ")//An alien. Aliens can have a mind which can be used to determine a few things.
if(G_found.mind)
var/turf/location = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)//Location where they will be spawned.
var/mob/living/carbon/alien/new_xeno//Null alien mob first.
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
if("Hunter")
new_xeno = new/mob/living/carbon/alien/humanoid/hunter(location)
if("Sentinel")
new_xeno = new/mob/living/carbon/alien/humanoid/sentinel(location)
if("Drone")
new_xeno = new/mob/living/carbon/alien/humanoid/drone(location)
if("Queen")
new_xeno = new/mob/living/carbon/alien/humanoid/queen(location)
else//If we don't know what special role they have, for whatever reason, or they're a larva.
create_xeno(G_found)
return
//Now to give them a new mind.
new_xeno.mind = new
new_xeno.mind.assigned_role = "Alien"
new_xeno.mind.special_role = G_found.mind.special_role
new_xeno.mind.key = G_found.key
new_xeno.mind.current = new_xeno
new_xeno.key = G_found.key
new_xeno << "You have been fully respawned. Enjoy the game."
message_admins("\blue [key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.", 1)
//And we're done. Announcing other stuff is handled by spawn_xeno.
else
create_xeno(G_found)//Else we default to the standard command for spawning a xenomorph.
return
del(G_found)
return
//Monkeys aren't terribly important so we won't be announcing them. The proc basically ends here.
else//Or not.
G_found.mind=null//Null their mind so we don't screw things up ahead.
G_found.real_name="[pick(pick(first_names_male,first_names_female))] [pick(last_names)]"//Give them a random real name.
/*Third, we try and locate a record for the person being respawned through data_core.
This isn't an exact science but it does the trick more often than not.*/
var/datum/data/record/record_found//Referenced to later to either randomize or not randomize the character.
if(G_found.mind)//They must have a mind to reference the record.
if(G_found.mind)//They must have a mind to reference the record. Here we also double check for aliens.
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
for(var/datum/data/record/t in data_core.locked)
if(t.fields["id"]==id)
@@ -400,7 +456,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//We will update their appearance when determining DNA.
else
new_character.gender = MALE
if(alert("Save file not detected. Record data not detected. Please specify the character's gender.",,"Male","Female")=="Female")
if(alert("Save file not detected. Record data not detected. Please specify [G_found.real_name]'s gender.",,"Male","Female")=="Female")
new_character.gender = FEMALE
var/name_safety = G_found.real_name//Default is a random name so we want to save this.
A.randomize_appearance_for(new_character)//Now we will randomize their appearance since we have no way of knowing what they look/looked like.
@@ -475,6 +531,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
new_character = new_character.AIize()
if(new_character.mind.special_role=="traitor")
call(/datum/game_mode/traitor/proc/add_law_zero)(new_character)
//Add aliens.
else
new_character.Equip_Rank(new_character.mind.assigned_role, joined_late=1)//Or we simply equip them.
@@ -498,7 +555,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_add_freeform_ai_law()
set category = "Fun"
set name = "Add Custom AI law"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
@@ -523,10 +580,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Rejuvenate"
// All admins should be authenticated, but... what if?
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if(!src.mob)
if(!mob)
return
if(!istype(M))
alert("Cannot revive a ghost")
@@ -558,7 +615,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_create_centcom_report()
set category = "Special Verbs"
set name = "Create Command Report"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
@@ -582,7 +639,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Delete"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -595,7 +652,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "List OOC"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -606,7 +663,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Explosion"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -632,7 +689,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "EM Pulse"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -653,7 +710,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Special Verbs"
set name = "Gib"
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -671,15 +728,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_gib_self()
set name = "Gibself"
set category = "Fun"
if (istype(src.mob, /mob/dead/observer)) // so they don't spam gibs everywhere
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
return
else
src.mob.gib()
mob.gib()
/*
/client/proc/cmd_manual_ban()
set name = "Manual Ban"
set category = "Special Verbs"
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
var/mob/M = null
@@ -692,7 +749,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!selection)
return
M = selection:mob
if ((M.client && M.client.holder && (M.client.holder.level >= src.holder.level)))
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!")
return
@@ -750,7 +807,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
/client/proc/cmd_admin_remove_plasma()
set category = "Debug"
set name = "Stabilize Atmos."
if(!src.authenticated || !src.holder)
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
// DEFERRED
@@ -782,13 +839,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(src.view == world.view)
src.view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
if(view == world.view)
view = input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)
else
src.view = world.view
view = world.view
/client/proc/admin_call_shuttle()
@@ -798,7 +852,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((!( ticker ) || emergency_shuttle.location))
return
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -822,7 +876,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
return
if (!src.authenticated || !src.holder)
if (!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -839,30 +893,3 @@ Traitors and the like can also be revived with the previous role mostly intact.
for(var/t in M.attack_log)
usr << "[t]"
/client/proc/makepAI(var/turf/T in world)
set category = "Admin"
set name = "Make pAI"
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
var/list/available = list()
for(var/mob/C in world)
if(C.key)
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
if(!choice)
return 0
if(!istype(choice, /mob/dead/observer))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
if(confirm != "Yes")
return 0
var/obj/item/device/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
pai.real_name = pai.name
pai.key = choice.key
card.pai = pai
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
if(candidate.key == choice.key)
paiController.pai_candidates.Remove(candidate)
+16 -12
View File
@@ -46,18 +46,19 @@ var/global/sent_strike_team = 0
var/nuke_code = "[rand(10000, 99999.0)]"
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
var/mob/dead/observer/G
var/candidates[] = list()//candidates for being a commando out of all the active ghosts in world.
var/commandos[] = list()//actual commando ghosts as picked by the user.
var/mob/dead/observer/G//Basic variable to search for later.
var/candidates_list[] = list()//candidates for being a commando out of all the active ghosts in world.
var/commandos_list[] = list()//actual commando ghosts as picked by the user.
for(G in world)
if(G.client)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing.
candidates += G
for(var/i=commandos_possible,(i>0&&candidates.len),i--)
G = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players", G) in candidates//It will auto-pick a person when there is only one candidate.
candidates -= G
commandos += G
candidates_list += G.client//Add their client to list.
for(var/i=commandos_possible,(i>0&&candidates_list.len),i--)//Decrease with every commando selected.
var/client/G_client = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates_list//It will auto-pick a person when there is only one candidate.
if(G_client)//They may have logged out when the admin was choosing people. Or were not chosen. Would run time error otherwise.
candidates_list -= G_client//Subtract from candidates.
commandos_list += G_client.mob//Add their ghost to commandos.
//Spawns commandos and equips them.
for (var/obj/landmark/L in world)
@@ -67,13 +68,13 @@ var/global/sent_strike_team = 0
var/mob/living/carbon/human/new_commando = create_death_commando(L, leader_selected)
if(commandos.len)
G = pick(commandos)
commandos -= G
if(commandos_list.len)
G = pick(commandos_list)
new_commando.mind.key = G.key//For mind stuff.
new_commando.key = G.key
new_commando.internal = new_commando.s_store
new_commando.internals.icon_state = "internal1"
commandos_list -= G
del(G)
new_commando.mind.store_memory("<B>Nuke Code:</B> \red [nuke_code].")//So they don't forget their code or mission.
@@ -124,7 +125,10 @@ var/global/sent_strike_team = 0
new_commando.mind.current = new_commando
new_commando.mind.assigned_role = "MODE"
new_commando.mind.special_role = "Death Commando"
ticker.minds += new_commando.mind
if(!(new_commando.mind in ticker.minds))
ticker.minds += new_commando.mind//Adds them to regular mind list.
if(!(new_commando.mind in ticker.mode.traitors))//If they weren't already an extra traitor.
ticker.mode.traitors += new_commando.mind//Adds them to current traitor list. Which is really the extra antagonist list.
new_commando.equip_death_commando(leader_selected)
del(spawn_location)
return new_commando
@@ -129,7 +129,7 @@ I kind of like the right click only--the window version can get a little confusi
// return
if(powerc())
var/vent_found = 0
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
@@ -137,52 +137,56 @@ I kind of like the right click only--the window version can get a little confusi
src << "\red That vent is welded."
if(vent_found)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == loc)
continue
if(temp_vent.welded)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
if(vent.welded)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
var/list/huggers = list()
for(var/obj/alien/facehugger/F in view(3, src))
if(istype(F, /obj/alien/facehugger))
huggers.Add(F)
loc = vent_found
if(vent_found.network&&vent_found.network.normal_members.len)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
if(temp_vent.welded)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
if(vent.welded)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
var/list/huggers = list()
for(var/obj/alien/facehugger/F in view(3, src))
if(istype(F, /obj/alien/facehugger))
huggers.Add(F)
loc = vent_found
for(var/obj/alien/facehugger/F in huggers)
F.loc = vent_found
var/travel_time = get_dist(loc, target_vent.loc)
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
if(!target_vent.welded)
for(var/mob/O in hearers(target_vent, null))
O.show_message("You hear something crawling trough the ventilation pipes.")
spawn(travel_time)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
for(var/obj/alien/facehugger/F in huggers)
F.loc = loc
F.loc = vent_found
var/travel_time = get_dist(loc, target_vent.loc)
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
if(!target_vent.welded)
for(var/mob/O in hearers(target_vent, null))
O.show_message("You hear something crawling trough the ventilation pipes.",2)
spawn(travel_time)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
for(var/obj/alien/facehugger/F in huggers)
F.loc = loc
else
src << "\green You need to remain still while entering a vent."
else
src << "\green You need to remain still while entering a vent."
src << "\green This vent is not connected to anything."
else
src << "\green You must be standing on or beside an open air vent to enter it."
return
@@ -27,16 +27,10 @@
src << "\green You begin to evolve!"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/queen/Q = new (loc)
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
Q.mind = new//Mind initialize stuff.
Q.mind.current = Q
Q.mind.assigned_role = "Alien"
Q.mind.special_role = "Queen"
Q.mind.key = key
if(client)
client.mob = Q
new_xeno.mind_initialize(src, "Queen")
new_xeno.key = key
del(src)
return
@@ -1,4 +1,3 @@
//This is fine right now, if we're adding organ specific damage this needs to be updated
/mob/living/carbon/alien/humanoid/New()
var/datum/reagents/R = new/datum/reagents(100)
@@ -16,6 +15,12 @@
src << "\blue Your icons have been generated!"
..()
/mob/living/carbon/alien/humanoid/proc/mind_initialize(mob/G, alien_caste)
mind = new
mind.current = src
mind.assigned_role = "Alien"
mind.special_role = alien_caste
mind.key = G.key
//This is fine, works the same as a human
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
@@ -240,11 +245,6 @@
if (wear_suit)
if (emptyHand)
wear_suit.DblClick()
return
if (( istype(W, /obj/alien/skin_suit) ))
u_equip(W)
head = W
return
return
/* if (!( istype(W, /obj/item/clothing/suit) ))
return
@@ -12,6 +12,12 @@
// spawn(1200) grow() Grow after 120 seconds -- TLE Commented out because life.dm has better version -- Urist
..()
/mob/living/carbon/alien/larva/proc/mind_initialize(mob/G, alien_caste)
mind = new
mind.current = src
mind.assigned_role = "Alien"
mind.special_role = alien_caste
mind.key = G.key
//This is fine, works the same as a human
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
+165 -170
View File
@@ -11,10 +11,10 @@
set invisibility = 0
set background = 1
if (src.monkeyizing)
if (monkeyizing)
return
if (src.stat != 2) //still breathing
if (stat != 2) //still breathing
//First, resolve location and get a breath
@@ -31,7 +31,7 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
src.blinded = null
blinded = null
//Disease Check
handle_virus_updates()
@@ -86,83 +86,78 @@
handle_mutations_and_radiation()
if(src.amount_grown == 200)
if(amount_grown == 200)
src << "\green You are growing into a beautiful alien! It is time to choose a caste."
src << "\green There are three to choose from:"
src << "\green <B>Hunters</B> are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
src << "\green <B>Sentinels</B> are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
src << "\green <B>Drones</B> are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
var/CASTE = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/H
switch(CASTE)
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
H = new /mob/living/carbon/alien/humanoid/hunter (src.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/hunter (loc)
if("Sentinel")
H = new /mob/living/carbon/alien/humanoid/sentinel (src.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel (loc)
if("Drone")
H = new /mob/living/carbon/alien/humanoid/drone (src.loc)
new_xeno = new /mob/living/carbon/alien/humanoid/drone (loc)
H.mind = new//Mind initialize stuff.
H.mind.current = src
H.mind.assigned_role = "Alien"
H.mind.special_role = CASTE
H.mind.key = src.key
if(src.client)
src.client.mob = H
new_xeno.mind_initialize(src, alien_caste)
new_xeno.key = key
del(src)
return
//grow!! but not if metroid or dead
if(!istype(src,/mob/living/carbon/alien/larva/metroid) && src.health>-100)
src.amount_grown++
if(!istype(src,/mob/living/carbon/alien/larva/metroid) && health>-100)
amount_grown++
if (src.radiation)
if (src.radiation > 100)
src.radiation = 100
src.weakened = 10
if (radiation)
if (radiation > 100)
radiation = 100
weakened = 10
src << "\red You feel weak."
emote("collapse")
if (src.radiation < 0)
src.radiation = 0
if (radiation < 0)
radiation = 0
switch(src.radiation)
switch(radiation)
if(1 to 49)
src.radiation--
radiation--
if(prob(25))
src.toxloss++
src.updatehealth()
toxloss++
updatehealth()
if(50 to 74)
src.radiation -= 2
src.toxloss++
radiation -= 2
toxloss++
if(prob(5))
src.radiation -= 5
src.weakened = 3
radiation -= 5
weakened = 3
src << "\red You feel weak."
emote("collapse")
src.updatehealth()
updatehealth()
if(75 to 100)
src.radiation -= 3
src.toxloss += 3
src.updatehealth()
radiation -= 3
toxloss += 3
updatehealth()
breathe()
if(src.reagents.has_reagent("lexorin")) return
if(reagents.has_reagent("lexorin")) return
if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
// HACK NEED CHANGING LATER
if(src.health < 0)
src.losebreath++
if(health < 0)
losebreath++
if(losebreath>0) //Suffocating so do not take a breath
src.losebreath--
losebreath--
if (prob(75)) //High chance of gasping for air
spawn emote("gasp")
if(istype(loc, /obj/))
@@ -201,17 +196,17 @@
get_breath_from_internal(volume_needed)
if(internal)
if (!contents.Find(src.internal))
if (!contents.Find(internal))
internal = null
if (!wear_mask || !(wear_mask.flags & MASKINTERNALS) )
internal = null
if(internal)
if (src.internals)
src.internals.icon_state = "internal1"
if (internals)
internals.icon_state = "internal1"
return internal.remove_air_volume(volume_needed)
else
if (src.internals)
src.internals.icon_state = "internal0"
if (internals)
internals.icon_state = "internal0"
return null
update_canmove()
@@ -219,7 +214,7 @@
else canmove = 1
handle_breath(datum/gas_mixture/breath)
if(src.nodamage)
if(nodamage)
return
if(!breath || (breath.total_moles() == 0))
@@ -246,7 +241,7 @@
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
fire_alert = max(fire_alert, 1)
@@ -274,25 +269,25 @@
if(reagents) reagents.metabolize(src)
if(src.nutrition > 500 && !(src.mutations & FAT))
if(prob(5 + round((src.nutrition - 200) / 2)))
if(nutrition > 500 && !(mutations & FAT))
if(prob(5 + round((nutrition - 200) / 2)))
src << "\red You suddenly feel blubbery!"
src.mutations |= FAT
mutations |= FAT
// update_body()
if (src.nutrition < 100 && src.mutations & FAT)
if(prob(round((50 - src.nutrition) / 100)))
if (nutrition < 100 && mutations & FAT)
if(prob(round((50 - nutrition) / 100)))
src << "\blue You feel fit again!"
src.mutations &= ~FAT
mutations &= ~FAT
// update_body()
if (src.nutrition > 0)
src.nutrition-= HUNGER_FACTOR
if (nutrition > 0)
nutrition-= HUNGER_FACTOR
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
@@ -303,7 +298,7 @@
dizziness = max(0, dizziness - 1)
jitteriness = max(0, jitteriness - 1)
src.updatehealth()
updatehealth()
return //TODO: DEFERRED
@@ -313,153 +308,153 @@
if(oxyloss > 50) paralysis = max(paralysis, 3)
if(src.sleeping)
src.paralysis = max(src.paralysis, 3)
if(sleeping)
paralysis = max(paralysis, 3)
if (prob(10) && health) spawn(0) emote("snore")
src.sleeping--
sleeping--
if(src.resting)
src.weakened = max(src.weakened, 5)
if(resting)
weakened = max(weakened, 5)
if(health < -100 || src.brain_op_stage == 4.0)
if(health < -100 || brain_op_stage == 4.0)
death()
else if(src.health < 0)
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
else if(health < 0)
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
//if(!src.rejuv) src.oxyloss++
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
//if(!rejuv) oxyloss++
if(!reagents.has_reagent("inaprovaline")) oxyloss++
if(src.stat != 2) src.stat = 1
src.paralysis = max(src.paralysis, 5)
if(stat != 2) stat = 1
paralysis = max(paralysis, 5)
if (src.stat != 2) //Alive.
if (stat != 2) //Alive.
if (src.paralysis || src.stunned || src.weakened) //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_MOBS
src.sight &= ~SEE_TURFS
src.sight &= ~SEE_OBJS
src.see_in_dark = 4
src.see_invisible = 2
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_MOBS
sight &= ~SEE_TURFS
sight &= ~SEE_OBJS
see_in_dark = 4
see_invisible = 2
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(25 to INFINITY)
src.healths.icon_state = "health0"
healths.icon_state = "health0"
if(19 to 25)
src.healths.icon_state = "health1"
healths.icon_state = "health1"
if(13 to 19)
src.healths.icon_state = "health2"
healths.icon_state = "health2"
if(7 to 13)
src.healths.icon_state = "health3"
healths.icon_state = "health3"
if(0 to 7)
src.healths.icon_state = "health4"
healths.icon_state = "health4"
else
src.healths.icon_state = "health5"
healths.icon_state = "health5"
else
src.healths.icon_state = "health6"
healths.icon_state = "health6"
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
if (src.toxin) src.toxin.icon_state = "tox[src.toxins_alert ? 1 : 0]"
if (src.oxygen) src.oxygen.icon_state = "oxy[src.oxygen_alert ? 1 : 0]"
if (src.fire) src.fire.icon_state = "fire[src.fire_alert ? 1 : 0]"
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
//blame the person who coded them. Temporary fix added.
src.client.screen -= src.hud_used.blurry
src.client.screen -= src.hud_used.druggy
src.client.screen -= src.hud_used.vimpaired
client.screen -= hud_used.blurry
client.screen -= hud_used.druggy
client.screen -= hud_used.vimpaired
if ((src.blind && src.stat != 2))
if ((src.blinded))
src.blind.layer = 18
if ((blind && stat != 2))
if ((blinded))
blind.layer = 18
else
src.blind.layer = 0
blind.layer = 0
if (src.disabilities & 1)
src.client.screen += src.hud_used.vimpaired
if (disabilities & 1)
client.screen += hud_used.vimpaired
if (src.eye_blurry)
src.client.screen += src.hud_used.blurry
if (eye_blurry)
client.screen += hud_used.blurry
if (src.druggy)
src.client.screen += src.hud_used.druggy
if (druggy)
client.screen += hud_used.druggy
if (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)
@@ -470,18 +465,18 @@
return
handle_virus_updates()
if(src.bodytemperature > 406 && src.virus)
src.virus.cure()
if(bodytemperature > 406 && virus)
virus.cure()
return
check_if_buckled()
if (src.buckled)
src.lying = (istype(src.buckled, /obj/stool/bed) ? 1 : 0)
if(src.lying)
src.drop_item()
src.density = 1
if (buckled)
lying = (istype(buckled, /obj/stool/bed) ? 1 : 0)
if(lying)
drop_item()
density = 1
else
src.density = !src.lying
density = !lying
handle_stomach()
spawn(0)
@@ -489,7 +484,7 @@
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(istype(M, /mob/living/carbon) && src.stat != 2)
if(istype(M, /mob/living/carbon) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
@@ -498,4 +493,4 @@
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
src.nutrition += 10
nutrition += 10
@@ -6,36 +6,39 @@
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
if(powerc())
var/vent_found = 0
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
else
src << "\red That vent is welded."
if(vent_found)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("<B>[] scrambles into the ventillation ducts!</B>", src)
loc = target_vent.loc
if(vent_found.network&&vent_found.network.normal_members.len)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in vent_found.network.normal_members)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
loc = target_vent.loc
else
src << "\green You need to remain still while entering a vent."
else
src << "\green You need to remain still while entering a vent."
src << "\green This vent is not connected to anything."
else
src << "\green You must be standing on or beside an air vent to enter it."
return
+34 -14
View File
@@ -42,6 +42,11 @@
return 1
return 0
/proc/isalienadult(A)
if(istype(A, /mob/living/carbon/alien/humanoid))
return 1
return 0
/proc/islarva(A)
if(istype(A, /mob/living/carbon/alien/larva))
return 1
@@ -279,9 +284,11 @@ proc/isobserver(A)
return copytext(sanitize(t),1,MAX_MESSAGE_LEN)
/proc/ninjaspeak(n)
//The difference with stutter is that this proc can stutter more than 1 letter
//The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma.
//It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N
/*
The difference with stutter is that this proc can stutter more than 1 letter
The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma.
It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N
*/
var/te = html_decode(n)
var/t = ""
n = length(n)
@@ -928,17 +935,30 @@ proc/isobserver(A)
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
usr.next_move = world.time + 100
usr.last_special = world.time + 100
usr << "\red You attempt to remove your handcuffs. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to remove the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
usr << "\blue You successfully remove your handcuffs."
usr:handcuffed:loc = usr:loc
usr:handcuffed = null
if(isalienadult(usr))//Don't want to do a lot of logic gating here.
usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 50))
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
usr << "\green You successfully break your handcuffs."
del(usr:handcuffed)
usr:handcuffed = null
else
usr << "\red You attempt to remove your handcuffs. (This will take around 2 minutes and you need to stand still)"
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] attempts to remove the handcuffs!</B>", usr), 1)
spawn(0)
if(do_after(usr, 1200))
if(!usr:handcuffed) return
for(var/mob/O in viewers(usr))
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
usr << "\blue You successfully remove your handcuffs."
usr:handcuffed:loc = usr:loc
usr:handcuffed = null
if(usr:handcuffed && (usr.last_special <= world.time) && usr:buckled)
usr.next_move = world.time + 100
+23 -32
View File
@@ -40,9 +40,8 @@
mind.transfer_to(O)
O.a_intent = "hurt"
O << "<B>You are now a monkey.</B>"
var/prev_body = src
src = null //prevent terminating proc due to folowing del()
del(prev_body)
spawn(0)//To prevent the proc from returning null.
del(src)
return O
/mob/new_player/AIize()
@@ -174,7 +173,7 @@
O.invisibility = 0
O.name = "Cyborg"
O.real_name = "Cyborg"
O.lastKnownIP = client.address
O.lastKnownIP = client.address ? client.address : null
if (mind)
mind.transfer_to(O)
if (mind.assigned_role == "Cyborg")
@@ -199,7 +198,8 @@
O.mmi = new /obj/item/device/mmi(O)
O.mmi.transfer_identity(src)//Does not transfer key/client.
del(src)
spawn(0)//To prevent the proc from returning null.
del(src)
return O
//human -> alien
@@ -215,39 +215,30 @@
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
// flick("h2alien", animation)
// sleep(48)
// del(animation)
var/CASTE = pick("Hunter","Sentinel","Drone")
var/mob/O
switch(CASTE)
var/alien_caste = pick("Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
O = new /mob/living/carbon/alien/humanoid/hunter (loc)
new_xeno = new /mob/living/carbon/alien/humanoid/hunter (loc)
if("Sentinel")
O = new /mob/living/carbon/alien/humanoid/sentinel (loc)
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel (loc)
if("Drone")
O = new /mob/living/carbon/alien/humanoid/drone (loc)
new_xeno = new /mob/living/carbon/alien/humanoid/drone (loc)
O.dna = dna
//Honestly not sure why it's giving them DNA.
/*
new_xeno.dna = dna
dna = null
O.dna.uni_identity = "00600200A00E0110148FC01300B009"
O.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
new_xeno.dna.uni_identity = "00600200A00E0110148FC01300B009"
new_xeno.dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
*/
O.mind = new//Mind initialize stuff.
O.mind.current = O
O.mind.assigned_role = "Alien"
O.mind.special_role = CASTE
O.mind.key = key
if(client)
client.mob = O
new_xeno.mind_initialize(src, alien_caste)
new_xeno.key = key
O.loc = loc
O << "<B>You are now an alien.</B>"
del(src)
new_xeno.a_intent = "hurt"
new_xeno << "<B>You are now an alien.</B>"
spawn(0)//To prevent the proc from returning null.
del(src)
return