Merge remote-tracking branch 'remotes/upstream/master' into thaw

This commit is contained in:
Xhuis
2015-06-18 23:37:06 -04:00
163 changed files with 2003 additions and 1047 deletions
-85
View File
@@ -399,91 +399,6 @@ var/global/floorIsLava = 0
usr << browse(dat, "window=admin2;size=210x180")
return
/datum/admins/proc/Secrets()
if(!check_rights(0)) return
var/dat = "<B>The first rule of adminbuse is: you don't talk about the adminbuse.</B><HR>"
dat +={"
<B>General Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsgeneral=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secretsgeneral=spawn_objects'>Admin Log</A><BR>
<A href='?src=\ref[src];secretsgeneral=show_admins'>Show Admin List</A><BR>
<BR>
"}
if(check_rights(R_ADMIN,0))
dat += {"
<B>Admin Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=clear_virus'>Cure all diseases currently in existence</A><BR>
<A href='?src=\ref[src];secretsadmin=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secretsadmin=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secretsadmin=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secretsadmin=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secretsadmin=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secretsadmin=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secretsadmin=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secretsadmin=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secretsadmin=fingerprints'>List Fingerprints</A><BR><BR>
<BR>
<B>Shuttles</B><BR>
<BR>
<A href='?src=\ref[src];secretsadmin=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsadmin=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsadmin=movelaborshuttle'>Move Labor Shuttle</A><BR>
<BR>
"}
if(check_rights(R_FUN,0))
dat += {"
<B>Fun Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secretsfun=tdomereset'>Reset Thunderdome to default state</A><BR>
<A href='?src=\ref[src];secretsfun=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secretsfun=allspecies'>Change the species of all humans</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secretsfun=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secretsfun=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
<A href='?src=\ref[src];secretsfun=traitor_all'>Everyone is the traitor</A><BR>
<A href='?src=\ref[src];secretsfun=guns'>Summon Guns</A><BR>
<A href='?src=\ref[src];secretsfun=magic'>Summon Magic</A><BR>
<A href='?src=\ref[src];secretsfun=events'>Summon Events (Toggle)</A><BR>
<A href='?src=\ref[src];secretsfun=onlyone'>There can only be one!</A><BR>
<A href='?src=\ref[src];secretsfun=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
<BR>
"}
/* DEATH SQUADS
<A href='?src=\ref[src];secretsfun=striketeam'>Send in a strike team</A><BR>
*/
if(check_rights(R_SERVER,0))
dat += "<A href='?src=\ref[src];secretsfun=togglebombcap'>Toggle bomb cap</A><BR>"
dat += "<BR>"
if(check_rights(R_DEBUG,0))
dat += {"
<B>Security Level Elevated</B><BR>
<BR>
<A href='?src=\ref[src];secretscoder=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
<A href='?src=\ref[src];secretscoder=infinite_sec'>Remove cap on security officers</A><BR>
<BR>
"}
usr << browse(dat, "window=secrets")
return
/////////////////////////////////////////////////////////////////////////////////////////////////admins2.dm merge
//i.e. buttons/verbs
+612
View File
@@ -0,0 +1,612 @@
/datum/admins/proc/Secrets()
if(!check_rights(0)) return
var/dat = "<B>The first rule of adminbuse is: you don't talk about the adminbuse.</B><HR>"
dat +={"
<B>General Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secrets=list_job_debug'>Show Job Debug</A><BR>
<A href='?src=\ref[src];secrets=admin_log'>Admin Log</A><BR>
<A href='?src=\ref[src];secrets=show_admins'>Show Admin List</A><BR>
<BR>
"}
if(check_rights(R_ADMIN,0))
dat += {"
<B>Admin Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secrets=clear_virus'>Cure all diseases currently in existence</A><BR>
<A href='?src=\ref[src];secrets=list_bombers'>Bombing List</A><BR>
<A href='?src=\ref[src];secrets=check_antagonist'>Show current traitors and objectives</A><BR>
<A href='?src=\ref[src];secrets=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
<A href='?src=\ref[src];secrets=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
<A href='?src=\ref[src];secrets=showailaws'>Show AI Laws</A><BR>
<A href='?src=\ref[src];secrets=showgm'>Show Game Mode</A><BR>
<A href='?src=\ref[src];secrets=manifest'>Show Crew Manifest</A><BR>
<A href='?src=\ref[src];secrets=DNA'>List DNA (Blood)</A><BR>
<A href='?src=\ref[src];secrets=fingerprints'>List Fingerprints</A><BR><BR>
<A href='?src=\ref[src];secrets=tdomereset'>Reset Thunderdome to default state</A><BR>
<BR>
<B>Shuttles</B><BR>
<BR>
<A href='?src=\ref[src];secrets=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secrets=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secrets=movelaborshuttle'>Move Labor Shuttle</A><BR>
<BR>
"}
if(check_rights(R_FUN,0))
dat += {"
<B>Fun Secrets</B><BR>
<BR>
<A href='?src=\ref[src];secrets=virus'>Trigger a Virus Outbreak</A><BR>
<A href='?src=\ref[src];secrets=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secrets=allspecies'>Change the species of all humans</A><BR>
<A href='?src=\ref[src];secrets=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secrets=unpower'>Make all areas unpowered</A><BR>
<A href='?src=\ref[src];secrets=quickpower'>Power all SMES</A><BR>
<A href='?src=\ref[src];secrets=tripleAI'>Triple AI mode (needs to be used in the lobby)</A><BR>
<A href='?src=\ref[src];secrets=traitor_all'>Everyone is the traitor</A><BR>
<A href='?src=\ref[src];secrets=guns'>Summon Guns</A><BR>
<A href='?src=\ref[src];secrets=magic'>Summon Magic</A><BR>
<A href='?src=\ref[src];secrets=events'>Summon Events (Toggle)</A><BR>
<A href='?src=\ref[src];secrets=onlyone'>There can only be one!</A><BR>
<A href='?src=\ref[src];secrets=retardify'>Make all players retarded</A><BR>
<A href='?src=\ref[src];secrets=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secrets=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secrets=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secrets=floorlava'>The floor is lava! (DANGEROUS: extremely lame)</A><BR>
<BR>
<A href='?src=\ref[src];secrets=changebombcap'>Change bomb cap</A><BR>
"}
dat += "<BR>"
if(check_rights(R_DEBUG,0))
dat += {"
<B>Security Level Elevated</B><BR>
<BR>
<A href='?src=\ref[src];secrets=maint_access_engiebrig'>Change all maintenance doors to engie/brig access only</A><BR>
<A href='?src=\ref[src];secrets=maint_access_brig'>Change all maintenance doors to brig access only</A><BR>
<A href='?src=\ref[src];secrets=infinite_sec'>Remove cap on security officers</A><BR>
<BR>
"}
usr << browse(dat, "window=secrets")
return
/datum/admins/proc/Secrets_topic(var/item,var/href_list)
var/datum/round_event/E
var/ok = 0
switch(item)
if("admin_log")
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
dat += "<li>[l]</li>"
if(!admin_log.len)
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
if("list_job_debug")
var/dat = "<B>Job Debug info.</B><HR>"
if(SSjob)
for(var/line in SSjob.job_debug)
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
for(var/datum/job/job in SSjob.occupations)
if(!job) continue
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("show_admins")
var/dat = "<B>Current admins:</B><HR>"
if(admin_datums)
for(var/ckey in admin_datums)
var/datum/admins/D = admin_datums[ckey]
dat += "[ckey] - [D.rank.name]<br>"
usr << browse(dat, "window=showadmins;size=600x500")
if("tdomereset")
if(!check_rights(R_ADMIN))
return
var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
if(delete_mobs == "Cancel")
return
log_admin("[key_name(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].</span>")
var/area/thunderdome = locate(/area/tdome/arena)
if(delete_mobs == "Yes")
for(var/mob/living/mob in thunderdome)
qdel(mob) //Clear mobs
for(var/obj/obj in thunderdome)
if(!istype(obj,/obj/machinery/camera))
qdel(obj) //Clear objects
var/area/template = locate(/area/tdome/arena_source)
template.copy_contents_to(thunderdome)
if("clear_virus")
var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
if(choice == "Yes")
message_admins("[key_name_admin(usr)] has cured all diseases.")
for(var/datum/disease/D in SSdisease.processing)
D.cure(D)
if("list_bombers")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Bombing List<HR>"
for(var/l in bombers)
dat += text("[l]<BR>")
usr << browse(dat, "window=bombers")
if("list_signalers")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
for(var/sig in lastsignalers)
dat += "[sig]<BR>"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
for(var/sig in lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("check_antagonist")
if(!check_rights(R_ADMIN))
return
check_antagonists()
if("moveminingshuttle")
if(!check_rights(R_ADMIN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
if(!SSshuttle.toggleShuttle("mining","mining_home","mining_away"))
message_admins("[key_name_admin(usr)] moved mining shuttle")
log_admin("[key_name(usr)] moved the mining shuttle")
if("movelaborshuttle")
if(!check_rights(R_ADMIN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
message_admins("[key_name_admin(usr)] moved labor shuttle")
log_admin("[key_name(usr)] moved the labor shuttle")
if("moveferry")
if(!check_rights(R_ADMIN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShF")
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
if("kick_all_from_lobby")
if(!check_rights(R_ADMIN))
return
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
var/afkonly = text2num(href_list["afkonly"])
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
usr << "Kick clients from lobby aborted"
return
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>The admin [usr.ckey] issued a 'kick all clients from lobby' command.</span>", afkonly)
var/strkicked = ""
for(var/name in listkicked)
strkicked += "[name], "
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running"
if("showailaws")
if(!check_rights(R_ADMIN))
return
output_ai_laws()
if("showgm")
if(!check_rights(R_ADMIN))
return
if(!ticker)
alert("The game hasn't started yet!")
else if (ticker.mode)
alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if("manifest")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/datum/data/record/t in data_core.general)
dat += "<tr><td>[t.fields["name"]]</td><td>[t.fields["rank"]]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
if("DNA")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.dna && H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.blood_type]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=DNA;size=440x410")
if("fingerprints")
if(!check_rights(R_ADMIN))
return
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
if(H.dna && H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
else if(H.dna && !H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>H.dna.uni_identity = null</td></tr>"
else if(!H.dna)
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
dat += "</table>"
usr << browse(dat, "window=fingerprints;size=440x410")
if("monkey")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.monkeyize()
ok = 1
if("allspecies")
if(!check_rights(R_FUN))
return
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
if(result)
log_admin("[key_name(usr)] turned all humans into [result]", 1)
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
var/newtype = species_list[result]
for(var/mob/living/carbon/human/H in mob_list)
hardset_dna(H, null, null, null, null, newtype)
H.regenerate_icons()
if("corgi")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.corgize()
ok = 1
if("tripleAI")
if(!check_rights(R_FUN))
return
usr.client.triple_ai()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TriAI")
if("power")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","P")
log_admin("[key_name(usr)] made all areas powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas powered</span>")
power_restore()
if("unpower")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","UP")
log_admin("[key_name(usr)] made all areas unpowered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas unpowered</span>")
power_failure()
if("quickpower")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","QP")
log_admin("[key_name(usr)] made all SMESs powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all SMESs powered</span>")
power_restore_quick()
if("traitor_all")
if(!check_rights(R_FUN))
return
if(!ticker)
alert("The game hasn't started yet!")
return
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
if(!objective)
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TA([objective])")
for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !H.client || !H.mind) continue
if(is_special_character(H)) continue
//traitorize(H, objective, 0)
ticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
H.mind.objectives += new_objective
ticker.mode.greet_traitor(H.mind)
//ticker.mode.forge_traitor_objectives(H.mind)
ticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in player_list)
if(A.stat == 2 || !A.client || !A.mind) continue
if(ispAI(A)) continue
else if(is_special_character(A)) continue
ticker.mode.traitors += A.mind
A.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = A
new_objective.explanation_text = objective
A.mind.objectives += new_objective
ticker.mode.greet_traitor(A.mind)
ticker.mode.finalize_traitor(A.mind)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]</span>")
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
if("changebombcap")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
if (newBombCap < 4)
return
if (newBombCap > 128)
newBombCap = 128
MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
MAX_EX_HEAVY_RANGE = round(newBombCap/2)
MAX_EX_LIGHT_RANGE = newBombCap
//I don't know why these are their own variables, but fuck it, they are.
MAX_EX_FLASH_RANGE = newBombCap
MAX_EX_FLAME_RANGE = newBombCap
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</span>")
log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
if("lightsout")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LO")
message_admins("[key_name_admin(usr)] has broke a lot of lights")
E = new /datum/round_event/electrical_storm{lightsoutAmount = 2}()
if("blackout")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BO")
message_admins("[key_name_admin(usr)] broke all lights")
for(var/obj/machinery/light/L in world)
L.broken()
if("whiteout")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
message_admins("[key_name_admin(usr)] fixed all lights")
for(var/obj/machinery/light/L in world)
L.fix()
if("floorlava")
if(!check_rights(R_FUN))
return
if(floorIsLava)
usr << "The floor is lava already."
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LF")
//Options
var/length = input(usr, "How long will the lava last? (in seconds)", "Length", 180) as num
length = min(abs(length), 1200)
var/damage = input(usr, "How deadly will the lava be?", "Damage", 2) as num
damage = min(abs(damage), 100)
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "YES!", "Nah")
if(sure == "Nah")
return
floorIsLava = 1
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.")
for(var/turf/simulated/floor/F in world)
if(F.z == ZLEVEL_STATION)
F.name = "lava"
F.desc = "The floor is LAVA!"
F.overlays += "lava"
F.lava = 1
spawn(0)
for(var/i = i, i < length, i++) // 180 = 3 minutes
if(damage)
for(var/mob/living/carbon/L in living_mob_list)
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!
var/turf/simulated/floor/F = L.loc
if(F.lava)
var/safe = 0
for(var/obj/structure/O in F.contents)
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
safe = 1
break
if(!safe)
L.adjustFireLoss(damage)
sleep(10)
for(var/turf/simulated/floor/F in world) // Reset everything.
if(F.z == ZLEVEL_STATION)
F.name = initial(F.name)
F.desc = initial(F.desc)
F.overlays.Cut()
F.lava = 0
F.update_icon()
floorIsLava = 0
return
if("virus")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","V")
switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
if("Make Your Own")
AdminCreateVirus(usr.client)
if("Random")
E = new /datum/round_event/disease_outbreak()
if("Choose")
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in typesof(/datum/disease)
E = new /datum/round_event/disease_outbreak{}()
var/datum/round_event/disease_outbreak/DO = E
DO.virus_type = virus
if("retardify")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in player_list)
H << "<span class='boldannounce'>You suddenly feel stupid.</span>"
H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded")
if("eagles")//SCRAW
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in world)
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
priority_announce("Centcom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/AI/commandreport.ogg')
if("guns")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SG")
var/survivor_probability = 0
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
survivor_probability = 100
rightandwrong(0, usr, survivor_probability)
if("magic")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SM")
var/survivor_probability = 0
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
survivor_probability = 100
rightandwrong(1, usr, survivor_probability)
if("events")
if(!check_rights(R_FUN))
return
if(!SSevent.wizardmode)
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
else
switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
if("Intensify Summon Events")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
if("Turn Off Summon Events")
SSevent.toggleWizardmode()
SSevent.resetFrequency()
if("dorf")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
for(var/mob/living/carbon/human/B in mob_list)
B.facial_hair_style = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
if("onlyone")
if(!check_rights(R_FUN))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","OO")
usr.client.only_one()
// message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
if("maint_access_brig")
if(!check_rights(R_DEBUG))
return
for(var/obj/machinery/door/airlock/maintenance/M in world)
M.check_access()
if (access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
if(!check_rights(R_DEBUG))
return
for(var/obj/machinery/door/airlock/maintenance/M in world)
M.check_access()
if (access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
if("infinite_sec")
if(!check_rights(R_DEBUG))
return
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
if(E)
E.processing = 0
if(E.announceWhen>0)
if(alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No") == "No")
E.announceWhen = -1
E.processing = 1
if (usr)
log_admin("[key_name(usr)] used secret [item]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
+2 -459
View File
@@ -1812,465 +1812,8 @@
break
return
else if(href_list["secretsfun"])
if(!check_rights(R_FUN)) return
var/datum/round_event/E
var/ok = 0
switch(href_list["secretsfun"])
if("tdomereset")
var/delete_mobs = alert("Clear all mobs?","Confirm","Yes","No","Cancel")
if(delete_mobs == "Cancel")
return
log_admin("[key_name(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] reset the thunderdome to default with delete_mobs==[delete_mobs].</span>")
var/area/thunderdome = locate(/area/tdome/arena)
if(delete_mobs == "Yes")
for(var/mob/living/mob in thunderdome)
qdel(mob) //Clear mobs
for(var/obj/obj in thunderdome)
if(!istype(obj,/obj/machinery/camera))
qdel(obj) //Clear objects
var/area/template = locate(/area/tdome/arena_source)
template.copy_contents_to(thunderdome)
if("monkey")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.monkeyize()
ok = 1
if("allspecies")
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
if(result)
log_admin("[key_name(usr)] turned all humans into [result]", 1)
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
var/newtype = species_list[result]
for(var/mob/living/carbon/human/H in mob_list)
hardset_dna(H, null, null, null, null, newtype)
H.regenerate_icons()
if("corgi")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","M")
for(var/mob/living/carbon/human/H in mob_list)
spawn(0)
H.corgize()
ok = 1
/* DEATH SQUADS
if("striketeam")
if(usr.client.strike_team())
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","Strike")
*/
if("tripleAI")
usr.client.triple_ai()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TriAI")
if("power")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","P")
log_admin("[key_name(usr)] made all areas powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas powered</span>")
power_restore()
if("unpower")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","UP")
log_admin("[key_name(usr)] made all areas unpowered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas unpowered</span>")
power_failure()
if("quickpower")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","QP")
log_admin("[key_name(usr)] made all SMESs powered", 1)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all SMESs powered</span>")
power_restore_quick()
if("traitor_all")
if(!ticker)
alert("The game hasn't started yet!")
return
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
if(!objective)
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","TA([objective])")
for(var/mob/living/carbon/human/H in player_list)
if(H.stat == 2 || !H.client || !H.mind) continue
if(is_special_character(H)) continue
//traitorize(H, objective, 0)
ticker.mode.traitors += H.mind
H.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = H
new_objective.explanation_text = objective
H.mind.objectives += new_objective
ticker.mode.greet_traitor(H.mind)
//ticker.mode.forge_traitor_objectives(H.mind)
ticker.mode.finalize_traitor(H.mind)
for(var/mob/living/silicon/A in player_list)
if(A.stat == 2 || !A.client || !A.mind) continue
if(ispAI(A)) continue
else if(is_special_character(A)) continue
ticker.mode.traitors += A.mind
A.mind.special_role = "traitor"
var/datum/objective/new_objective = new
new_objective.owner = A
new_objective.explanation_text = objective
A.mind.objectives += new_objective
ticker.mode.greet_traitor(A.mind)
ticker.mode.finalize_traitor(A.mind)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]</span>")
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")
switch(MAX_EX_LIGHT_RANGE)
if(14)
MAX_EX_LIGHT_RANGE = 16
MAX_EX_HEAVY_RANGE = 8
MAX_EX_DEVESTATION_RANGE = 4
if(16)
MAX_EX_LIGHT_RANGE = 20
MAX_EX_HEAVY_RANGE = 10
MAX_EX_DEVESTATION_RANGE = 5
if(20)
MAX_EX_LIGHT_RANGE = 28
MAX_EX_HEAVY_RANGE = 14
MAX_EX_DEVESTATION_RANGE = 7
if(28)
MAX_EX_LIGHT_RANGE = 56
MAX_EX_HEAVY_RANGE = 28
MAX_EX_DEVESTATION_RANGE = 14
if(56)
MAX_EX_LIGHT_RANGE = 128
MAX_EX_HEAVY_RANGE = 64
MAX_EX_DEVESTATION_RANGE = 32
if(128)
MAX_EX_LIGHT_RANGE = 14
MAX_EX_HEAVY_RANGE = 7
MAX_EX_DEVESTATION_RANGE = 3
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</span>")
log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
if("lightsout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LO")
message_admins("[key_name_admin(usr)] has broke a lot of lights")
E = new /datum/round_event/electrical_storm{lightsoutAmount = 2}()
if("blackout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BO")
message_admins("[key_name_admin(usr)] broke all lights")
for(var/obj/machinery/light/L in world)
L.broken()
if("whiteout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
message_admins("[key_name_admin(usr)] fixed all lights")
for(var/obj/machinery/light/L in world)
L.fix()
if("floorlava")
if(floorIsLava)
usr << "The floor is lava already."
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LF")
//Options
var/length = input(usr, "How long will the lava last? (in seconds)", "Length", 180) as num
length = min(abs(length), 1200)
var/damage = input(usr, "How deadly will the lava be?", "Damage", 2) as num
damage = min(abs(damage), 100)
var/sure = alert(usr, "Are you sure you want to do this?", "Confirmation", "YES!", "Nah")
if(sure == "Nah")
return
floorIsLava = 1
message_admins("[key_name_admin(usr)] made the floor LAVA! It'll last [length] seconds and it will deal [damage] damage to everyone.")
for(var/turf/simulated/floor/F in world)
if(F.z == ZLEVEL_STATION)
F.name = "lava"
F.desc = "The floor is LAVA!"
F.overlays += "lava"
F.lava = 1
spawn(0)
for(var/i = i, i < length, i++) // 180 = 3 minutes
if(damage)
for(var/mob/living/carbon/L in living_mob_list)
if(istype(L.loc, /turf/simulated/floor)) // Are they on LAVA?!
var/turf/simulated/floor/F = L.loc
if(F.lava)
var/safe = 0
for(var/obj/structure/O in F.contents)
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
safe = 1
break
if(!safe)
L.adjustFireLoss(damage)
sleep(10)
for(var/turf/simulated/floor/F in world) // Reset everything.
if(F.z == ZLEVEL_STATION)
F.name = initial(F.name)
F.desc = initial(F.desc)
F.overlays.Cut()
F.lava = 0
F.update_icon()
floorIsLava = 0
return
if("virus")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","V")
switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
if("Make Your Own")
AdminCreateVirus(usr.client)
if("Random")
E = new /datum/round_event/disease_outbreak()
if("Choose")
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in typesof(/datum/disease)
E = new /datum/round_event/disease_outbreak{}()
var/datum/round_event/disease_outbreak/DO = E
DO.virus_type = virus
if("retardify")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in player_list)
H << "<span class='boldannounce'>You suddenly feel stupid.</span>"
H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded")
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
for(var/obj/machinery/door/airlock/W in world)
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
priority_announce("Centcom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/AI/commandreport.ogg')
if("guns")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SG")
var/survivor_probability = 0
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
survivor_probability = 100
rightandwrong(0, usr, survivor_probability)
if("magic")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SM")
var/survivor_probability = 0
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
if("Some Antags")
survivor_probability = 25
if("All Antags!")
survivor_probability = 100
rightandwrong(1, usr, survivor_probability)
if("events")
if(!SSevent.wizardmode)
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
else
switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
if("Intensify Summon Events")
summonevents()
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SE")
if("Turn Off Summon Events")
SSevent.toggleWizardmode()
SSevent.resetFrequency()
if("dorf")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
for(var/mob/living/carbon/human/B in mob_list)
B.facial_hair_style = "Dward Beard"
B.update_hair()
message_admins("[key_name_admin(usr)] activated dorf mode")
if("onlyone")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","OO")
usr.client.only_one()
// message_admins("[key_name_admin(usr)] has triggered a battle to the death (only one)")
if(E)
E.processing = 0
if(E.announceWhen>0)
if(alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No") == "No")
E.announceWhen = -1
E.processing = 1
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
else if(href_list["secretsadmin"])
if(!check_rights(R_ADMIN)) return
var/ok = 0
switch(href_list["secretsadmin"])
if("clear_virus")
var/choice = input("Are you sure you want to cure all disease?") in list("Yes", "Cancel")
if(choice == "Yes")
message_admins("[key_name_admin(usr)] has cured all diseases.")
for(var/datum/disease/D in SSdisease.processing)
D.cure(D)
if("list_bombers")
var/dat = "<B>Bombing List<HR>"
for(var/l in bombers)
dat += text("[l]<BR>")
usr << browse(dat, "window=bombers")
if("list_signalers")
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
for(var/sig in lastsignalers)
dat += "[sig]<BR>"
usr << browse(dat, "window=lastsignalers;size=800x500")
if("list_lawchanges")
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
for(var/sig in lawchanges)
dat += "[sig]<BR>"
usr << browse(dat, "window=lawchanges;size=800x500")
if("check_antagonist")
check_antagonists()
if("moveminingshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
if(!SSshuttle.toggleShuttle("mining","mining_home","mining_away"))
message_admins("[key_name_admin(usr)] moved mining shuttle")
log_admin("[key_name(usr)] moved the mining shuttle")
if("movelaborshuttle")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShL")
if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
message_admins("[key_name_admin(usr)] moved labor shuttle")
log_admin("[key_name(usr)] moved the labor shuttle")
if("moveferry")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShF")
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
if("kick_all_from_lobby")
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
var/afkonly = text2num(href_list["afkonly"])
if(alert("Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message","Yes","Cancel") != "Yes")
usr << "Kick clients from lobby aborted"
return
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>The admin [usr.ckey] issued a 'kick all clients from lobby' command.</span>", afkonly)
var/strkicked = ""
for(var/name in listkicked)
strkicked += "[name], "
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running"
if("showailaws")
output_ai_laws()
if("showgm")
if(!ticker)
alert("The game hasn't started yet!")
else if (ticker.mode)
alert("The game mode is [ticker.mode.name]")
else alert("For some reason there's a ticker, but not a game mode")
if("manifest")
var/dat = "<B>Showing Crew Manifest.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
for(var/datum/data/record/t in data_core.general)
dat += "<tr><td>[t.fields["name"]]</td><td>[t.fields["rank"]]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=manifest;size=440x410")
if("DNA")
var/dat = "<B>Showing DNA from blood.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.dna && H.ckey)
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.blood_type]</td></tr>"
dat += "</table>"
usr << browse(dat, "window=DNA;size=440x410")
if("fingerprints")
var/dat = "<B>Showing Fingerprints.</B><HR>"
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
for(var/mob/living/carbon/human/H in mob_list)
if(H.ckey)
if(H.dna && H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
else if(H.dna && !H.dna.uni_identity)
dat += "<tr><td>[H]</td><td>H.dna.uni_identity = null</td></tr>"
else if(!H.dna)
dat += "<tr><td>[H]</td><td>H.dna = null</td></tr>"
dat += "</table>"
usr << browse(dat, "window=fingerprints;size=440x410")
else
if (usr)
log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
else if(href_list["secretsgeneral"])
switch(href_list["secretsgeneral"])
if("spawn_objects")
var/dat = "<B>Admin Log<HR></B>"
for(var/l in admin_log)
dat += "<li>[l]</li>"
if(!admin_log.len)
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
if("list_job_debug")
var/dat = "<B>Job Debug info.</B><HR>"
if(SSjob)
for(var/line in SSjob.job_debug)
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
for(var/datum/job/job in SSjob.occupations)
if(!job) continue
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
usr << browse(dat, "window=jobdebug;size=600x500")
if("show_admins")
var/dat = "<B>Current admins:</B><HR>"
if(admin_datums)
for(var/ckey in admin_datums)
var/datum/admins/D = admin_datums[ckey]
dat += "[ckey] - [D.rank.name]<br>"
usr << browse(dat, "window=showadmins;size=600x500")
else if(href_list["secretscoder"])
if(!check_rights(R_DEBUG)) return
switch(href_list["secretscoder"])
if("maint_access_brig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
M.check_access()
if (access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
for(var/obj/machinery/door/airlock/maintenance/M in world)
M.check_access()
if (access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
if("infinite_sec")
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
J.total_positions = -1
J.spawn_positions = -1
message_admins("[key_name_admin(usr)] has removed the cap on security officers.")
else if(href_list["secrets"])
Secrets_topic(href_list["secrets"],href_list)
else if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here
src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster.
+2 -1
View File
@@ -89,10 +89,11 @@
var/mob/M = user
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
if(!M.drop_item()) //Remove the assembly from your hands
return
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
+2 -1
View File
@@ -234,7 +234,8 @@ BLIND // can't see anything
return 0
else
if(user)
user.drop_item()
if(!user.drop_item())
return
hastie = I
I.loc = src
if(user && notifyAttach)
+4 -2
View File
@@ -196,7 +196,8 @@
var/obj/item/device/flashlight/seclite/S = A
if(can_flashlight)
if(!F)
user.drop_item()
if(!user.unEquip(A))
return
user << "<span class='notice'>You click [S] into place on [src].</span>"
if(S.on)
SetLuminosity(0)
@@ -228,7 +229,8 @@
if(helmetCam)
user << "<span class='notice'>[src] already has a mounted camera.</span>"
return
user.drop_item()
if(!user.unEquip(A))
return
helmetCam = new /obj/machinery/camera/portable(src)
helmetCam.assembly = A
A.loc = helmetCam
+3 -2
View File
@@ -10,9 +10,10 @@
var/all_the_same = 0
var/all_species = list()
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
for(var/speciestype in typesof(/datum/species) - /datum/species)
var/datum/species/S = new speciestype()
if(!S.dangerous_existence)
all_species += S
all_species += speciestype
var/new_species = pick(all_species)
+575 -170
View File
@@ -22,184 +22,346 @@ Gunshots/explosions/opening doors/less rare audio (done)
/mob/living/carbon/proc/handle_hallucinations()
if(handling_hal)
return
//Least obvious
var/list/minor = list("sounds"=20,"bolts_minor"=10,"whispers"=15,"message"=5)
//Something's wrong here
var/list/medium = list("hudscrew"=15,"items"=15,"dangerflash"=15,"bolts"=10,"flood"=10,"husks"=10,"battle"=10)
//AAAAH
var/list/major = list("fake"=10,"death"=5,"xeno"=10,"singulo"=10,"delusion"=10)
var/grade = 0
var/current = list()
var/trip_length = 0
handling_hal = 1
while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
var/halpick = rand(1,100)
switch(halpick)
if(0 to 15)
//Screwy HUD
//src << "Screwy HUD"
hal_screwyhud = pick(1,2,3,3,4,4)
spawn(rand(100,250))
hal_screwyhud = 0
if(16 to 25)
//Strange items
//src << "Traitor Items"
if(!halitem)
halitem = new
var/list/slots_free = list(ui_lhand,ui_rhand)
if(l_hand) slots_free -= ui_lhand
if(r_hand) slots_free -= ui_rhand
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(slots_free.len)
halitem.screen_loc = pick(slots_free)
halitem.layer = 50
switch(rand(1,6))
if(1) //revolver
halitem.icon = 'icons/obj/guns/projectile.dmi'
halitem.icon_state = "revolver"
halitem.name = "Revolver"
if(2) //c4
halitem.icon = 'icons/obj/assemblies.dmi'
halitem.icon_state = "plastic-explosive0"
halitem.name = "Mysterious Package"
if(prob(25))
halitem.icon_state = "c4small_1"
if(3) //sword
halitem.icon = 'icons/obj/weapons.dmi'
halitem.icon_state = "sword1"
halitem.name = "Sword"
if(4) //stun baton
halitem.icon = 'icons/obj/weapons.dmi'
halitem.icon_state = "stunbaton"
halitem.name = "Stun Baton"
if(5) //emag
halitem.icon = 'icons/obj/card.dmi'
halitem.icon_state = "emag"
halitem.name = "Cryptographic Sequencer"
if(6) //flashbang
halitem.icon = 'icons/obj/grenade.dmi'
halitem.icon_state = "flashbang1"
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
qdel(halitem)
if(26 to 40)
//Flashes of danger
//src << "Danger Flash"
if(!halimage)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
possible_points += F
if(possible_points.len)
var/turf/simulated/floor/target = pick(possible_points)
trip_length += 1
if(prob(min(20,trip_length*2)))
grade = min(3,grade+1)
if(prob(20))
continue
current = list()
for(var/a in minor)
current[a] = minor[a] * (grade==0?2:1)
for(var/b in medium)
current[b] = medium[b] * (grade==1?2:1)
for(var/c in major)
current[c] = major[c] * (grade==2?2:1)
switch(rand(1,3))
if(1)
//src << "Space"
halimage = image('icons/turf/space.dmi',target,"[rand(1,25)]",TURF_LAYER)
if(2)
//src << "Fire"
halimage = image('icons/effects/fire.dmi',target,"1",TURF_LAYER)
if(3)
//src << "C4"
halimage = image('icons/obj/assemblies.dmi',target,"plastic-explosive2",OBJ_LAYER+0.01)
var/halpick = pickweight(current)
if(client) client.images += halimage
spawn(rand(10,50)) //Only seen for a brief moment.
if(client) client.images -= halimage
halimage = null
if(41 to 65)
//Strange audio
//src << "Strange Audio"
switch(rand(1,14))
if(1) src << 'sound/machines/airlock.ogg'
if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg'
else src << 'sound/effects/Explosion2.ogg'
if(3) src << 'sound/effects/explosionfar.ogg'
if(4) src << 'sound/effects/Glassbr1.ogg'
if(5) src << 'sound/effects/Glassbr2.ogg'
if(6) src << 'sound/effects/Glassbr3.ogg'
if(7) src << 'sound/machines/twobeep.ogg'
if(8) src << 'sound/machines/windowdoor.ogg'
if(9)
//To make it more realistic, I added two gunshots (enough to kill)
src << 'sound/weapons/Gunshot.ogg'
spawn(rand(10,30))
src << 'sound/weapons/Gunshot.ogg'
if(10) src << 'sound/weapons/smash.ogg'
if(11)
//Same as above, but with tasers.
src << 'sound/weapons/Taser.ogg'
spawn(rand(10,30))
src << 'sound/weapons/Taser.ogg'
//Rare audio
if(12)
//These sounds are (mostly) taken from Hidden: Source
var/list/creepyasssounds = list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/Heart Beat.ogg', 'sound/effects/screech.ogg',\
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds)
if(13)
src << "<span class='warning'>You feel a tiny prick!</span>"
if(14)
src << "<h1 class='alert'>Priority Announcement</h1>"
src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>"
src << sound('sound/AI/shuttledock.ogg')
if(66 to 70)
//Flashes of danger
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
possible_points += F
if(possible_points.len)
var/turf/simulated/floor/target = pick(possible_points)
switch(rand(1,4))
if(1)
halbody = image('icons/mob/human.dmi',target,"husk_l",TURF_LAYER)
if(2,3)
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
if(client) client.images -= halbody
halbody = null
if(71 to 72)
//Fake death
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
if(73 to 75)
fake_attack()
hallucinate(halpick)
handling_hal = 0
/obj/effect/hallucination
invisibility = INVISIBILITY_OBSERVER
var/mob/living/carbon/target = null
/mob/living/carbon/proc/fake_attack()
// var/list/possible_clones = new/list()
/obj/effect/hallucination/simple
var/image_icon = 'icons/mob/alien.dmi'
var/image_state = "alienh_pounce"
var/px = 0
var/py = 0
var/col_mod = null
var/image/current_image = null
var/image_layer = MOB_LAYER
var/active = 1 //qdelery
/obj/effect/hallucination/simple/New(loc,var/mob/living/carbon/T)
target = T
current_image = GetImage()
if(target.client) target.client.images |= current_image
return
/obj/effect/hallucination/simple/proc/GetImage()
var/image/I = image(image_icon,loc,image_state,image_layer,dir=src.dir)
I.pixel_x = px
I.pixel_y = py
if(col_mod)
I.color = col_mod
return I
/obj/effect/hallucination/simple/proc/Show(var/update=1)
if(active)
if(target.client) target.client.images.Remove(current_image)
if(update)
current_image = GetImage()
if(target.client) target.client.images |= current_image
/obj/effect/hallucination/simple/update_icon(var/new_state,var/new_icon,var/new_px=0,var/new_py=0)
image_state = new_state
if(new_icon)
image_icon = new_icon
else
image_icon = initial(image_icon)
px = new_px
py = new_py
Show()
/obj/effect/hallucination/simple/Moved(atom/OldLoc, Dir)
Show()
return
/obj/effect/hallucination/simple/Destroy()
if(target.client) target.client.images.Remove(current_image)
active = 0
#define FAKE_FLOOD_EXPAND_TIME 30
#define FAKE_FLOOD_MAX_RADIUS 7
/obj/effect/hallucination/fake_flood
//Plasma/N2O starts flooding from the nearby vent
var/list/flood_images = list()
var/list/turf/flood_turfs = list()
var/image_icon = 'icons/effects/tile_effects.dmi'
var/image_state = "plasma"
var/radius = 0
var/next_expand = 0
/obj/effect/hallucination/fake_flood/New(loc,var/mob/living/carbon/T)
..()
target = T
for(var/obj/machinery/atmospherics/unary/vent_pump/U in orange(7,target))
if(!U.welded)
src.loc = U.loc
break
image_state = pick("plasma","sleeping_agent")
flood_images += image(image_icon,src,image_state,MOB_LAYER)
flood_turfs += get_turf(src.loc)
if(target.client) target.client.images |= flood_images
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
SSobj.processing |= src
/obj/effect/hallucination/fake_flood/process()
if(next_expand <= world.time)
radius++
if(radius > FAKE_FLOOD_MAX_RADIUS)
qdel(src)
Expand()
next_expand = world.time + FAKE_FLOOD_EXPAND_TIME
return
/obj/effect/hallucination/fake_flood/proc/Expand()
if(!flood_turfs) //for qdel
return
for(var/turf/T in circlerangeturfs(loc,radius))
if((T in flood_turfs)|| T.blocks_air)
continue
flood_images += image(image_icon,T,image_state,MOB_LAYER)
flood_turfs += T
if(target.client) target.client.images |= flood_images
return
/obj/effect/hallucination/fake_flood/Destroy()
SSobj.processing.Remove(src)
del(flood_turfs)
if(target.client) target.client.images.Remove(flood_images)
target = null
del(flood_images)
return
/obj/effect/hallucination/simple/xeno
image_icon = 'icons/mob/alien.dmi'
image_state = "alienh_pounce"
/obj/effect/hallucination/simple/xeno/New(loc,var/mob/living/carbon/T)
..()
name = "alien hunter ([rand(1, 1000)])"
return
/obj/effect/hallucination/simple/xeno/throw_at(atom/target, range, speed) // TODO : Make diagonal trhow into proc/property
if(!target || !src || (flags & NODROP)) return 0
src.throwing = 1
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dist_travelled = 0
var/dist_since_sleep = 0
var/tdist_x = dist_x;
var/tdist_y = dist_y;
if(dist_x <= dist_y)
tdist_x = dist_y;
tdist_y = dist_x;
var/error = tdist_x/2 - tdist_y
while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src)))
if(!src.throwing) break
if(!istype(src.loc, /turf)) break
var/atom/step = get_step(src, get_dir(src,target))
if(!step)
break
src.Move(step, get_dir(src, step))
hit_check()
error += (error < 0) ? tdist_x : -tdist_y;
dist_travelled++
dist_since_sleep++
if(dist_since_sleep >= speed)
dist_since_sleep = 0
sleep(1)
src.throwing = 0
src.throw_impact(get_turf(src))
return 1
/obj/effect/hallucination/simple/xeno/throw_impact(A)
update_icon("alienh_pounce")
if(A == target)
target.Weaken(5)
target.visible_message("<span class='danger'>[target] flails around wildly.</span>","<span class ='userdanger'>[name] pounces on you!</span>")
/obj/effect/hallucination/xeno_attack
//Xeno crawls from nearby vent,jumps at you, and goes back in
var/obj/machinery/atmospherics/unary/vent_pump/pump = null
var/obj/effect/hallucination/simple/xeno/xeno = null
/obj/effect/hallucination/xeno_attack/New(loc,var/mob/living/carbon/T)
target = T
for(var/obj/machinery/atmospherics/unary/vent_pump/U in orange(7,target))
if(!U.welded)
pump = U
break
xeno = new(pump.loc,target)
sleep(10)
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32)
xeno.throw_at(target,7,1)
sleep(10)
xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32)
xeno.throw_at(pump,7,1)
sleep(10)
var/xeno_name = xeno.name
target << "<span class='notice'>[xeno_name] begins climbing into the ventilation system...</span>"
sleep(10)
qdel(xeno)
target << "<span class='notice'>[xeno_name] scrambles into the ventilation ducts!</span>"
qdel(src)
/obj/effect/hallucination/singularity_scare
//Singularity moving towards you.
//todo Hide where it moved with fake space images
var/obj/effect/hallucination/simple/singularity/s = null
/obj/effect/hallucination/singularity_scare/New(loc,var/mob/living/carbon/T)
target = T
var/turf/start = T.loc
var/screen_border = pick(SOUTH,EAST,WEST,NORTH)
for(var/i = 0,i<11,i++)
start = get_step(start,screen_border)
s = new(start,target)
for(var/i = 0,i<11,i++)
sleep(5)
s.loc = get_step(get_turf(s),get_dir(s,target))
s.Show()
s.Eat()
qdel(s)
/obj/effect/hallucination/simple/singularity
image_icon = 'icons/effects/224x224.dmi'
image_state = "singularity_s7"
image_layer = 6
px = -96
py = -96
/obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir)
var/target_dist = get_dist(src,target)
if(target_dist<=3) //"Eaten"
target.sleeping = 20
target.hal_crit = 1
target.hal_screwyhud = 1
spawn(rand(50,100))
target.sleeping = 0
target.hal_crit = 0
target.hal_screwyhud = 0
/obj/effect/hallucination/battle
/obj/effect/hallucination/battle/New(loc,var/mob/living/carbon/T)
target = T
var/hits = rand(3,6)
switch(rand(1,5))
if(1) //Laser fight
for(var/i=0,i<hits,i++)
target << sound('sound/weapons/Laser.ogg',0,1,0,25)
sleep(rand(1,5))
target << sound(get_sfx("bodyfall"),0,1,0,25)
if(2) //Esword fight
target << sound('sound/weapons/saberon.ogg',0,1,0,15)
for(var/i=0,i<hits,i++)
target << sound('sound/weapons/blade1.ogg',,0,1,0,25)
sleep(rand(1,5))
target << sound(get_sfx("bodyfall"),0,1,0,25)
target << sound('sound/weapons/saberoff.ogg',0,1,0,15)
if(3) //Gun fight
for(var/i=0,i<hits,i++)
target << sound(get_sfx("gunshot"),0,1,0,25)
sleep(rand(1,5))
target << sound(get_sfx("bodyfall"),0,1,0,25)
if(4) //Stunprod + cablecuff
target << sound('sound/weapons/Egloves.ogg',0,1,40)
target << sound(get_sfx("bodyfall"),0,1,0,25)
sleep(30)
target << sound('sound/weapons/cablecuff.ogg',0,1,0,15)
if(5) // Tick Tock
for(var/i=0,i<hits,i++)
target << sound('sound/items/timer.ogg',0,1,0,25)
sleep(15)
qdel(src)
/obj/effect/hallucination/delusion
var/list/image/delusions = list()
/obj/effect/hallucination/delusion/New(loc,var/mob/living/carbon/T)
target = T
var/image/A = null
var/kind = rand(1,3)
for(var/mob/living/carbon/human/H in living_mob_list)
if(H == target)
continue
if(H in view(target))
continue
switch(kind)
if(1)//Clown
A = image('icons/mob/animal.dmi',H,"clown")
if(2)//Carp
A = image('icons/mob/animal.dmi',H,"carp")
if(3)//Corgi
A = image('icons/mob/pets.dmi',H,"corgi")
if(4)//Skeletons
A = image('icons/mob/human.dmi',H,"skeleton_s")
A.override = 1
if(target.client)
delusions |= A
target.client.images |= A
sleep(300)
for(var/image/I in delusions)
if(target.client)
target.client.images.Remove(I)
qdel(src)
/obj/effect/hallucination/fakeattacker/New(loc,var/mob/living/carbon/T)
target = T
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in living_mob_list)
if(H.stat || H.lying)
continue
// possible_clones += H
clone = H
break //changed the code a bit. Less randomised, but less work to do. Should be ok, world.contents aren't stored in any particular order.
break
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone)
return
//var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(outside_range(target))
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(src.loc)
var/obj/effect/fake_attacker/F = new/obj/effect/fake_attacker(get_turf(target),target)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
@@ -210,9 +372,8 @@ Gunshots/explosions/opening doors/less rare audio (done)
F.weap = clone.r_hand
F.name = clone.name
F.my_target = src
F.my_target = target
F.weapon_name = clone_weapon
src.hallucinations += F
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
@@ -220,7 +381,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
F.down = image(clone,dir = SOUTH)
F.updateimage()
qdel(src)
/obj/effect/fake_attacker
icon = null
@@ -255,8 +416,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
"<span class='danger'>[my_target] has attacked [src]!</span>")
src.health -= P.force
return
/obj/effect/fake_attacker/Crossed(var/mob/M, somenumber)
@@ -266,20 +425,18 @@ Gunshots/explosions/opening doors/less rare audio (done)
for(var/mob/O in oviewers(world.view , my_target))
O << "<span class='danger'>[my_target] stumbles around.</span>"
/obj/effect/fake_attacker/New()
/obj/effect/fake_attacker/New(loc,var/mob/living/carbon/T)
..()
my_target = T
spawn(300)
if(my_target)
my_target.hallucinations -= src
qdel(src)
step_away(src,my_target,2)
spawn attack_loop()
spawn(0)
attack_loop()
/obj/effect/fake_attacker/proc/updateimage()
// del src.currentimage
if(src.dir == NORTH)
del src.currentimage
src.currentimage = new /image(up,src)
@@ -356,3 +513,251 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
/obj/item/clothing/shoes/magboots, /obj/item/areaeditor/blueprints, /obj/item/weapon/disk/nuclear,\
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
/obj/effect/hallucination/bolts
var/list/doors = list()
/obj/effect/hallucination/bolts/New(loc,var/mob/living/carbon/T,var/door_number=-1) //-1 for sever 1-2 for subtle
target = T
var/image/I = null
var/count = 0
for(var/obj/machinery/door/airlock/A in range(target,7))
if(count>door_number && door_number>0)
break
count++
I = image(A.icon,A,"door_locked",layer=A.layer+0.1)
doors += I
if(target.client)
target.client.images |= I
sleep(2)
sleep(100)
for(var/image/B in doors)
if(target.client)
target.client.images.Remove(B)
qdel(src)
/obj/effect/hallucination/whispers
/obj/effect/hallucination/whispers/New(loc,var/mob/living/carbon/T)
target = T
var/speak_messages = list("I'm watching you...","[target.name]!","Go away!","Kchck-Chkck? Kchchck!","Did you hear that?","What did you do ?","Why?","Give me that!","Honk!","HELP!!")
var/radio_messages = list("Xenos!","Singularity loose!","They are arming the nuke!","They butchered Ian!","H-help!","[pick(teleportlocs)]!!","Where's [target.name]?","Call the shuttle!")
var/list/mob/living/carbon/people = list()
var/list/mob/living/carbon/person = null
for(var/mob/living/carbon/H in view(target))
if(H == target)
continue
if(!person)
person = H
else
if(get_dist(target,H)<get_dist(target,person))
person = H
people += H
if(person) //Basic talk
target << target.compose_message(person,person.languages,pick(speak_messages),null,person.get_spans())
else // Radio talk
var/list/humans = list()
for(var/mob/living/carbon/human/H in living_mob_list)
humans += H
person = pick(humans)
target << target.compose_message(person,person.languages,pick(radio_messages),"1459",person.get_spans())
qdel(src)
/obj/effect/hallucination/message
/obj/effect/hallucination/message/New(loc,var/mob/living/carbon/T)
target = T
var/chosen = pick("<span class='userdanger'>The light burns you!</span>", \
"<span class='danger'>You don't feel like yourself.</span>", \
"<span class='userdanger'>Unknown has punched [target]!</span>", \
"<span class='notice'>You hear something squeezing through the ducts...</span>", \
"<span class='notice'>You hear a distant scream.</span>", \
"<span class='notice'>You feel invincible, nothing can hurt you!</span>", \
"<B>[target]</B> sneezes.", \
"<span class='warning'>You feel faint.</span>", \
"<span class='noticealien'>You hear a strange, alien voice in your head...</span>[pick("Hiss","Ssss")]", \
"<span class='notice'>You can see...everything!</span>")
target << chosen
qdel(src)
/mob/living/carbon/proc/hallucinate(var/hal_type) // Todo -> proc / defines
switch(hal_type)
if("xeno")
new /obj/effect/hallucination/xeno_attack(src.loc,src)
if("singulo")
new /obj/effect/hallucination/singularity_scare(src.loc,src)
if("battle")
new /obj/effect/hallucination/battle(src.loc,src)
if("flood")
new /obj/effect/hallucination/fake_flood(src.loc,src)
if("delusion")
new /obj/effect/hallucination/delusion(src.loc,src)
if("fake")
new /obj/effect/hallucination/fakeattacker(src.loc,src)
if("bolts")
new /obj/effect/hallucination/bolts(src.loc,src)
if("bolts_minor")
new /obj/effect/hallucination/bolts(src.loc,src,rand(1,2))
if("whispers")
new /obj/effect/hallucination/whispers(src.loc,src)
if("message")
new /obj/effect/hallucination/message(src.loc,src)
if("sounds")
//Strange audio
//src << "Strange Audio"
switch(rand(1,18))
if(1) src << 'sound/machines/airlock.ogg'
if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg'
else src << 'sound/effects/Explosion2.ogg'
if(3) src << 'sound/effects/explosionfar.ogg'
if(4) src << 'sound/effects/Glassbr1.ogg'
if(5) src << 'sound/effects/Glassbr2.ogg'
if(6) src << 'sound/effects/Glassbr3.ogg'
if(7) src << 'sound/machines/twobeep.ogg'
if(8) src << 'sound/machines/windowdoor.ogg'
if(9)
//To make it more realistic, I added two gunshots (enough to kill)
src << 'sound/weapons/Gunshot.ogg'
spawn(rand(10,30))
src << 'sound/weapons/Gunshot.ogg'
if(10) src << 'sound/weapons/smash.ogg'
if(11)
//Same as above, but with tasers.
src << 'sound/weapons/Taser.ogg'
spawn(rand(10,30))
src << 'sound/weapons/Taser.ogg'
//Rare audio
if(12)
//These sounds are (mostly) taken from Hidden: Source
var/list/creepyasssounds = list('sound/effects/ghost.ogg', 'sound/effects/ghost2.ogg', 'sound/effects/Heart Beat.ogg', 'sound/effects/screech.ogg',\
'sound/hallucinations/behind_you1.ogg', 'sound/hallucinations/behind_you2.ogg', 'sound/hallucinations/far_noise.ogg', 'sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg',\
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds)
if(13)
src << "<span class='warning'>You feel a tiny prick!</span>"
if(14)
src << "<h1 class='alert'>Priority Announcement</h1>"
src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>"
src << sound('sound/AI/shuttledock.ogg')
if(15)
src << 'sound/items/Welder.ogg'
if(16)
src << 'sound/items/Screwdriver.ogg'
if(17)
src << 'sound/weapons/saberon.ogg'
if(18)
src << 'sound/weapons/saberoff.ogg'
if("hudscrew")
//Screwy HUD
//src << "Screwy HUD"
hal_screwyhud = pick(1,2,3,3,4,4)
spawn(rand(100,250))
hal_screwyhud = 0
if("items")
//Strange items
//src << "Traitor Items"
if(!halitem)
halitem = new
var/list/slots_free = list(ui_lhand,ui_rhand)
if(l_hand) slots_free -= ui_lhand
if(r_hand) slots_free -= ui_rhand
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(!H.belt) slots_free += ui_belt
if(!H.l_store) slots_free += ui_storage1
if(!H.r_store) slots_free += ui_storage2
if(slots_free.len)
halitem.screen_loc = pick(slots_free)
halitem.layer = 50
switch(rand(1,6))
if(1) //revolver
halitem.icon = 'icons/obj/guns/projectile.dmi'
halitem.icon_state = "revolver"
halitem.name = "Revolver"
if(2) //c4
halitem.icon = 'icons/obj/assemblies.dmi'
halitem.icon_state = "plastic-explosive0"
halitem.name = "Mysterious Package"
if(prob(25))
halitem.icon_state = "c4small_1"
if(3) //sword
halitem.icon = 'icons/obj/weapons.dmi'
halitem.icon_state = "sword1"
halitem.name = "Sword"
if(4) //stun baton
halitem.icon = 'icons/obj/weapons.dmi'
halitem.icon_state = "stunbaton"
halitem.name = "Stun Baton"
if(5) //emag
halitem.icon = 'icons/obj/card.dmi'
halitem.icon_state = "emag"
halitem.name = "Cryptographic Sequencer"
if(6) //flashbang
halitem.icon = 'icons/obj/grenade.dmi'
halitem.icon_state = "flashbang1"
halitem.name = "Flashbang"
if(client) client.screen += halitem
spawn(rand(100,250))
qdel(halitem)
if("dangerflash")
//Flashes of danger
//src << "Danger Flash"
if(!halimage)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
possible_points += F
if(possible_points.len)
var/turf/simulated/floor/target = pick(possible_points)
switch(rand(1,3))
if(1)
//src << "Space"
halimage = image('icons/turf/space.dmi',target,"[rand(1,25)]",TURF_LAYER)
if(2)
//src << "Fire"
halimage = image('icons/effects/fire.dmi',target,"1",TURF_LAYER)
if(3)
//src << "C4"
halimage = image('icons/obj/assemblies.dmi',target,"plastic-explosive2",OBJ_LAYER+0.01)
if(client) client.images += halimage
spawn(rand(10,50)) //Only seen for a brief moment.
if(client) client.images -= halimage
halimage = null
if("death")
//Fake death
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
if("husks")
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
possible_points += F
if(possible_points.len)
var/turf/simulated/floor/target = pick(possible_points)
switch(rand(1,4))
if(1)
var/image/body = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
var/matrix/M = matrix()
M.Turn(90)
body.transform = M
halbody = body
if(2,3)
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
if(client) client.images -= halbody
halbody = null
@@ -44,7 +44,8 @@
else if((ingredients.len >= ingMax) || (reagents.total_volume >= volume))
user << "<span class='warning'>You can't add more ingredients to [src]!</span>"
else
user.drop_item()
if(!user.unEquip(I))
return
if(S.trash)
new S.trash(get_turf(user))
S.trash = null //we remove the plate before adding the ingredient
@@ -63,7 +63,8 @@
if(istype(O, /obj/item/weapon/reagent_containers/food/drinks/drinkingglass))
var/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/DG = O
if(!DG.reagents.total_volume) //glass is empty
user.drop_item()
if(!user.drop_item())
return
qdel(DG)
glasses++
user << "<span class='notice'>The [src] accepts the drinking glass, sterilizing it.</span>"
@@ -72,7 +73,8 @@
user << "<span class='warning'>The [src] is at full capacity.</span>"
else
var/obj/item/weapon/reagent_containers/food/snacks/S = O
user.drop_item()
if(!user.drop_item())
return
S.loc = src
if(stored_food[sanitize(S.name)])
stored_food[sanitize(S.name)]++
@@ -60,7 +60,8 @@
if(target.stat == 0)
user << "<span class='danger'>The monkey is struggling far too much to put it in the recycler.</span>"
else
user.drop_item()
if(!user.drop_item())
return
qdel(target)
user << "<span class='notice'>You stuff the monkey in the machine.</span>"
playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
+1 -1
View File
@@ -897,7 +897,7 @@ obj/item/weapon/reagent_containers/food/snacks/grown/shell/eggy/add_juice()
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/blue/bluespace/attack_self(var/mob/user)
squish(user)
user.drop_item()
user.unEquip(src)
src.visible_message("[user] squashes the [src.name].","<span class='italics'>You hear a smack.</span>")
qdel(src)
+2 -1
View File
@@ -63,7 +63,8 @@
if(2)
if(is_type_in_list(I, allowed_books))
user.drop_item()
if(!user.drop_item())
return
I.loc = src
update_icon()
else if(istype(I, /obj/item/weapon/storage/bag/books))
+4 -2
View File
@@ -447,7 +447,8 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
/obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/book))
user.drop_item()
if(!user.drop_item())
return
O.loc = src
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
@@ -505,7 +506,8 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(busy)
user << "<span class='warning'>The book binder is busy. Please wait for completion of previous operation.</span>"
return
user.drop_item()
if(!user.drop_item())
return
O.loc = src
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
src.visible_message("[src] begins to hum as it warms up its printing drums.")
+8 -4
View File
@@ -89,7 +89,8 @@
if(istype(W,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I) && !istype(inserted_id))
usr.drop_item()
if(!user.drop_item())
return
I.loc = src
inserted_id = I
interact(user)
@@ -184,7 +185,8 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "<span class='warning'>No valid ID.</span>"
@@ -333,7 +335,8 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "<span class='danger'>No valid ID.</span>"
@@ -356,7 +359,8 @@
if(istype(I,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
usr.drop_item()
if(!usr.drop_item())
return
C.loc = src
inserted_id = C
interact(user)
@@ -86,7 +86,8 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "<span class='warning'>Invalid ID.</span>"
+2 -1
View File
@@ -60,8 +60,9 @@
..()
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
if(!user.drop_item())
return
user << "<span class='notice'>You add the [C.name] into the bag.</span>"
usr.drop_item()
contents += C
if (istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
+2 -1
View File
@@ -11,7 +11,8 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/ore))
user.drop_item()
if(!user.drop_item())
return
W.loc = src
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
+2 -1
View File
@@ -41,6 +41,8 @@
user << "<span class='warning'>You aren't sure where this brain came from, but you're pretty sure it's a useless brain!</span>"
return
if(!user.unEquip(src))
return
var/mob/living/carbon/brain/B = newbrain.brainmob
if(!B.key)
var/mob/dead/observer/ghost = B.get_ghost()
@@ -58,7 +60,6 @@
dead_mob_list -= brainmob //Update dem lists
living_mob_list += brainmob
user.drop_item()
newbrain.loc = src //P-put your brain in it
brain = newbrain
+1 -1
View File
@@ -79,7 +79,7 @@
if(2)
say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!", "port ba[pick("y", "i", "e")] med!!!!", "REVIRT GON CHEM!!!!!!!!", "youed call her a toeugh bithc", "closd for merbegging", "pray can u [pick("spawn", "MAke me", "creat")] [pick("zenomorfs", "ayleins", "treaitors", "sheadow linkgs", "ubdoocters")]???"))
if(3)
say(pick("GEY AWAY FROM ME U GREIFING PRICK!!!!", "ur a fuckeing autist!", ";HELP SHITECIRTY MURDERIN MEE!!!", "hwat dose tha [pick("g", "squid", "r")] mean?????", "CAL; TEH SHUTTLE!!!!!", "wearnig siNGUARLTY IS .... FIne xDDDDDDDDD", "AI laW 22 Open door", "this SI mY stATIon......", "who the HELL do u thenk u r?!!!!", "geT THE FUCK OUTTTT", "H U G B O X", ";;CRAGING THIS STTAYTION WITH NIO SURVIVROS", "[pick("bager", "syebl")] is down11!!!!!!!!!!!!!!!!!"))
say(pick("GEY AWAY FROM ME U GREIFING PRICK!!!!", "ur a fuckeing autist!", ";HELP SHITECIRTY MURDERIN MEE!!!", "hwat dose tha [pick("g", "squid", "r")] mean?????", "CAL; TEH SHUTTLE!!!!!", "wearnig siNGUARLTY IS .... FIne xDDDDDDDDD", "AI laW 22 Open door", "this SI mY stATIon......", "who the HELL do u thenk u r?!!!!", "geT THE FUCK OUTTTT", "H U G B O X", ";;CRAGING THIS STTAYTION WITH NIO SURVIVROS", "[pick("bager", "syebl")] is down11!!!!!!!!!!!!!!!!!", "PSHOOOM"))
if(4)
emote("drool")
-4
View File
@@ -375,10 +375,6 @@
else
hallucination -= 2
else
for(var/atom/a in hallucinations)
qdel(a)
//this handles hud updates. Calls update_vision() and handle_hud_icons()
/mob/living/carbon/handle_regular_hud_updates()
if(!client) return 0
@@ -17,8 +17,6 @@
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
+13 -10
View File
@@ -450,7 +450,8 @@
else if(cell)
user << "<span class='warning'>There is a power cell already installed!</span>"
else
user.drop_item()
if(!user.drop_item())
return
W.loc = src
cell = W
user << "<span class='notice'>You insert the power cell.</span>"
@@ -525,27 +526,29 @@
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
if(!opened)
usr << "<span class='warning'>You must access the borgs internals!</span>"
user << "<span class='warning'>You must access the borgs internals!</span>"
else if(!src.module && U.require_module)
usr << "<span class='warning'>The borg must choose a module before it can be upgraded!</span>"
user << "<span class='warning'>The borg must choose a module before it can be upgraded!</span>"
else if(U.locked)
usr << "<span class='warning'>The upgrade is locked and cannot be used yet!</span>"
user << "<span class='warning'>The upgrade is locked and cannot be used yet!</span>"
else
if(!user.drop_item())
return
if(U.action(src))
usr << "<span class='notice'>You apply the upgrade to [src].</span>"
usr.drop_item()
user << "<span class='notice'>You apply the upgrade to [src].</span>"
U.loc = src
else
usr << "<span class='danger'>Upgrade error.</span>"
user << "<span class='danger'>Upgrade error.</span>"
else if(istype(W, /obj/item/device/toner))
if(toner >= tonermax)
usr << "<span class='warning'>The toner level of [src] is at it's highest level possible!</span>"
user << "<span class='warning'>The toner level of [src] is at it's highest level possible!</span>"
else
if(!user.drop_item())
return
toner = 40
usr.drop_item()
qdel(W)
usr << "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>"
user << "<span class='notice'>You fill the toner level of [src] to its max capacity.</span>"
else
if(W.force && W.damtype != STAMINA) //only sparks if real damage is dealt.
+4 -2
View File
@@ -28,7 +28,8 @@
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/paper))
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
toppaper = W
user << "<span class='notice'>You clip the paper onto \the [src].</span>"
@@ -76,7 +77,8 @@
if(!haspen)
if(istype(usr.get_active_hand(), /obj/item/weapon/pen))
var/obj/item/weapon/pen/W = usr.get_active_hand()
usr.drop_item()
if(!usr.unEquip(W))
return
W.loc = src
haspen = W
usr << "<span class='notice'>You slot [W] into [src].</span>"
+2 -1
View File
@@ -43,8 +43,9 @@
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents))
if(!user.drop_item())
return
user << "<span class='notice'>You put [P] in [src].</span>"
user.drop_item()
P.loc = src
icon_state = "[initial(icon_state)]-open"
sleep(5)
+2 -1
View File
@@ -31,7 +31,8 @@
/obj/item/weapon/folder/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo) || istype(W, /obj/item/documents))
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
user << "<span class='notice'>You put [W] into [src].</span>"
update_icon()
+2 -1
View File
@@ -55,8 +55,9 @@
/obj/item/weapon/hand_labeler/attackby(obj/item/I as obj, mob/user as mob, params)
..()
if(istype(I, /obj/item/hand_labeler_refill))
if(!user.unEquip(I))
return
user << "<span class='notice'>You insert [I] into [src].</span>"
user.drop_item()
qdel(I)
labels_left = initial(labels_left)
return
+2 -1
View File
@@ -71,7 +71,8 @@
if(!istype(i))
return ..()
user.drop_item()
if(!user.unEquip(i))
return
i.loc = src
user << "<span class='notice'>You put [i] in [src].</span>"
papers.Add(i)
+21 -12
View File
@@ -24,6 +24,9 @@
pressure_resistance = 2
var/colour = "black" //what colour the ink is!
/obj/item/weapon/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over themself with [src]! It looks like they're trying to commit sudoku!</span>")
return(BRUTELOSS)
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
@@ -93,19 +96,25 @@
if(M.client)
M.mind_initialize() //give them a mind datum if they don't have one.
if(user.mind in ticker.mode.A_bosses)
if(ticker.mode.add_gangster(M.mind,"A"))
M.Paralyse(5)
cooldown(max(0,ticker.mode.B_gang.len - ticker.mode.A_gang.len))
else
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
var/recruitable = ticker.mode.add_gangster(M.mind,"A")
switch(recruitable)
if(2)
M.Paralyse(5)
cooldown(max(0,ticker.mode.B_gang.len - ticker.mode.A_gang.len))
if(1)
user << "<span class='warning'>This mind has already been recruited by another gang!</span>"
else
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
else if(user.mind in ticker.mode.B_bosses)
if(ticker.mode.add_gangster(M.mind,"B"))
M.Paralyse(5)
cooldown(max(0,ticker.mode.A_gang.len - ticker.mode.B_gang.len))
else
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
else
user << "<span class='warning'>This mind is so vacant that it is not susceptible to influence!</span>"
var/recruitable = ticker.mode.add_gangster(M.mind,"B")
switch(recruitable)
if(2)
M.Paralyse(5)
cooldown(max(0,ticker.mode.A_gang.len - ticker.mode.B_gang.len))
if(1)
user << "<span class='warning'>This mind has already been recruited by another gang!</span>"
else
user << "<span class='warning'>This mind is resistant to recruitment!</span>"
/obj/item/weapon/pen/gang/proc/cooldown(modifier)
cooldown = 1
+6 -3
View File
@@ -223,7 +223,8 @@
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/paper))
if(copier_empty())
user.drop_item()
if(!user.drop_item())
return
copy = O
O.loc = src
user << "<span class='notice'>You insert [O] into [src].</span>"
@@ -234,7 +235,8 @@
else if(istype(O, /obj/item/weapon/photo))
if(copier_empty())
user.drop_item()
if(!user.drop_item())
return
photocopy = O
O.loc = src
user << "<span class='notice'>You insert [O] into [src].</span>"
@@ -245,7 +247,8 @@
else if(istype(O, /obj/item/device/toner))
if(toner <= 0)
user.drop_item()
if(!user.drop_item())
return
qdel(O)
toner = 40
user << "<span class='notice'>You insert [O] into [src].</span>"
+2 -1
View File
@@ -140,8 +140,9 @@
if(pictures_left)
user << "<span class='notice'>[src] still has some film in it!</span>"
return
if(!user.unEquip(I))
return
user << "<span class='notice'>You insert [I] into [src].</span>"
user.drop_item()
qdel(I)
pictures_left = pictures_max
return
+2 -1
View File
@@ -413,7 +413,8 @@
if (stat & MAINT)
user << "<span class='warning'>There is no connector for your power cell!</span>"
return
user.drop_item()
if(!user.drop_item())
return
W.loc = src
cell = W
user.visible_message(\
+2 -1
View File
@@ -347,6 +347,8 @@
src.add_fingerprint(user)
var/obj/item/weapon/light/L = W
if(istype(L, light_type))
if(!user.drop_item())
return
status = L.status
user << "<span class='notice'>You insert the [L.name].</span>"
switchcount = L.switchcount
@@ -355,7 +357,6 @@
on = has_power()
update()
user.drop_item() //drop the item to update overlays and such
qdel(L)
if(on && rigged)
+2 -1
View File
@@ -64,7 +64,8 @@ var/global/list/rad_collectors = list()
if(src.P)
user << "<span class='warning'>There's already a plasma tank loaded!</span>"
return 1
user.drop_item()
if(!user.drop_item())
return 1
src.P = W
W.loc = src
update_icons()
+35 -1
View File
@@ -25,6 +25,7 @@
var/target = null //its target. moves towards the target if it has one
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
var/last_warning
var/consumedSupermatter = 0 //If the singularity has eaten a supermatter shard and can go to stage six
allow_spin = 0
/obj/singularity/New(loc, var/starting_energy = 50, var/temp = 0)
//CARN: admin-alert for chuckle-fuckery.
@@ -129,6 +130,8 @@
var/temp_allowed_size = src.allowed_size
if(force_size)
temp_allowed_size = force_size
if(temp_allowed_size >= STAGE_SIX && !consumedSupermatter)
temp_allowed_size = STAGE_FIVE
switch(temp_allowed_size)
if(STAGE_ONE)
current_size = STAGE_ONE
@@ -185,6 +188,15 @@
grav_pull = 10
consume_range = 4
dissipate = 0 //It cant go smaller due to e loss
if(STAGE_SIX) //This only happens if a stage 5 singulo consumes a supermatter shard.
current_size = STAGE_SIX
icon = 'icons/effects/352x352.dmi'
icon_state = "singularity_s11"
pixel_x = -160
pixel_y = -160
grav_pull = 15
consume_range = 5
dissipate = 0
if(current_size == allowed_size)
investigate_log("<font color='red'>grew to size [current_size]</font>","singulo")
return 1
@@ -199,6 +211,8 @@
investigate_log("collapsed.","singulo")
qdel(src)
return 0
if(energy > 2999 && !consumedSupermatter)
energy = 2000
switch(energy)//Some of these numbers might need to be changed up later -Mport
if(1 to 199)
allowed_size = STAGE_ONE
@@ -208,8 +222,10 @@
allowed_size = STAGE_THREE
if(1000 to 1999)
allowed_size = STAGE_FOUR
if(2000 to INFINITY)
if(2000 to 2999)
allowed_size = STAGE_FIVE
if(3000 to INFINITY)
allowed_size = STAGE_SIX
if(current_size != allowed_size)
expand()
return 1
@@ -230,6 +246,11 @@
/obj/singularity/proc/consume(var/atom/A)
var/gain = A.singularity_act(current_size)
src.energy += gain
if(istype(A, /obj/machinery/power/supermatter_shard) && !consumedSupermatter)
desc = "[initial(desc)] It glows fiercely with inner fire."
name = "supermatter-charged [initial(name)]"
consumedSupermatter = 1
luminosity = 10
return
@@ -326,6 +347,10 @@
toxmob()
if(4)//Stun mobs who lack optic scanners
mezzer()
if(5,6) //Sets all nearby mobs on fire
if(current_size < STAGE_SIX)
return 0
combust_mobs()
else
return 0
return 1
@@ -347,6 +372,15 @@
return
/obj/singularity/proc/combust_mobs()
for(var/mob/living/carbon/C in orange(20, src))
C.visible_message("<span class='warning'>[C]'s skin bursts into flame!</span>", \
"<span class='boldannounce'>You feel an inner fire as your skin is suddenly covered in fire!</span>")
C.adjust_fire_stacks(5)
C.IgniteMob()
return
/obj/singularity/proc/mezzer()
for(var/mob/living/carbon/M in oviewers(8, src))
if(istype(M, /mob/living/carbon/brain)) //Ignore brains
+2 -1
View File
@@ -253,8 +253,9 @@
if(!tracker)
if(istype(W, /obj/item/weapon/tracker_electronics))
if(!user.drop_item())
return
tracker = 1
user.drop_item()
qdel(W)
user.visible_message("[user] inserts the electronics into the solar assembly.", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
return 1
@@ -187,6 +187,7 @@
return 1
/obj/machinery/power/supermatter_shard
/obj/machinery/power/supermatter_shard/bullet_act(var/obj/item/projectile/Proj)
var/turf/L = loc
@@ -205,6 +206,16 @@
damage += Proj.damage * config_bullet_energy
return 0
/obj/machinery/power/supermatter_shard/singularity_act()
var/gain = 100
investigate_log("Supermatter shard consumed by singularity.","singulo")
message_admins("Singularity has consumed a supermatter shard and can now become stage six.")
visible_message("<span class='userdanger'>[src] is consumed by the singularity!</span>")
for(var/mob/M in mob_list)
M << 'sound/effects/supermatter.ogg' //everyone goan know bout this
M << "<span class='boldannounce'>A horrible screeching fills your ears, and a wave of dread washes over you...</span>"
qdel(src)
return(gain)
/obj/machinery/power/supermatter_shard/attack_paw(mob/user as mob)
return attack_hand(user)
@@ -244,7 +244,8 @@
desc = "Its nerf or nothing! ... Although, this one doesn't look too safe."
user << "<span class='notice'>You pop the safety cap off of [src].</span>"
else if ((istype(A, /obj/item/weapon/pen)) && modified && !BB.contents.len)
user.drop_item()
if(!user.unEquip(A))
return
A.loc = BB
BB.damage = 5
BB.nodamage = 0
@@ -134,6 +134,17 @@
..()
icon_state = "45-[ammo_count() ? "8" : "0"]"
/obj/item/ammo_box/magazine/uzim9mm
name = "uzi magazine (9mm)"
icon_state = "uzi9mm-32"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
max_ammo = 32
/obj/item/ammo_box/magazine/uzim9mm/update_icon()
..()
icon_state = "uzi9mm-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/smgm9mm
name = "SMG magazine (9mm)"
icon_state = "smg9mm-20"
@@ -157,11 +168,11 @@
..()
icon_state = "c20r45-[round(ammo_count(),2)]"
obj/item/ammo_box/magazine/tommygunm9mm
name = "drum magazine (9mm)"
obj/item/ammo_box/magazine/tommygunm45
name = "drum magazine (.45)"
icon_state = "drum45"
ammo_type = /obj/item/ammo_casing/c9mm
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c45
caliber = ".45"
max_ammo = 50
/obj/item/ammo_box/magazine/m50
+4 -3
View File
@@ -98,8 +98,8 @@
if(heavy_weapon)
if(user.get_inactive_hand())
if(prob(15))
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
user.drop_item()
if(user.drop_item())
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
/obj/item/weapon/gun/emp_act(severity)
for(var/obj/O in contents)
@@ -235,7 +235,8 @@
if(user.l_hand != src && user.r_hand != src)
user << "<span class='warning'>You'll need [src] in your hands to do that!</span>"
return
user.drop_item()
if(!user.unEquip(A))
return
user << "<span class='notice'>You click [S] into place on [src].</span>"
if(S.on)
SetLuminosity(0)
@@ -20,7 +20,8 @@
if((istype(I, /obj/item/weapon/grenade)))
if(grenades.len < max_grenades)
user.drop_item()
if(!user.unEquip(I))
return
I.loc = src
grenades += I
user << "<span class='notice'>You put the grenade in the grenade launcher.</span>"
+2 -1
View File
@@ -68,7 +68,8 @@
if(user.l_hand != src && user.r_hand != src)
user << "<span class='notice'>You'll need [src] in your hands to do that.</span>"
return
user.drop_item()
if(!user.unEquip(A))
return
user << "<span class='notice'>You screw [S] onto [src].</span>"
suppressed = A
S.oldsound = fire_sound
@@ -106,7 +106,13 @@
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "uzi"
desc = "A lightweight, burst-fire submachine gun, for when you really want someone dead. Uses 9mm rounds."
icon_state = "mini-uzi"
origin_tech = "combat=5;materials=2;syndicate=8"
mag_type = /obj/item/ammo_box/magazine/uzim9mm
burst_size = 2
/obj/item/weapon/gun/projectile/automatic/l6_saw
name = "syndicate LMG"
@@ -237,7 +243,7 @@
w_class = 5
slot_flags = 0
origin_tech = "combat=5;materials=1;syndicate=2"
mag_type = /obj/item/ammo_box/magazine/tommygunm9mm
mag_type = /obj/item/ammo_box/magazine/tommygunm45
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
burst_size = 4
@@ -79,7 +79,7 @@
playsound(user, fire_sound, 50, 1)
user << "<span class='userdanger'>[src] blows up in your face!</span>"
user.take_organ_damage(0,20)
user.drop_item()
user.unEquip(src)
qdel(src)
return 0
..()
+2 -1
View File
@@ -63,7 +63,8 @@
/obj/item/weapon/gun/syringe/attackby(var/obj/item/A as obj, mob/user as mob, params, var/show_msg = 1)
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
if(syringes.len < max_syringes)
user.drop_item()
if(!user.unEquip(A))
return
user << "<span class='notice'>You load [A] into \the [src].</span>"
syringes.Add(A)
A.loc = src
+2 -1
View File
@@ -30,7 +30,8 @@
user << "<span class ='notice'>You remove [G]'s old pin.</span>"
if(!G.pin)
user.drop_item()
if(!user.unEquip(src))
return
gun_insert(user, G)
user << "<span class ='notice'>You insert [src] into [G].</span>"
else
-1
View File
@@ -108,7 +108,6 @@
loc = target_turf
if(A)
permutated.Add(A)
Range()
return 0
else
if(A && A.density && !ismob(A) && !(A.flags & ON_BORDER)) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs on that tile.
@@ -30,6 +30,7 @@
icon_state = "xray"
damage = 15
irradiate = 30
range = 15
forcedodge = 1
/obj/item/projectile/beam/disabler
+3 -2
View File
@@ -227,9 +227,10 @@
ready_dna(H)
if(H.dna && prob(50))
var/list/all_species = list()
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
for(var/speciestype in typesof(/datum/species) - /datum/species)
var/datum/species/S = new speciestype()
if(!S.dangerous_existence)
all_species += S
all_species += speciestype
hardset_dna(H, null, null, null, null, pick(all_species))
H.update_icons()
else
+20 -8
View File
@@ -155,9 +155,10 @@
if(src.beaker)
user << "<span class='warning'>A beaker is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.beaker = B
user.drop_item()
B.loc = src
user << "<span class='notice'>You add the beaker to the machine.</span>"
SSnano.update_uis(src) // update all UIs attached to src
@@ -290,8 +291,10 @@
if(src.beaker)
user << "<span class='warning'>A beaker is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.beaker = B
user.drop_item()
B.loc = src
user << "<span class='notice'>You add the beaker to the machine.</span>"
src.updateUsrDialog()
@@ -301,8 +304,10 @@
if(src.loaded_pill_bottle)
user << "<span class='warning'>A pill bottle is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.loaded_pill_bottle = B
user.drop_item()
B.loc = src
user << "<span class='notice'>You add the pill bottle into the dispenser slot.</span>"
src.updateUsrDialog()
@@ -619,8 +624,10 @@
if(src.beaker)
user << "<span class='warning'>A beaker is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.beaker = B
user.drop_item()
B.loc = src
user << "<span class='notice'>You add the beaker to the machine.</span>"
src.updateUsrDialog()
@@ -630,8 +637,10 @@
if(src.loaded_pill_bottle)
user << "<span class='warning'>A pill bottle is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.loaded_pill_bottle = B
user.drop_item()
B.loc = src
user << "<span class='notice'>You add the pill bottle into the dispenser slot.</span>"
src.updateUsrDialog()
@@ -919,9 +928,10 @@
if(src.beaker)
user << "<span class='warning'>A beaker is already loaded into the machine!</span>"
return
if(!user.drop_item())
return
src.beaker = I
user.drop_item()
I.loc = src
user << "<span class='notice'>You add the beaker to the machine.</span>"
src.updateUsrDialog()
@@ -1053,8 +1063,9 @@
if (beaker)
return 1
else
if(!user.drop_item())
return 1
src.beaker = O
user.drop_item()
O.loc = src
update_icon()
src.updateUsrDialog()
@@ -1548,8 +1559,9 @@
if (beaker)
return 1
else
if(!user.drop_item())
return 1
src.beaker = O
user.drop_item()
O.loc = src
update_icon()
src.updateUsrDialog()
+2 -1
View File
@@ -157,7 +157,8 @@
/obj/structure/reagent_dispensers/water_cooler/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/weapon/paper))
user.drop_item()
if(!user.drop_item())
return
qdel(I)
cups++
return
+2 -2
View File
@@ -123,9 +123,9 @@
stuff_mob_in(G.affecting, user)
return
if(!I || I.flags & NODROP) return
if(!user.drop_item())
return
user.drop_item()
I.loc = src
user.visible_message("[user.name] places \the [I] into \the [src].", \
"<span class='notice'>You place \the [I] into \the [src].</span>")
+2 -1
View File
@@ -152,9 +152,10 @@
if(O.reliability < 90 && O.crit_fail == 0)
usr << "<span class='warning'>Item is neither reliable enough or broken enough to learn from.</span>"
return
if(!user.drop_item())
return
busy = 1
loaded_item = O
user.drop_item()
O.loc = src
user << "<span class='notice'>You add the [O.name] to the machine.</span>"
flick("h_lathe_load", src)
+18 -3
View File
@@ -17,8 +17,9 @@ var/global/list/obj/machinery/message_server/message_servers = list()
var/recipient = "Unspecified" //name of the person
var/sender = "Unspecified" //name of the sender
var/message = "Blank" //transferred message
var/image/photo = null //Attached photo
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "")
/datum/data_pda_msg/New(var/param_rec = "",var/param_sender = "",var/param_message = "",var/param_photo=null)
if(param_rec)
recipient = param_rec
@@ -26,6 +27,19 @@ var/global/list/obj/machinery/message_server/message_servers = list()
sender = param_sender
if(param_message)
message = param_message
if(param_photo)
photo = param_photo
/datum/data_pda_msg/Topic(href,href_list)
..()
if(href_list["photo"])
var/mob/M = usr
M << browse_rsc(photo, "pda_photo.png")
M << browse("<html><head><title>PDA Photo</title></head>" \
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
+ "<img src='pda_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />" \
+ "</body></html>", "window=book;size=192x192")
onclose(M, "PDA Photo")
/datum/data_rc_msg
var/rec_dpt = "Unspecified" //name of the person
@@ -105,8 +119,9 @@ var/global/list/obj/machinery/message_server/message_servers = list()
/obj/machinery/message_server/proc/send_chat_message(var/sender = "", var/channel = "", var/message = "")
chat_msgs += new/datum/data_chat_msg(sender,channel,message)
/obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "")
pda_msgs += new/datum/data_pda_msg(recipient,sender,message)
/obj/machinery/message_server/proc/send_pda_message(var/recipient = "",var/sender = "",var/message = "",var/photo=null)
. = new/datum/data_pda_msg(recipient,sender,message,photo)
pda_msgs += .
/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
+2 -1
View File
@@ -157,7 +157,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else
user << "<span class='danger'>Machine cannot accept disks in that format.</span>"
return
user.drop_item()
if(!user.drop_item())
return
D.loc = src
user << "<span class='notice'>You add the disk to the machine!</span>"
else
+2 -1
View File
@@ -70,9 +70,10 @@
if(full)
user << "<span class='warning'>You can't seem to implant anything else into the [target]'s [target_zone]!</span>"
else
if(!user.drop_item())
return
user.visible_message("[user] inserts [implant] into the [target]'s [target_zone == "head" ? "brain" : target_zone]!", "<span class='notice'>You insert [implant] into the [target]'s [target_zone == "head" ? "brain" : target_zone].</span>")
implant.owner = target
implant.function()
user.drop_item()
target.internal_organs |= implant
implant.loc = target
+2 -1
View File
@@ -71,6 +71,8 @@
user << "<span class='warning'>That is the wrong robotic limb for this body part.</span>"
return 0
if(!user.drop_item())
return 0
var/mob/living/carbon/human/H = target
user.visible_message("[user] successfully augments [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You successfully augment [target]'s [parse_zone(target_zone)].</span>")
L.loc = get_turf(target)
@@ -92,7 +94,6 @@
H.organs += new /obj/item/organ/limb/robot/chest(src)
for(var/datum/disease/appendicitis/A in H.viruses) //If they already have Appendicitis, Remove it
A.cure(1)
user.drop_item()
qdel(tool)
H.update_damage_overlays(0)
H.update_augments() //Gives them the Cyber limb overlay
+1 -1
View File
@@ -21,7 +21,7 @@
PoolOrNew(/obj/effect/effect/sparks, loc)
playsound(src.loc, "sparks", 50, 1)
blink_mob(user)
user.drop_item()
user.unEquip(src)
qdel(src)
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
+2 -1
View File
@@ -58,7 +58,8 @@
if(crystals.len >= max_crystals)
user << "<span class='warning'>There are not enough crystal slots.</span>"
return
user.drop_item()
if(!user.drop_item())
return
crystals += W
W.loc = null
user.visible_message("[user] inserts [W] into \the [src]'s crystal slot.", "<span class='notice'>You insert [W] into \the [src]'s crystal slot.</span>")