Merge branch 'master' of https://github.com/tgstation/-tg-station into freshfood

Conflicts:
	code/modules/research/designs/machine_designs.dm
This commit is contained in:
Sawu
2015-01-08 03:58:31 +11:00
545 changed files with 24812 additions and 19088 deletions
+6 -6
View File
@@ -636,10 +636,10 @@ var/global/floorIsLava = 0
set category = "Server"
set desc="Delay the game start"
set name="Delay"
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
return alert("Too late... The game has already started!", null, null, null, null, null)
going = !( going )
if (!( going ))
if(ticker.current_state > GAME_STATE_PREGAME)
return alert("Too late... The game has already started!")
ticker.can_fire = !ticker.can_fire
if(!ticker.can_fire)
world << "<b>The game start has been delayed.</b>"
log_admin("[key_name(usr)] delayed the game.")
else
@@ -810,8 +810,8 @@ var/global/floorIsLava = 0
alert(usr, "You cannot manage jobs before the round starts!")
return
if(job_master)
for(var/datum/job/job in job_master.occupations)
if(SSjob)
for(var/datum/job/job in SSjob.occupations)
count++
var/J_title = html_encode(job.title)
var/J_opPos = html_encode(job.total_positions - (job.total_positions - job.current_positions))
+2 -2
View File
@@ -22,12 +22,12 @@
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","notes","ntsl","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter") )
/client/proc/investigate_show( subject in list("hrefs","notes","ntsl","singulo","wires","telesci", "gravity", "records", "cargo", "supermatter", "atmos") )
set name = "Investigate"
set category = "Admin"
if(!holder) return
switch(subject)
if("singulo", "ntsl", "wires", "telesci", "gravity", "records", "cargo", "supermatter") //general one-round-only stuff
if("singulo", "ntsl", "wires", "telesci", "gravity", "records", "cargo", "supermatter", "atmos") //general one-round-only stuff
var/F = investigate_subject2file(subject)
if(!F)
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
+37 -18
View File
@@ -18,7 +18,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
adds = init_adds
subs = init_subs
/datum/admin_rank/proc/process_keyword(word, previous_rights=0)
/proc/admin_keyword_to_flag(word, previous_rights=0)
var/flag = 0
switch(ckey(word))
if("buildmode","build") flag = R_BUILDMODE
@@ -36,22 +36,41 @@ var/list/admin_ranks = list() //list of all admin_rank datums
if("sound","sounds") flag = R_SOUNDS
if("spawn","create") flag = R_SPAWN
if("@","prev") flag = previous_rights
else
//isn't a keyword so maybe it's a verbpath?
var/path = text2path(copytext(word,2,findtext(word," ",2,0)))
if(path)
switch(text2ascii(word,1))
if(43)
if(!subs.Remove(path))
adds += path //+
if(45)
if(!adds.Remove(path))
subs += path //-
return
switch(text2ascii(word,1))
if(43) rights |= flag //+
if(45) rights &= ~flag //-
return
return flag
/proc/admin_keyword_to_path(word) //use this with verb keywords eg +/client/proc/blah
return text2path(copytext(word,2,findtext(word," ",2,0)))
// Adds/removes rights to this admin_rank
/datum/admin_rank/proc/process_keyword(word, previous_rights=0)
var/flag = admin_keyword_to_flag(word, previous_rights)
if(flag)
switch(text2ascii(word,1))
if(43) rights |= flag //+
if(45) rights &= ~flag //-
else
//isn't a keyword so maybe it's a verbpath?
var/path = admin_keyword_to_path(word)
if(path)
switch(text2ascii(word,1))
if(43)
if(!subs.Remove(path))
adds += path //+
if(45)
if(!adds.Remove(path))
subs += path //-
// Checks for (keyword-formatted) rights on this admin
/datum/admins/proc/check_keyword(word)
var/flag = admin_keyword_to_flag(word)
if(flag)
return ((rank.rights & flag) == flag) //true only if right has everything in flag
else
var/path = admin_keyword_to_path(word)
for(var/i in owner.verbs) //this needs to be a foreach loop for some reason. in operator and verbs.Find() don't work
if(i == path)
return 1
return 0
//load our rank - > rights associations
/proc/load_admin_ranks()
@@ -279,7 +298,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
var/keyword = input("Input permission keyword (one at a time):\ne.g. +BAN or -FUN or +/client/proc/someverb", "Permission toggle", null, null) as null|text
if(!keyword) return
if(!check_if_greater_rights_than_holder(D))
if(!check_keyword(keyword) || !check_if_greater_rights_than_holder(D))
message_admins("[key_name_admin(usr)] attempted to give [adm_ckey] the keyword [keyword] without sufficient rights.")
log_admin("[key_name(usr)] attempted to give [adm_ckey] the keyword [keyword] without sufficient rights.")
return
+57 -23
View File
@@ -106,7 +106,6 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
/client/proc/cmd_debug_make_powernets,
/client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists,
@@ -178,7 +177,6 @@ var/list/admin_verbs_hideable = list(
/client/proc/callproc,
/client/proc/Debug2,
/client/proc/reload_admins,
/client/proc/kill_air,
/client/proc/cmd_debug_make_powernets,
/client/proc/debug_controller,
/client/proc/startSinglo,
@@ -243,9 +241,10 @@ var/list/admin_verbs_hideable = list(
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/startSinglo,
/client/proc/ticklag,
/client/proc/fps,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest
/client/proc/cmd_admin_areatest,
/client/proc/readmin
)
if(holder)
verbs.Remove(holder.rank.adds)
@@ -482,30 +481,16 @@ var/list/admin_verbs_hideable = list(
togglebuildmode(src.mob)
feedback_add_details("admin_verb","TBMS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/kill_air()
set category = "Debug"
set name = "Kill Air"
set desc = "Toggle Air Processing"
if(kill_air)
kill_air = 0
usr << "<b>Enabled air processing.</b>"
else
kill_air = 1
usr << "<b>Disabled air processing.</b>"
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used 'kill air'.</span>")
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"
if(holder)
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.")
deadmin()
src << "<span class='interface'>You are now a normal player.</span>"
log_admin("[src] deadmined themself.")
message_admins("[src] deadmined themself.")
deadmin()
verbs += /client/proc/readmin
src << "<span class='interface'>You are now a normal player.</span>"
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_log_hrefs()
@@ -526,3 +511,52 @@ var/list/admin_verbs_hideable = list(
if(holder)
src.holder.output_ai_laws()
/client/proc/readmin()
set name = "Re-admin self"
set category = "Admin"
set desc = "Regain your admin powers."
var/list/rank_names = list()
for(var/datum/admin_rank/R in admin_ranks)
rank_names[R.name] = R
var/datum/admins/D = admin_datums[ckey]
var/rank = null
if(config.admin_legacy_system)
//load text from file
var/list/Lines = file2list("config/admins.txt")
for(var/line in Lines)
var/list/splitline = text2list(line, " = ")
if(splitline[1] == ckey)
if(splitline.len >= 2)
rank = ckeyEx(splitline[2])
break
continue
else
if(!dbcon.IsConnected())
message_admins("Warning, mysql database is not connected.")
src << "Warning, mysql database is not connected."
return
var/sql_ckey = sanitizeSQL(ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT rank FROM [format_table_name("admin")] WHERE ckey = '[sql_ckey]'")
query.Execute()
while(query.NextRow())
rank = ckeyEx(query.item[1])
if(!D)
if(rank_names[rank] == null)
var/error_extra = ""
if(!config.admin_legacy_system)
error_extra = " Check mysql DB connection."
error("Error while re-adminning [src], admin rank ([rank]) does not exist.[error_extra]")
src << "Error while re-adminning, admin rank ([rank]) does not exist.[error_extra]"
return
D = new(rank_names[rank],ckey)
var/client/C = directory[ckey]
D.associate(C)
message_admins("[src] re-adminned themselves.")
log_admin("[src] re-adminned themselves.")
feedback_add_details("admin_verb","RAS")
verbs -= /client/proc/readmin
return
else
src << "You are already an admin."
verbs -= /client/proc/readmin
return
+2
View File
@@ -45,6 +45,8 @@ var/list/admin_datums = list()
return 1 //they have no rights
if(rank.rights == 65535)
return 1 //we have all the rights
if(src == other)
return 1 //you always have more rights than yourself
if(rank.rights != other.rank.rights)
if( (rank.rights & other.rank.rights) == other.rank.rights )
return 1 //we have all the rights they have and more
+23 -1
View File
@@ -4,13 +4,35 @@
#define NOTESFILE "data/player_notes.sav" //where the player notes are saved
/proc/see_own_notes()
if(!config.see_own_notes)
return
var/ckey = usr.client.ckey
if(!ckey)
usr << "<span class='warning'>Error: No ckey found.</span>"
return
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile)
usr << "<span class='warning'>Error: Cannot access [NOTESFILE]</span>"
return
notesfile.cd = "/[ckey]"
var/dat = "<b>Notes for [ckey]:</b><br>"
while(!notesfile.eof)
var/note
notesfile >> note
dat += note
var/datum/browser/popup = new(usr, "player_notes", "Player Notes", 700, 400)
popup.set_content(dat)
popup.open()
datum/admins/proc/notes_show(var/ckey)
usr << browse("<head><title>Player Notes</title></head><body>[notes_gethtml(ckey)]</body>","window=player_notes;size=700x400")
datum/admins/proc/notes_gethtml(var/ckey)
var/savefile/notesfile = new(NOTESFILE)
if(!notesfile) return "<font color='red'>Error: Cannot access [NOTESFILE]</font>"
if(!notesfile) return "<span class='warning'>Error: Cannot access [NOTESFILE]</span>"
if(ckey)
. = "<b>Notes for <a href='?_src_=holder;notes=show'>[ckey]</a>:</b> <a href='?_src_=holder;notes=add;ckey=[ckey]'>\[+\]</a><br>"
notesfile.cd = "/[ckey]"
+3 -3
View File
@@ -370,11 +370,11 @@
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
dat += "Round Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B><BR>"
dat += "<B>Emergency shuttle</B><BR>"
if (!emergency_shuttle.online)
if(SSshuttle.emergency.mode < SHUTTLE_CALL)
dat += "<a href='?_src_=holder;call_shuttle=1'>Call Shuttle</a><br>"
else
var/timeleft = emergency_shuttle.timeleft()
if(emergency_shuttle.location == 0)
var/timeleft = SSshuttle.emergency.timeLeft()
if(SSshuttle.emergency.mode < SHUTTLE_DOCKED)
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
else
+72 -58
View File
@@ -69,7 +69,7 @@
else if(href_list["forceevent"])
var/datum/round_event_control/E = locate(href_list["forceevent"]) in events.control
var/datum/round_event_control/E = locate(href_list["forceevent"]) in SSevent.control
if(E)
var/datum/round_event/event = E.runEvent()
if(event.announceWhen>0)
@@ -182,34 +182,36 @@
switch(href_list["call_shuttle"])
if("1")
if ((!( ticker ) || emergency_shuttle.location))
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
return
emergency_shuttle.incall()
SSshuttle.emergency.request()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
if("2")
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0))
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
return
switch(emergency_shuttle.direction)
if(-1)
emergency_shuttle.incall()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
if(1)
emergency_shuttle.recall()
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
SSshuttle.emergency.cancel()
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>")
else
SSshuttle.emergency.cancel()
log_admin("[key_name(usr)] called the Emergency Shuttle")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["edit_shuttle_time"])
if(!check_rights(R_SERVER)) return
emergency_shuttle.settimeleft( input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", emergency_shuttle.timeleft() ) as num )
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]")
minor_announce("The emergency shuttle will reach its destination in [round(emergency_shuttle.timeleft()/60)] minutes.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [emergency_shuttle.timeleft()]</span>")
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num
SSshuttle.emergency.setTimer(timer*10)
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds")
minor_announce("The emergency shuttle will reach its destination in [round(SSshuttle.emergency.timeLeft(600))] minutes.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds</span>")
href_list["secretsadmin"] = "check_antagonist"
else if(href_list["delay_round_end"])
@@ -384,9 +386,6 @@
if(!M.ckey) //sanity
usr << "This mob has no ckey"
return
if(!job_master)
usr << "Job Master has not been setup!"
return
var/dat = ""
var/header = "<head><title>Job-Ban Panel: [M.name]</title></head>"
@@ -405,7 +404,7 @@
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
for(var/jobPos in command_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -426,7 +425,7 @@
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
for(var/jobPos in security_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -447,7 +446,7 @@
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
for(var/jobPos in engineering_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -468,7 +467,7 @@
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
for(var/jobPos in medical_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -489,7 +488,7 @@
jobs += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
for(var/jobPos in science_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -510,7 +509,7 @@
jobs += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
for(var/jobPos in civilian_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -531,7 +530,7 @@
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
for(var/jobPos in nonhuman_positions)
if(!jobPos) continue
var/datum/job/job = job_master.GetJob(jobPos)
var/datum/job/job = SSjob.GetJob(jobPos)
if(!job) continue
if(jobban_isbanned(M, job.title))
@@ -636,7 +635,7 @@
usr << "This can only be used on instances of type /mob"
return
if(!job_master)
if(!SSjob)
usr << "Job Master has not been setup!"
return
@@ -646,43 +645,43 @@
if("commanddept")
for(var/jobPos in command_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("securitydept")
for(var/jobPos in security_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("engineeringdept")
for(var/jobPos in engineering_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("medicaldept")
for(var/jobPos in medical_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("sciencedept")
for(var/jobPos in science_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("civiliandept")
for(var/jobPos in civilian_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
if("nonhumandept")
for(var/jobPos in nonhuman_positions)
if(!jobPos) continue
var/datum/job/temp = job_master.GetJob(jobPos)
var/datum/job/temp = SSjob.GetJob(jobPos)
if(!temp) continue
joblist += temp.title
else
@@ -1330,7 +1329,7 @@
var/Add = href_list["addjobslot"]
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in SSjob.occupations)
if(job.title == Add)
job.total_positions += 1
break
@@ -1342,7 +1341,7 @@
var/Remove = href_list["removejobslot"]
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in SSjob.occupations)
if(job.title == Remove && job.total_positions - job.current_positions > 0)
job.total_positions -= 1
break
@@ -1872,27 +1871,41 @@
if("guns")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SG")
rightandwrong(0, usr)
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")
rightandwrong(1, usr)
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(events && !events.wizardmode)
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 if(events && events.wizardmode)
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")
events.toggleWizardmode()
events.resetFrequency()
SSevent.toggleWizardmode()
SSevent.resetFrequency()
if("dorf")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","DF")
@@ -1925,7 +1938,7 @@
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 active_diseases)
for(var/datum/disease/D in SSdisease.processing)
D.cure(D)
if("list_bombers")
var/dat = "<B>Bombing List<HR>"
@@ -1944,27 +1957,28 @@
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")
var/datum/shuttle_manager/s = shuttles["mining"]
if(istype(s)) s.move_shuttle(0)
message_admins("[key_name_admin(usr)] moved mining shuttle")
log_admin("[key_name(usr)] moved the mining shuttle")
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")
var/datum/shuttle_manager/s = shuttles["laborcamp"]
if(istype(s)) s.move_shuttle(0)
message_admins("[key_name_admin(usr)] moved labor shuttle")
log_admin("[key_name(usr)] moved the labor shuttle")
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")
var/datum/shuttle_manager/s = shuttles["ferry"]
if(istype(s)) s.move_shuttle(0)
message_admins("[key_name_admin(usr)] moved the centcom ferry")
log_admin("[key_name(usr)] moved the centcom ferry")
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"])
@@ -2032,11 +2046,11 @@
usr << browse(dat, "window=admin_log")
if("list_job_debug")
var/dat = "<B>Job Debug info.</B><HR>"
if(job_master)
for(var/line in job_master.job_debug)
if(SSjob)
for(var/line in SSjob.job_debug)
dat += "[line]<BR>"
dat+= "*******<BR><BR>"
for(var/datum/job/job in job_master.occupations)
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")
@@ -2066,7 +2080,7 @@
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 = job_master.GetJob("Security Officer")
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J) return
J.total_positions = -1
J.spawn_positions = -1
+2
View File
@@ -68,6 +68,8 @@
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
msg = emoji_parse(msg)
if(C.holder)
if(holder) //both are admins
C << "<font color='red'>Admin PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
+13 -12
View File
@@ -419,7 +419,7 @@ var/global/list/g_fancy_list_of_types = null
/client/proc/cmd_debug_make_powernets()
set category = "Debug"
set name = "Make Powernets"
makepowernets()
SSpower.makepowernets()
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -611,9 +611,10 @@ var/global/list/g_fancy_list_of_types = null
var/datum/job/jobdatum
if (dresscode == "as job...")
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
jobdatum = job_master.GetJob(jobname)
if(isnull(jobname))
return
jobdatum = SSjob.GetJob(jobname)
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
for (var/obj/item/I in M)
@@ -670,7 +671,7 @@ var/global/list/g_fancy_list_of_types = null
if ("tournament chef") //Steven Seagal FTW
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/chef(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(M), slot_head)
@@ -705,7 +706,7 @@ var/global/list/g_fancy_list_of_types = null
if ("laser tag red")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/red(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/red(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/red(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/red(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/redtaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/redtag(M), slot_wear_suit)
@@ -716,7 +717,7 @@ var/global/list/g_fancy_list_of_types = null
if ("laser tag blue")
M.equip_to_slot_or_del(new /obj/item/clothing/under/color/blue(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/blue(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/blue(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/blue(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/bluetaghelm(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/bluetag(M), slot_wear_suit)
@@ -743,7 +744,7 @@ var/global/list/g_fancy_list_of_types = null
if("tunnel clown")//Tunnel clowns rule!
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
@@ -764,7 +765,7 @@ var/global/list/g_fancy_list_of_types = null
if("masked killer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
@@ -785,7 +786,7 @@ var/global/list/g_fancy_list_of_types = null
M.equip_to_slot_or_del(U, slot_w_uniform)
U.attachTie(new /obj/item/clothing/tie/waistcoat(M))
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
@@ -821,7 +822,7 @@ var/global/list/g_fancy_list_of_types = null
if("centcom official")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/centcom_officer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_com(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_belt)
@@ -951,7 +952,7 @@ var/global/list/g_fancy_list_of_types = null
if("mobster")
M.equip_to_slot_or_del(new /obj/item/clothing/head/fedora(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_ears)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/tommygun(M), slot_r_hand)
@@ -1048,8 +1049,8 @@ var/global/list/g_fancy_list_of_types = null
var/dat = "<B>List of things that failed to GC this round</B><BR><BR>"
for(var/path in garbage.logging)
dat += "[path] - [garbage.logging[path]] times<BR>"
for(var/path in SSgarbage.logging)
dat += "[path] - [SSgarbage.logging[path]] times<BR>"
usr << browse(dat, "window=dellog")
+27
View File
@@ -0,0 +1,27 @@
//replaces the old Ticklag verb, fps is easier to understand
/client/proc/fps()
set category = "Debug"
set name = "Set fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG)) return
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
if(fps <= 0)
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
return
if(fps > config.fps)
if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
return
switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Enable","Disable"))
if("Enable") config.Tickcomp = 1
else config.Tickcomp = 0
var/msg = "[key_name(src)] has modified world.fps to [fps] and config.Tickcomp to [config.Tickcomp]"
log_admin(msg, 0)
message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.fps = fps
+1 -22
View File
@@ -132,15 +132,13 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/count_objects_all
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
src.verbs += /client/proc/fps //allows you to set the ticklag.
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/cmd_admin_areatest
src.verbs += /client/proc/cmd_admin_rejuvenate
src.verbs += /datum/admins/proc/show_traitor_panel
src.verbs += /client/proc/print_jobban_old
src.verbs += /client/proc/print_jobban_old_filter
src.verbs += /client/proc/kill_pipe_processing
src.verbs += /client/proc/kill_air_processing
src.verbs += /client/proc/disable_communication
src.verbs += /client/proc/print_pointers
src.verbs += /client/proc/count_movable_instances
@@ -234,25 +232,6 @@ var/intercom_range_display_status = 0
world << "There are [count] objects of type [type_path] in the game world"
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/kill_pipe_processing()
set category = "Mapping"
set name = "Kill pipe processing"
pipe_processing_killed = !pipe_processing_killed
if(pipe_processing_killed)
message_admins("[src.ckey] used 'kill pipe processing', stopping all pipe processing.")
else
message_admins("[src.ckey] used 'kill pipe processing', restoring all pipe processing.")
/client/proc/kill_air_processing()
set category = "Mapping"
set name = "Kill air processing"
air_processing_killed = !air_processing_killed
if(air_processing_killed)
message_admins("[src.ckey] used 'kill air processing', stopping all air processing.")
else
message_admins("[src.ckey] used 'kill air processing', restoring all air processing.")
//This proc is intended to detect lag problems relating to communication procs
var/global/say_disabled = 0
+1 -1
View File
@@ -13,7 +13,7 @@ var/sound/admin_sound
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]")
if(events.holiday == "April Fool's Day")
if(SSevent.holiday == "April Fool's Day")
admin_sound.frequency = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
src << "You feel the Honkmother messing with your song..."
+7 -7
View File
@@ -315,7 +315,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Now for special roles and equipment.
switch(new_character.mind.special_role)
if("traitor")
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
ticker.mode.equip_traitor(new_character)
if("Wizard")
new_character.loc = pick(wizardstart)
@@ -354,7 +354,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(new_character.mind.special_role=="traitor")
ticker.mode.add_law_zero(new_character)
else
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
//Announces the character on all the systems, based on the record.
if(!issilicon(new_character))//If they are not a cyborg/AI.
@@ -671,7 +671,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
set category = "Admin"
set name = "Call Shuttle"
if ((!( ticker ) || emergency_shuttle.location))
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
return
if (!holder)
@@ -684,11 +684,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
if(choice == "Confirm")
emergency_shuttle.fake_recall = rand(300,500)
SSshuttle.emergencyFakeRecall = rand(0.5,0.9)
else
return
emergency_shuttle.incall()
SSshuttle.emergency.request()
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
@@ -700,10 +700,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(0)) return
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
if(!ticker || emergency_shuttle.location || emergency_shuttle.direction == 0)
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
return
emergency_shuttle.recall()
SSshuttle.emergency.cancel()
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
-24
View File
@@ -1,24 +0,0 @@
//Merged Doohl's and the existing ticklag as they both had good elements about them ~Carn
/client/proc/ticklag()
set category = "Debug"
set name = "Set Ticklag"
set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9"
if(!check_rights(R_DEBUG)) return
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
//I've used ticks of 2 before to help with serious singulo lags
if(newtick && newtick <= 2 && newtick > 0)
log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0)
world.tick_lag = newtick
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No"))
if("Yes") config.Tickcomp = 1
else config.Tickcomp = 0
else
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
+12 -14
View File
@@ -6,17 +6,15 @@
usr << "This option is currently only usable during pregame. This may change at a later date."
return
if(job_master && ticker)
var/datum/job/job = job_master.GetJob("AI")
if(!job)
usr << "Unable to locate the AI job"
return
if(ticker.triai)
ticker.triai = 0
usr << "Only one AI will be spawned at round start."
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled off triple AIs at round start.</span>")
else
ticker.triai = 1
usr << "There will be an AI Triumvirate at round start."
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled on triple AIs at round start.</span>")
return
var/datum/job/job = SSjob.GetJob("AI")
if(!job)
usr << "Unable to locate the AI job"
return
if(ticker.triai)
ticker.triai = 0
usr << "Only one AI will be spawned at round start."
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled off triple AIs at round start.</span>")
else
ticker.triai = 1
usr << "There will be an AI Triumvirate at round start."
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has toggled on triple AIs at round start.</span>")
+22 -84
View File
@@ -24,30 +24,9 @@
var/const/WIRE_RADIO_RECEIVE = 8 //Allows Pulsed(1) to call Activate()
var/const/WIRE_RADIO_PULSE = 16 //Allows Pulse(1) to send a radio message
/obj/item/device/assembly/proc/activate() //What the device does when turned on
return
/obj/item/device/assembly/proc/pulsed(var/radio = 0) //Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
return
/obj/item/device/assembly/proc/pulse(var/radio = 0) //Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
return
/obj/item/device/assembly/proc/toggle_secure() //Code that has to happen when the assembly is un\secured goes here
return
/obj/item/device/assembly/proc/attach_assembly(var/obj/A, var/mob/user) //Called when an assembly is attacked by another
return
/obj/item/device/assembly/proc/process_cooldown() //Called via spawn(10) to have it count down the cooldown var
return
/obj/item/device/assembly/proc/holder_movement() //Called when the holder is moved
return
/obj/item/device/assembly/interact(mob/user as mob) //Called when attack_self is called
return
/obj/item/device/assembly/proc/describe() // Called by grenades to describe the state of the trigger (time left, etc)
return "The trigger assembly looks broken!"
@@ -59,16 +38,18 @@
return 1
/obj/item/device/assembly/process_cooldown()
//Called via spawn(10) to have it count down the cooldown var
/obj/item/device/assembly/proc/process_cooldown()
cooldown--
if(cooldown <= 0) return 0
if(cooldown <= 0)
return 0
spawn(10)
process_cooldown()
return 1
/obj/item/device/assembly/pulsed(var/radio = 0)
//Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
/obj/item/device/assembly/proc/pulsed(var/radio = 0)
if(holder && (wires & WIRE_RECEIVE))
activate()
if(radio && (wires & WIRE_RADIO_RECEIVE))
@@ -76,48 +57,41 @@
return 1
/obj/item/device/assembly/pulse(var/radio = 0)
//Called when this device attempts to act on another device, var/radio determines if it was sent via radio or direct
/obj/item/device/assembly/proc/pulse(var/radio = 0)
if(holder && (wires & WIRE_PULSE))
holder.process_activation(src, 1, 0)
if(holder && (wires & WIRE_PULSE_SPECIAL))
holder.process_activation(src, 0, 1)
if(istype(loc,/obj/item/weapon/grenade)) // This is a hack. Todo: Manage this better -Sayu
var/obj/item/weapon/grenade/G = loc
G.prime() // Adios, muchachos
// if(radio && (wires & WIRE_RADIO_PULSE))
//Not sure what goes here quite yet send signal?
return 1
/obj/item/device/assembly/activate()
if(!secured || (cooldown > 0)) return 0
// What the device does when turned on
/obj/item/device/assembly/proc/activate()
if(!secured || (cooldown > 0))
return 0
cooldown = 2
spawn(10)
process_cooldown()
return 1
/obj/item/device/assembly/toggle_secure()
/obj/item/device/assembly/proc/toggle_secure()
secured = !secured
update_icon()
return secured
/obj/item/device/assembly/attach_assembly(var/obj/item/device/assembly/A, var/mob/user)
holder = new/obj/item/device/assembly_holder(get_turf(src))
if(holder.attach(A,src,user))
user << "<span class='notice'>You attach \the [A] to \the [src]!</span>"
return 1
return 0
/obj/item/device/assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(isassembly(W))
var/obj/item/device/assembly/A = W
if((!A.secured) && (!secured))
attach_assembly(A,user)
return
holder = new/obj/item/device/assembly_holder(get_turf(src))
holder.assemble(src,A,user)
user << "<span class='notice'>You attach and secure \the [A] to \the [src]!</span>"
else
user << "<span class='warning'>Both devices must be in attachable mode to be attached together.</span>"
return
if(istype(W, /obj/item/weapon/screwdriver))
if(toggle_secure())
user << "<span class='notice'>\The [src] is ready!</span>"
@@ -129,7 +103,7 @@
/obj/item/device/assembly/process()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return
@@ -142,7 +116,8 @@
/obj/item/device/assembly/attack_self(mob/user as mob)
if(!user) return 0
if(!user)
return 0
user.set_machine(src)
interact(user)
return 1
@@ -151,40 +126,3 @@
/obj/item/device/assembly/interact(mob/user as mob)
return //HTML MENU FOR WIRES GOES HERE
/*
var/small_icon_state = null//If this obj will go inside the assembly use this for icons
var/list/small_icon_state_overlays = null//Same here
var/obj/holder = null
var/cooldown = 0//To prevent spam
proc
Activate()//Called when this assembly is pulsed by another one
Process_cooldown()//Call this via spawn(10) to have it count down the cooldown var
Attach_Holder(var/obj/H, var/mob/user)//Called when an assembly holder attempts to attach, sets src's loc in here
Activate()
if(cooldown > 0)
return 0
cooldown = 2
spawn(10)
Process_cooldown()
//Rest of code here
return 0
Process_cooldown()
cooldown--
if(cooldown <= 0) return 0
spawn(10)
Process_cooldown()
return 1
Attach_Holder(var/obj/H, var/mob/user)
if(!H) return 0
if(!H.IsAssemblyHolder()) return 0
//Remember to have it set its loc somewhere in here
*/
-2
View File
@@ -87,8 +87,6 @@
/obj/item/weapon/tank/proc/bomb_assemble(W,user) //Bomb assembly proc. This turns assembly+tank into a bomb
var/obj/item/device/assembly_holder/S = W
var/mob/M = user
if(!S.secured) //Check if the assembly is secured
return
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
+38 -72
View File
@@ -9,37 +9,29 @@
throw_speed = 2
throw_range = 7
var/secured = 0
var/obj/item/device/assembly/a_left = null
var/obj/item/device/assembly/a_right = null
/obj/item/device/assembly_holder/proc/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
return
/obj/item/device/assembly_holder/proc/process_activation(var/obj/item/device/D)
return
/obj/item/device/assembly_holder/IsAssemblyHolder()
return 1
/obj/item/device/assembly_holder/attach(var/obj/item/device/D, var/obj/item/device/D2, var/mob/user)
if((!D)||(!D2)) return 0
if((!isassembly(D))||(!isassembly(D2))) return 0
if((D:secured)||(D2:secured)) return 0
if(user)
user.remove_from_mob(D)
user.remove_from_mob(D2)
D:holder = src
D2:holder = src
D.loc = src
D2.loc = src
a_left = D
a_right = D2
name = "[D.name]-[D2.name] assembly"
/obj/item/device/assembly_holder/proc/assemble(var/obj/item/device/assembly/A, var/obj/item/device/assembly/A2, var/mob/user)
attach(A,user)
attach(A2,user)
name = "[A.name]-[A2.name] assembly"
update_icon()
return 1
/obj/item/device/assembly_holder/proc/attach(var/obj/item/device/assembly/A, var/mob/user)
if(user)
user.remove_from_mob(A)
A.holder = src
A.loc = src
A.toggle_secure()
if(!a_left)
a_left = A
else
a_right = A
/obj/item/device/assembly_holder/update_icon()
overlays.Cut()
@@ -54,16 +46,6 @@
if(master)
master.update_icon()
/obj/item/device/assembly_holder/examine(mob/user)
..()
if(secured)
user << "\The [src] is secured and ready to be used."
else
user << "\The [src] can be attached to other things."
/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
if(a_left)
a_left.HasProximity(AM)
@@ -88,7 +70,7 @@
if(a_left && a_right)
a_left.holder_movement()
a_right.holder_movement()
return
return
/obj/item/device/assembly_holder/attack_hand()//Perhapse this should be a holder_pickup proc instead, can add if needbe I guess
if(a_left && a_right)
@@ -97,55 +79,39 @@
..()
return
/obj/item/device/assembly_holder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
if(!a_left || !a_right)
user << "<span class='danger'>BUG:Assembly part missing, please report this!</span>"
return
a_left.toggle_secure()
a_right.toggle_secure()
secured = !secured
if(secured)
user << "<span class='notice'>\The [src] is ready!</span>"
else
user << "<span class='notice'>\The [src] can now be taken apart!</span>"
update_icon()
return
var/turf/T = get_turf(src)
if(!T)
return 0
if(a_left)
a_left.holder = null
a_left.loc = T
if(a_right)
a_right.holder = null
a_right.loc = T
qdel(src)
else
..()
return
/obj/item/device/assembly_holder/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(src.secured)
if(!a_left || !a_right)
user << "<span class='danger'>Assembly part missing!</span>"
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(alert("Which side would you like to use?",,"Left","Right"))
if("Left") a_left.attack_self(user)
if("Right") a_right.attack_self(user)
return
else
a_left.attack_self(user)
a_right.attack_self(user)
if(!a_left || !a_right)
user << "<span class='danger'>Assembly part missing!</span>"
return
if(istype(a_left,a_right.type))//If they are the same type it causes issues due to window code
switch(alert("Which side would you like to use?",,"Left","Right"))
if("Left") a_left.attack_self(user)
if("Right") a_right.attack_self(user)
return
else
var/turf/T = get_turf(src)
if(!T) return 0
if(a_left)
a_left:holder = null
a_left.loc = T
if(a_right)
a_right:holder = null
a_right.loc = T
qdel(src)
return
a_left.attack_self(user)
a_right.attack_self(user)
/obj/item/device/assembly_holder/process_activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D) return 0
/obj/item/device/assembly_holder/proc/process_activation(var/obj/D, var/normal = 1, var/special = 1)
if(!D)
return 0
if((normal) && (a_right) && (a_left))
if(a_right != D)
a_right.pulsed(0)
+2 -2
View File
@@ -23,11 +23,11 @@
/obj/item/device/assembly/infra/toggle_secure()
secured = !secured
if(secured)
processing_objects.Add(src)
SSobj.processing.Add(src)
else
on = 0
if(first) qdel(first)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
update_icon()
return secured
+5 -5
View File
@@ -18,7 +18,7 @@
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
if((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY && prob(50))
user << "Your hand slips, setting off the trigger."
pulse(0)
update_icon()
@@ -65,11 +65,11 @@
pulse(0)
/obj/item/device/assembly/mousetrap/attack_self(mob/living/user as mob)
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user as mob)
if(!armed)
user << "<span class='notice'>You arm [src].</span>"
else
if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
@@ -83,9 +83,9 @@
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/user as mob)
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user as mob)
if(armed)
if(((user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
if(((user.getBrainLoss() >= 60) || user.disabilities & CLUMSY) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
+2 -2
View File
@@ -30,11 +30,11 @@
/obj/item/device/assembly/prox_sensor/toggle_secure()
secured = !secured
if(secured)
processing_objects.Add(src)
SSobj.processing.Add(src)
else
scanning = 0
timing = 0
processing_objects.Remove(src)
SSobj.processing.Remove(src)
update_icon()
return secured
+2 -2
View File
@@ -26,10 +26,10 @@
/obj/item/device/assembly/timer/toggle_secure()
secured = !secured
if(secured)
processing_objects.Add(src)
SSobj.processing.Add(src)
else
timing = 0
processing_objects.Remove(src)
SSobj.processing.Remove(src)
update_icon()
return secured
+7 -7
View File
@@ -130,7 +130,7 @@
corpsegloves = /obj/item/clothing/gloves/combat
corpseradio = /obj/item/device/radio/headset
corpsemask = /obj/item/clothing/mask/gas
corpsehelmet = /obj/item/clothing/head/helmet/swat/syndicate
corpsehelmet = /obj/item/clothing/head/helmet/swat
corpseback = /obj/item/weapon/storage/backpack
corpseid = 1
corpseidjob = "Operative"
@@ -157,17 +157,17 @@
///////////Civilians//////////////////////
/obj/effect/landmark/corpse/chef
name = "Chef"
/obj/effect/landmark/corpse/cook
name = "Cook"
corpseuniform = /obj/item/clothing/under/rank/chef
corpsesuit = /obj/item/clothing/suit/chef/classic
corpsesuit = /obj/item/clothing/suit/apron/chef
corpseshoes = /obj/item/clothing/shoes/sneakers/black
corpsehelmet = /obj/item/clothing/head/chefhat
corpseback = /obj/item/weapon/storage/backpack
corpseradio = /obj/item/device/radio/headset
corpseid = 1
corpseidjob = "Chef"
corpseidaccess = "Chef"
corpseidjob = "Cook"
corpseidaccess = "Cook"
/obj/effect/landmark/corpse/doctor
@@ -189,7 +189,7 @@
corpseback = /obj/item/weapon/storage/backpack/industrial
corpseshoes = /obj/item/clothing/shoes/sneakers/orange
corpsebelt = /obj/item/weapon/storage/belt/utility/full
corpsegloves = /obj/item/clothing/gloves/yellow
corpsegloves = /obj/item/clothing/gloves/color/yellow
corpsehelmet = /obj/item/clothing/head/hardhat
corpseid = 1
corpseidjob = "Station Engineer"
+25 -42
View File
@@ -2,6 +2,9 @@
//SS13 Optimized Map loader
//////////////////////////////////////////////////////////////
//global datum that will preload variables on atoms instanciation
var/global/dmm_suite/preloader/_preloader = null
/**
* Construct the model map and control the loading process
@@ -163,7 +166,7 @@
//first instance the /area and remove it from the members list
index = members.len
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
_preloader = new(members_attributes[index])//preloader for assigning set variables on atom creation
instance = locate(members[index])
instance.contents.Add(locate(xcrd,ycrd,zcrd))
@@ -191,34 +194,6 @@
T = UT
index++
//Replace the previous part of the code with this if it's unsafe to assume tiles have ALWAYS an /area AND a /turf
/*while(members.len > 0)
var/length = members.len
var/member = members[length]
if(ispath(member,/area))
var/atom/instance
var/dmm_suite/preloader/_preloader = new(members_attributes[length])
instance = locate(member)
instance.contents.Add(locate(xcrd,ycrd,zcrd))
if(_preloader && instance)
_preloader.load(instance)
members.Remove(member)
continue
else if(ispath(member,/turf))
instance_atom(member,members_attributes[length],xcrd,ycrd,zcrd)
members.Remove(member)
continue
else
break
*/
//finally instance all remainings objects/mobs
for(index=1,index < first_turf_index,index++)
instance_atom(members[index],members_attributes[index],xcrd,ycrd,zcrd)
@@ -230,11 +205,11 @@
//Instance an atom at (x,y,z) and gives it the variables in attributes
/dmm_suite/proc/instance_atom(var/path,var/list/attributes, var/x, var/y, var/z)
var/atom/instance
var/dmm_suite/preloader/_preloader = new(attributes)
_preloader = new(attributes, path)
instance = new path (locate(x,y,z), _preloader)//first preloader pass
instance = new path (locate(x,y,z))//first preloader pass
if(_preloader && instance)//second preloader pass, as some variables may have been reset/changed by New()
if(_preloader && instance)//second preloader pass, for those atoms that don't ..() in New()
_preloader.load(instance)
return instance
@@ -242,9 +217,9 @@
//text trimming (both directions) helper proc
//optionally removes quotes before and after the text (for variable name)
/dmm_suite/proc/trim_text(var/what as text,var/trim_quotes=0)
while(length(what) && (findtext(what," ",1,2)))// || findtext(what,quote,1,2)))
while(length(what) && (findtext(what," ",1,2)))
what=copytext(what,2,0)
while(length(what) && (findtext(what," ",length(what),0)))// || findtext(what,quote,length(what),0)))
while(length(what) && (findtext(what," ",length(what),0)))
what=copytext(what,1,length(what))
if(trim_quotes)
while(length(what) && (findtext(what,quote,1,2)))
@@ -298,14 +273,18 @@
else if(isnum(text2num(trim_right)))
trim_right = text2num(trim_right)
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
//Check for null
else if(trim_right == "null")
trim_right = null
//Check for list
else if(copytext(trim_right,1,5) == "list")
trim_right = text2list(copytext(trim_right,6,length(trim_right)))
//Check for file
else if(copytext(trim_right,1,2) == "'")
trim_right = file(copytext(trim_right,2,length(trim_right)))
to_return[trim_left] = trim_right
else//simple var
@@ -323,10 +302,11 @@
placed.opacity = 1
placed.underlays += turfs_underlays
//atom creation method that preloads variables before creation
/atom/New(atom/loc, dmm_suite/preloader/_dmm_preloader)
if(istype(_dmm_preloader, /dmm_suite/preloader))
_dmm_preloader.load(src)
//atom creation method that preloads variables at creation
/atom/New()
if(_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
_preloader.load(src)
. = ..()
//////////////////
@@ -336,12 +316,15 @@
/dmm_suite/preloader
parent_type = /datum
var/list/attributes
var/target_path
/dmm_suite/preloader/New(list/the_attributes)
/dmm_suite/preloader/New(var/list/the_attributes, var/path)
.=..()
if(!the_attributes.len)
Del()
return
attributes = the_attributes
target_path = path
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
@@ -163,7 +163,7 @@ var/sc_safecode5 = "[rand(0,9)]"
desc = "Your body becomes weak and your feel your mind slipping away as you try to comprehend what you know can't be possible."
move_self = 0 //Contianed narsie does not move!
grav_pull = 0 //Contained narsie does not pull stuff in!
var/uneatable = list(/turf/space, /obj/effect/overlay, /mob/living/simple_animal/construct)
//Override this to prevent no adminlog runtimes and admin warnings about a singularity without containment
/obj/singularity/narsie/sc_Narsie/admin_investigate_setup()
return
@@ -77,18 +77,9 @@
if("Power")
user << "<B>Your wish is granted, but at a terrible cost...</B>"
user << "The Wish Granter punishes you for your selfishness, claiming your soul and warping your body to match the darkness in your heart."
if (!(LASER in user.mutations))
user.mutations.Add(LASER)
user << "<span class='notice'>You feel pressure building behind your eyes.</span>"
if (!(COLD_RESISTANCE in user.mutations))
user.mutations.Add(COLD_RESISTANCE)
user << "<span class='notice'>Your body feels warm.</span>"
if (!(XRAY in user.mutations))
user.mutations.Add(XRAY)
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
user << "<span class='notice'>The walls suddenly disappear.</span>"
user.dna.add_mutation(LASEREYES)
user.dna.add_mutation(COLDRES)
user.dna.add_mutation(XRAY)
user.dna.species = new /datum/species/shadow()
user.regenerate_icons()
if("Wealth")
+7 -2
View File
@@ -133,6 +133,7 @@ var/next_external_rsc = 0
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
src << "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>"
add_verbs_from_config()
set_client_age_from_db()
if (!ticker || ticker.current_state == GAME_STATE_PREGAME)
@@ -210,7 +211,7 @@ var/next_external_rsc = 0
var/sql_admin_rank = sanitizeSQL(admin_rank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid)")
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
query_insert.Execute()
//Logging player access
@@ -218,6 +219,10 @@ var/next_external_rsc = 0
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
query_accesslog.Execute()
/client/proc/add_verbs_from_config()
if(config.see_own_notes)
verbs += /client/proc/self_notes
#undef TOPIC_SPAM_DELAY
#undef UPLOAD_LIMIT
@@ -306,4 +311,4 @@ var/next_external_rsc = 0
'icons/stamp_icons/large_stamp-cap.png',
'icons/stamp_icons/large_stamp-qm.png',
'icons/stamp_icons/large_stamp-law.png'
)
)
+20 -5
View File
@@ -49,6 +49,7 @@ datum/preferences
var/blood_type = "A+" //blood type (not-chooseable)
var/underwear = "Nude" //underwear type
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = 2 //backpack type
var/hair_style = "Bald" //Hair type
var/hair_color = "000" //Hair color
@@ -178,6 +179,7 @@ datum/preferences
dat += "<b>Skin Tone:</b><BR><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbaglist[backbag]]</a><BR>"
@@ -272,12 +274,12 @@ datum/preferences
dat += "</center>"
//user << browse(dat, "window=preferences;size=560x560")
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 580, 620)
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 680)
popup.set_content(dat)
popup.open(0)
proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620)
if(!job_master) return
if(!SSjob) return
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
//splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice.
@@ -298,7 +300,7 @@ datum/preferences
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
for(var/datum/job/job in job_master.occupations)
for(var/datum/job/job in SSjob.occupations)
index += 1
if((index >= limit) || (job.title in splitJobs))
@@ -451,9 +453,9 @@ datum/preferences
return 0
proc/UpdateJobPreference(mob/user, role, desiredLvl)
if(!job_master)
if(!SSjob)
return
var/datum/job/job = job_master.GetJob(role)
var/datum/job/job = SSjob.GetJob(role)
if(!job)
user << browse(null, "window=mob_occupation")
@@ -565,6 +567,8 @@ datum/preferences
underwear = random_underwear(gender)
if("undershirt")
undershirt = random_undershirt(gender)
if("socks")
socks = random_socks(gender)
if("eyes")
eye_color = random_eye_color()
if("s_tone")
@@ -669,6 +673,15 @@ datum/preferences
if(new_undershirt)
undershirt = new_undershirt
if("socks")
var/new_socks
if(gender == MALE)
new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_m
else
new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in socks_f
if(new_socks)
socks = new_socks
if("eyes")
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference") as color|null
if(new_eyes)
@@ -724,6 +737,7 @@ datum/preferences
gender = MALE
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks(gender)
facial_hair_style = random_facial_hair_style(gender)
hair_style = random_hair_style(gender)
@@ -832,6 +846,7 @@ datum/preferences
character.facial_hair_style = facial_hair_style
character.underwear = underwear
character.undershirt = undershirt
character.socks = socks
if(backbag > 3 || backbag < 1)
backbag = 1 //Same as above
@@ -180,6 +180,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] >> facial_hair_style
S["underwear"] >> underwear
S["undershirt"] >> undershirt
S["socks"] >> socks
S["backbag"] >> backbag
S["mutant_color"] >> mutant_color
@@ -213,11 +214,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_male_list)
underwear = sanitize_inlist(underwear, underwear_m)
undershirt = sanitize_inlist(undershirt, undershirt_m)
socks = sanitize_inlist(socks, socks_m)
else
hair_style = sanitize_inlist(hair_style, hair_styles_female_list)
facial_hair_style = sanitize_inlist(facial_hair_style, facial_hair_styles_female_list)
underwear = sanitize_inlist(underwear, underwear_f)
undershirt = sanitize_inlist(undershirt, undershirt_f)
socks = sanitize_inlist(socks, socks_f)
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
hair_color = sanitize_hexcolor(hair_color, 3, 0)
@@ -263,6 +266,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["facial_style_name"] << facial_hair_style
S["underwear"] << underwear
S["undershirt"] << undershirt
S["socks"] << socks
S["backbag"] << backbag
S["species"] << pref_species.name
S["mutant_color"] << mutant_color
+18 -16
View File
@@ -274,22 +274,24 @@ atom/proc/generate_female_clothing(index,t_color,icon)
if(src.has_sensor <= 0)
usr << "This suit does not have any sensors."
return 0
src.sensor_mode += 1
if(src.sensor_mode > 3)
src.sensor_mode = 0
switch(src.sensor_mode)
if(0)
M << "You disable your suit's remote sensing equipment."
if(1)
M << "Your suit will now report whether you are live or dead."
if(2)
M << "Your suit will now report your vital lifesigns."
if(3)
M << "Your suit will now report your vital lifesigns as well as your coordinate position."
if(istype(loc,/mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
if(H.w_uniform == src)
H.update_suit_sensors()
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
if(get_dist(usr, src) > 1)
usr << "You have moved too far away."
return
sensor_mode = modes.Find(switchMode) - 1
if (src.loc == usr)
switch(sensor_mode)
if(0)
usr << "You disable your suit's remote sensing equipment."
if(1)
usr << "Your suit will now only report whether you are alive or dead."
if(2)
usr << "Your suit will now only report your exact vital lifesigns."
if(3)
usr << "Your suit will now report your exact vital lifesigns as well as your coordinate position."
..()
/obj/item/clothing/under/verb/rolldown()
+2 -2
View File
@@ -126,9 +126,9 @@
if(M.glasses == src)
M.eye_blind = 3
M.eye_blurry = 5
M.disabilities |= NEARSIGHTED
M.disabilities |= NEARSIGHT
spawn(100)
M.disabilities &= ~NEARSIGHTED
M.disabilities &= ~NEARSIGHT
..()
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
-10
View File
@@ -17,13 +17,3 @@
/obj/item/clothing/gloves/boxing/yellow
icon_state = "boxingyellow"
item_state = "boxingyellow"
/obj/item/clothing/gloves/white
name = "white gloves"
desc = "These look pretty fancy."
icon_state = "latex"
item_state = "lgloves"
item_color="mime"
redcoat
item_color = "redcoat" //Exists for washing machines. Is not different from white gloves in any way.
+76 -34
View File
@@ -1,4 +1,4 @@
/obj/item/clothing/gloves/yellow
/obj/item/clothing/gloves/color/yellow
desc = "These gloves will protect the wearer from electric shock."
name = "insulated gloves"
icon_state = "yellow"
@@ -7,118 +7,160 @@
permeability_coefficient = 0.05
item_color="yellow"
/obj/item/clothing/gloves/fyellow //Cheap Chinese Crap
/obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap
desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly."
name = "budget insulated gloves"
icon_state = "yellow"
item_state = "ygloves"
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
permeability_coefficient = 0.05
item_color="yellow"
New()
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
/obj/item/clothing/gloves/color/fyellow/New()
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
/obj/item/clothing/gloves/black
/obj/item/clothing/gloves/color/black
desc = "These gloves are fire-resistant."
name = "black gloves"
icon_state = "black"
item_state = "bgloves"
item_color="brown"
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
hos
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
/obj/item/clothing/gloves/color/black/hos
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
ce
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
/obj/item/clothing/gloves/color/black/ce
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
/obj/item/clothing/gloves/black/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/clothing/gloves/color/black/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wirecutters))
user << "<span class='notice'>You snip the fingertips off of [src].</span>"
playsound(user.loc,'sound/items/Wirecutter.ogg', rand(10,50), 1)
var/obj/item/clothing/gloves/fingerless/fingerless_gloves = new /obj/item/clothing/gloves/fingerless(user.loc)
fingerless_gloves.icon_state = icon_state
qdel(src)
if(icon_state == initial(icon_state)) //only if not dyed
user << "<span class='notice'>You snip the fingertips off of [src].</span>"
playsound(user.loc,'sound/items/Wirecutter.ogg', rand(10,50), 1)
new /obj/item/clothing/gloves/fingerless(user.loc)
qdel(src)
..()
/obj/item/clothing/gloves/orange
/obj/item/clothing/gloves/color/orange
name = "orange gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "orange"
item_state = "orangegloves"
item_color="orange"
/obj/item/clothing/gloves/red
/obj/item/clothing/gloves/color/red
name = "red gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "red"
item_state = "redgloves"
item_color = "red"
/obj/item/clothing/gloves/rainbow
/obj/item/clothing/gloves/color/rainbow
name = "rainbow gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "rainbow"
item_state = "rainbowgloves"
item_color = "rainbow"
clown
item_color = "clown"
/obj/item/clothing/gloves/color/rainbow/clown
item_color = "clown"
/obj/item/clothing/gloves/blue
/obj/item/clothing/gloves/color/blue
name = "blue gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "blue"
item_state = "bluegloves"
item_color="blue"
/obj/item/clothing/gloves/purple
/obj/item/clothing/gloves/color/purple
name = "purple gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "purple"
item_state = "purplegloves"
item_color="purple"
/obj/item/clothing/gloves/green
/obj/item/clothing/gloves/color/green
name = "green gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "green"
item_state = "greengloves"
item_color="green"
/obj/item/clothing/gloves/grey
/obj/item/clothing/gloves/color/grey
name = "grey gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "gray"
item_state = "graygloves"
item_color="grey"
rd
item_color = "director" //Exists for washing machines. Is not different from gray gloves in any way.
/obj/item/clothing/gloves/color/grey/rd
item_color = "director" //Exists for washing machines. Is not different from gray gloves in any way.
hop
item_color = "hop" //Exists for washing machines. Is not different from gray gloves in any way.
/obj/item/clothing/gloves/color/grey/hop
item_color = "hop" //Exists for washing machines. Is not different from gray gloves in any way.
/obj/item/clothing/gloves/light_brown
/obj/item/clothing/gloves/color/light_brown
name = "light brown gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "lightbrown"
item_state = "lightbrowngloves"
item_color="light brown"
/obj/item/clothing/gloves/brown
/obj/item/clothing/gloves/color/brown
name = "brown gloves"
desc = "A pair of gloves, they don't look special in any way."
icon_state = "brown"
item_state = "browngloves"
item_color="brown"
cargo
item_color = "cargo" //Exists for washing machines. Is not different from brown gloves in any way.
/obj/item/clothing/gloves/color/brown/cargo
item_color = "cargo" //Exists for washing machines. Is not different from brown gloves in any way.
/obj/item/clothing/gloves/color/captain
desc = "Regal blue gloves, with a nice gold trim. Swanky."
name = "captain's gloves"
icon_state = "captain"
item_state = "egloves"
item_color = "captain"
siemens_coefficient = 0
permeability_coefficient = 0.05
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
strip_delay = 60
/obj/item/clothing/gloves/color/latex
name = "latex gloves"
desc = "Cheap sterile gloves made from latex."
icon_state = "latex"
item_state = "lgloves"
siemens_coefficient = 0.30
permeability_coefficient = 0.01
item_color="white"
transfer_prints = TRUE
/obj/item/clothing/gloves/color/latex/cmo
item_color = "medical" //Exists for washing machines. Is not different from latex gloves in any way.
/obj/item/clothing/gloves/color/latex/nitrile
name = "nitrile gloves"
desc = "Pricy sterile gloves that are stronger than latex."
icon_state = "nitrile"
item_state = "nitrilegloves"
transfer_prints = FALSE
/obj/item/clothing/gloves/color/white
name = "white gloves"
desc = "These look pretty fancy."
icon_state = "white"
item_state = "wgloves"
item_color="mime"
/obj/item/clothing/gloves/color/white/redcoat
item_color = "redcoat" //Exists for washing machines. Is not different from white gloves in any way.
+21 -47
View File
@@ -1,42 +1,15 @@
/obj/item/clothing/gloves/captain
desc = "Regal blue gloves, with a nice gold trim. Swanky."
name = "captain's gloves"
icon_state = "captain"
item_state = "egloves"
item_color = "captain"
siemens_coefficient = 0
permeability_coefficient = 0.05
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
strip_delay = 60
/obj/item/clothing/gloves/combat
name = "combat gloves"
desc = "These tactical gloves are fireproof and shock resistant."
icon_state = "black"
item_state = "bgloves"
siemens_coefficient = 0
permeability_coefficient = 0.05
strip_delay = 80
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
/obj/item/clothing/gloves/latex
name = "latex gloves"
desc = "Sterile latex gloves."
icon_state = "latex"
item_state = "lgloves"
siemens_coefficient = 0.30
permeability_coefficient = 0.01
item_color="white"
/obj/item/clothing/gloves/fingerless
name = "fingerless gloves"
desc = "Plain black gloves without fingertips for the hard working."
icon_state = "fingerless"
item_state = "fingerless"
item_color = null //So they don't wash.
transfer_prints = TRUE
cmo
item_color = "medical" //Exists for washing machines. Is not different from latex gloves in any way.
strip_delay = 40
put_on_delay = 20
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
/obj/item/clothing/gloves/botanic_leather
name = "botanist's leather gloves"
@@ -49,14 +22,15 @@
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
/obj/item/clothing/gloves/fingerless
name = "fingerless gloves"
desc = "Plain black gloves without fingertips for the hard working."
icon_state = "fingerless"
item_state = "fingerless"
item_color = null //So they don't wash.
transfer_prints = TRUE
strip_delay = 40
put_on_delay = 20
/obj/item/clothing/gloves/combat
name = "combat gloves"
desc = "These tactical gloves are fireproof and shock resistant."
icon_state = "black"
item_state = "bgloves"
siemens_coefficient = 0
permeability_coefficient = 0.05
strip_delay = 80
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
heat_protection = HANDS
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
-13
View File
@@ -54,19 +54,6 @@
max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT
strip_delay = 80
/obj/item/clothing/head/helmet/bulletproof
name = "tactical helmet"
desc = "An advanced helmet designed to protect against traditional projectile weaponry and explosives."
icon_state = "bulletproof"
armor = list(melee = 25, bullet = 60, laser = 25, energy = 10, bomb = 40, bio = 0, rad = 0)
strip_delay = 70
/obj/item/clothing/head/helmet/swat/syndicate
name = "blood-red helmet"
desc = "An extremely robust, space-worthy helmet that lacks a visor to allow for goggle usage underneath. Property of Gorlex Marauders."
icon_state = "helmetsyndi"
item_state = "helmet"
/obj/item/clothing/head/helmet/thunderdome
name = "\improper Thunderdome helmet"
desc = "<i>'Let the battle commence!'</i>"
+2 -2
View File
@@ -55,7 +55,7 @@
/obj/item/clothing/head/cakehat/process()
if(!onfire)
processing_objects.Remove(src)
SSobj.processing.Remove(src)
return
var/turf/location = src.loc
@@ -74,7 +74,7 @@
src.force = 3
src.damtype = "fire"
src.icon_state = "cake1"
processing_objects.Add(src)
SSobj.processing.Add(src)
else
src.force = null
src.damtype = "brute"
+1 -1
View File
@@ -97,4 +97,4 @@
name = "EMT cap"
desc = "It's a baseball hat with a dark turquoise color and a reflective cross on the top."
icon_state = "emtsoft"
item_color = "emtsoft"
item_color = "emt"
+68 -8
View File
@@ -41,7 +41,7 @@
item_state = "eng_hardsuit"
slowdown = 2
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
//Atmospherics
@@ -102,29 +102,89 @@
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating for wildlife encounters."
item_state = "mining_hardsuit"
armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 50)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/weapon/pickaxe)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/bag/ore,/obj/item/weapon/pickaxe)
//Syndicate hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/syndi
name = "blood-red hardsuit helmet"
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
icon_state = "hardsuit0-syndi"
desc = "A dual-mode advanced helmet designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
icon_state = "hardsuit1-syndi"
item_state = "syndie_helm"
item_color = "syndi"
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50)
on = 1
action_button_name = "Toggle Helmet Mode"
/obj/item/clothing/head/helmet/space/hardsuit/syndi/update_icon()
icon_state = "hardsuit[on]-[item_color]"
/obj/item/clothing/head/helmet/space/hardsuit/syndi/attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot toggle your helmet while in this [user.loc]" //To prevent some lighting anomalities.
return
on = !on
if(on)
user << "<span class='notice'>You switch your helmet to travel mode.</span>"
name = "blood-red hardsuit helmet"
desc = "A dual-mode advanced helmet designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
flags = HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
cold_protection = HEAD
user.AddLuminosity(brightness_on)
else
user << "<span class='notice'>You switch your helmet to combat mode.</span>"
name = "blood-red hardsuit helmet (combat)"
desc = "A dual-mode advanced helmet designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
flags = BLOCKHAIR
flags_inv = HIDEEARS
cold_protection = null
user.AddLuminosity(-brightness_on)
update_icon()
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
user.update_inv_head()
/obj/item/clothing/suit/space/hardsuit/syndi
icon_state = "hardsuit-syndi"
name = "blood-red hardsuit"
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
icon_state = "hardsuit1-syndi"
item_state = "syndie_hardsuit"
item_color = "syndi"
slowdown = 1
w_class = 3
var/on = 1
action_button_name = "Toggle Hardsuit Mode"
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50)
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen)
/obj/item/clothing/suit/space/hardsuit/syndi/update_icon()
icon_state = "hardsuit[on]-[item_color]"
/obj/item/clothing/suit/space/hardsuit/syndi/attack_self(mob/user)
on = !on
if(on)
user << "<span class='notice'>You switch your hardsuit to travel mode.</span>"
name = "blood-red hardsuit helmet"
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders."
slowdown = 1
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
cold_protection = CHEST | GROIN | LEGS | FEET | ARMS | HANDS
else
user << "<span class='notice'>You switch your hardsuit to combat mode.</span>"
name = "blood-red hardsuit helmet (combat)"
desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in combat mode. Property of Gorlex Marauders."
slowdown = 0
flags = BLOCKHAIR
flags_inv = null
cold_protection = null
update_icon()
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
user.update_inv_wear_suit()
user.update_inv_w_uniform()
//Wizard hardsuit
/obj/item/clothing/head/helmet/space/hardsuit/wizard
@@ -169,7 +229,7 @@
desc = "A special suit that protects against hazardous, low pressure environments. Built with lightweight materials for easier movement."
item_state = "medical_hardsuit"
slowdown = 1
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50)
@@ -187,5 +247,5 @@
name = "security hardsuit"
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
item_state = "sec_hardsuit"
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank, /obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs)
armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50)
@@ -73,7 +73,7 @@
item_state = "void"
desc = "An old, NASA Centcom branch designed, dark red space suit."
slowdown = 1
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/multitool)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/multitool)
//Space santa outfit suit
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
body_parts_covered = CHEST
cold_protection = CHEST|GROIN
min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
+9 -6
View File
@@ -46,24 +46,27 @@
allowed = list(/obj/item/weapon/storage/book/bible, /obj/item/weapon/nullrod, /obj/item/weapon/reagent_containers/food/drinks/bottle/holywater, /obj/item/weapon/storage/fancy/candle_box, /obj/item/candle, /obj/item/weapon/tank/emergency_oxygen)
//Chef
/obj/item/clothing/suit/chef
/obj/item/clothing/suit/toggle/chef
name = "chef's apron"
desc = "An apron used by a high class chef."
desc = "An apron-jacket used by a high class chef."
icon_state = "chef"
item_state = "chef"
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.50
body_parts_covered = CHEST|GROIN|ARMS
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
allowed = list(/obj/item/weapon/kitchenknife)
action_button_name = "Toggle Jacket Sleeves"
togglename = "sleeves"
//Chef
/obj/item/clothing/suit/chef/classic
name = "A classic chef's apron."
//Cook
/obj/item/clothing/suit/apron/chef
name = "cook's apron"
desc = "A basic, dull, white chef's apron."
icon_state = "apronchef"
item_state = "apronchef"
blood_overlay_type = "armor"
body_parts_covered = CHEST|GROIN
allowed = list(/obj/item/weapon/kitchenknife)
//Detective
/obj/item/clothing/suit/det_suit
+1 -2
View File
@@ -5,9 +5,8 @@
item_state = "labcoat"
blood_overlay_type = "coat"
body_parts_covered = CHEST|ARMS
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/classic_baton/telescopic)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
var/open = 0
action_button_name = "Toggle Labcoat Buttons"
togglename = "buttons"
+4 -4
View File
@@ -253,24 +253,24 @@
name = "captain's winter coat"
icon_state = "coatcaptain"
armor = list(melee = 50, bullet = 30, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
/obj/item/clothing/suit/toggle/wintercoat/security
name = "security winter coat"
icon_state = "coatsecurity"
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
/obj/item/clothing/suit/toggle/wintercoat/medical
name = "medical winter coat"
icon_state = "coatmedical"
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/classic_baton/telescopic)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0)
/obj/item/clothing/suit/toggle/wintercoat/science
name = "science winter coat"
icon_state = "coatscience"
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/telebaton)
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/weapon/melee/classic_baton/telescopic)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0)
/obj/item/clothing/suit/toggle/wintercoat/engineering
+2 -1
View File
@@ -42,7 +42,8 @@
/obj/item/clothing/under/rank/chef
desc = "It's an apron which is given only to the most <b>hardcore</b> chefs in space."
name = "cook's suit"
desc = "A suit which is given only to the most <b>hardcore</b> cooks in space."
icon_state = "chef"
item_color = "chef"
+48 -1
View File
@@ -374,4 +374,51 @@
item_state = "wcoat"
item_color = "black_tango"
fitted = 0
can_adjust = 0
can_adjust = 0
/obj/item/clothing/under/stripeddress
name = "striped dress"
desc = "Fashion in space."
icon_state = "striped_dress"
item_state = "stripeddress"
item_color = "striped_dress"
fitted = 0
can_adjust = 0
/obj/item/clothing/under/sailordress
name = "sailor dress"
desc = "Formal wear for a leading lady."
icon_state = "sailor_dress"
item_state = "sailordress"
item_color = "sailor_dress"
fitted = 0
can_adjust = 0
/obj/item/clothing/under/redeveninggown
name = "red evening gown"
desc = "Fancy dress for space bar singers."
icon_state = "red_evening_gown"
item_state = "redeveninggown"
item_color = "red_evening_gown"
fitted = 0
can_adjust = 0
/obj/item/clothing/under/maid
name = "maid costume"
desc = "Maid in China."
icon_state = "maid"
item_state = "maid"
item_color = "maid"
body_parts_covered = CHEST|GROIN
fitted = 0
can_adjust = 0
/obj/item/clothing/under/janimaid
name = "maid uniform"
desc = "A simple maid uniform for housekeeping."
icon_state = "janimaid"
item_state = "janimaid"
item_color = "janimaid"
body_parts_covered = CHEST|GROIN
fitted = 0
can_adjust = 0
+1 -1
View File
@@ -38,7 +38,7 @@
/obj/item/robot_parts/r_leg = 1,
/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/gun/energy/taser = 1,
/obj/item/weapon/gun/energy/gun/advtaser = 1,
/obj/item/weapon/stock_parts/cell = 1,
/obj/item/device/assembly/prox_sensor = 1,
/obj/item/robot_parts/r_arm = 1)
+32
View File
@@ -0,0 +1,32 @@
var/list/emojis
/proc/emoji_parse(text)
if(!config.emojis)
return text
if(!emojis)
emojis = icon_states(icon('icons/emoji.dmi'))
var/parsed = ""
var/pos = 1
var/search = 0
var/emoji = ""
while(1)
search = findtext(text, ":", pos)
parsed += copytext(text, pos, search)
if(search)
pos = search
search = findtext(text, ":", pos+1)
if(search)
emoji = lowertext(copytext(text, pos+1, search))
if(emoji in emojis)
parsed += "<img class=icon src=\ref['icons/emoji.dmi'] iconstate='[emoji]'>"
pos = search + 1
else
parsed += copytext(text, pos, search)
pos = search
emoji = ""
continue
else
parsed += copytext(text, pos, search)
break
return parsed
+1 -1
View File
@@ -35,7 +35,7 @@
var/datum/disease/D
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if(!H.dna || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst.
continue
D = new virus_type()
var/datum/disease/dnaspread/DS = D
+2 -2
View File
@@ -110,11 +110,11 @@
//which should be the only place it's referenced.
//Called when start(), announce() and end() has all been called.
/datum/round_event/proc/kill()
events.running -= src
SSevent.running -= src
//Sets up the event then adds the event to the the list of running events
/datum/round_event/New()
setup()
events.running += src
SSevent.running += src
return ..()
-282
View File
@@ -1,282 +0,0 @@
var/datum/controller/event/events
/datum/controller/event
var/list/control = list() //list of all datum/round_event_control. Used for selecting events based on weight and occurrences.
var/list/running = list() //list of all existing /datum/round_event
var/scheduled = 0 //The next world.time that a naturally occuring random event can be selected.
var/frequency_lower = 3000 //5 minutes lower bound.
var/frequency_upper = 9000 //15 minutes upper bound. Basically an event will happen every 15 to 30 minutes.
var/holiday //This will be a string of the name of any realworld holiday which occurs today (GMT time)
var/wizardmode = 0 //If the summon events spell is in effect this is true
//Initial controller setup.
/datum/controller/event/New()
//There can be only one events manager. Out with the old and in with the new.
if(events != src)
if(istype(events))
del(events)
events = src
for(var/type in typesof(/datum/round_event_control))
var/datum/round_event_control/E = new type()
if(!E.typepath)
continue //don't want this one! leave it for the garbage collector
if(E.wizardevent && !wizardmode)
E.weight = 0
control += E //add it to the list of all events (controls)
reschedule()
getHoliday()
//This is called by the MC every MC-tick (*neatfreak*).
/datum/controller/event/proc/process()
checkEvent()
var/i = 1
while(i<=running.len)
var/datum/round_event/Event = running[i]
if(Event)
Event.process()
i++
continue
running.Cut(i,i+1)
//checks if we should select a random event yet, and reschedules if necessary
/datum/controller/event/proc/checkEvent()
if(scheduled <= world.time)
spawnEvent()
reschedule()
//decides which world.time we should select another random event at.
/datum/controller/event/proc/reschedule()
scheduled = world.time + rand(frequency_lower, max(frequency_lower,frequency_upper))
//selects a random event based on whether it can occur and it's 'weight'(probability)
/datum/controller/event/proc/spawnEvent()
if(!config.allow_random_events)
return
var/sum_of_weights = 0
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.holidayID)
if(E.holidayID != holiday) continue
if(E.weight < 0) //for round-start events etc.
if(E.runEvent() == PROCESS_KILL)
E.max_occurrences = 0
continue
return
sum_of_weights += E.weight
sum_of_weights = rand(0,sum_of_weights) //reusing this variable. It now represents the 'weight' we want to select
for(var/datum/round_event_control/E in control)
if(E.occurrences >= E.max_occurrences) continue
if(E.earliest_start >= world.time) continue
if(E.holidayID)
if(E.holidayID != holiday) continue
sum_of_weights -= E.weight
if(sum_of_weights <= 0) //we've hit our goal
if(E.runEvent() == PROCESS_KILL)//we couldn't run this event for some reason, set its max_occurrences to 0
E.max_occurrences = 0
continue
return
/datum/round_event/proc/findEventArea() //Here's a nice proc to use to find an area for your event to land in!
var/list/safe_areas = list(
/area/turret_protected/ai,
/area/turret_protected/ai_upload,
/area/engine,
/area/solar,
/area/holodeck,
/area/shuttle/arrival,
/area/shuttle/escape/station,
/area/shuttle/escape_pod1/station,
/area/shuttle/escape_pod2/station,
/area/shuttle/escape_pod3/station,
/area/shuttle/escape_pod4/station,
/area/shuttle/mining/station,
/area/shuttle/transport1/station,
/area/shuttle/specops/station)
//These are needed because /area/engine has to be removed from the list, but we still want these areas to get fucked up.
var/list/danger_areas = list(
/area/engine/break_room,
/area/engine/chiefs_office)
//Need to locate() as it's just a list of paths.
return locate(pick((the_station_areas - safe_areas) + danger_areas))
//allows a client to trigger an event
//aka Badmin Central
/client/proc/forceEvent()
set name = "Trigger Event"
set category = "Fun"
if(!holder ||!check_rights(R_FUN))
return
holder.forceEvent()
/datum/admins/proc/forceEvent()
var/dat = ""
var/normal = ""
var/magic = ""
var/holiday = ""
for(var/datum/round_event_control/E in events.control)
dat = "<BR><A href='?src=\ref[src];forceevent=\ref[E]'>[E]</A>"
if(E.holidayID)
holiday += dat
else if(E.wizardevent)
magic += dat
else
normal += dat
dat = normal + "<BR>" + magic + "<BR>" + holiday
var/datum/browser/popup = new(usr, "forceevent", "Force Random Event", 300, 750)
popup.set_content(dat)
popup.open()
/*
//////////////
// HOLIDAYS //
//////////////
//Uncommenting ALLOW_HOLIDAYS in config.txt will enable holidays
//It's easy to add stuff. Just modify getHoliday to set holiday to something using the switch for DD(#day) MM(#month) YY(#year).
//You can then check if it's a special day in any code in the game by doing if(events.holiday == "MyHolidayID")
//You can also make holiday random events easily thanks to Pete/Gia's system.
//simply make a random event normally, then assign it a holidayID string which matches the one you gave it in getHolday.
//Anything with a holidayID, which does not match the holiday string, will never occur.
//Please, Don't spam stuff up with stupid stuff (key example being april-fools Pooh/ERP/etc),
//And don't forget: CHECK YOUR CODE!!!! We don't want any zero-day bugs which happen only on holidays and never get found/fixed!
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//ALSO, MOST IMPORTANTLY: Don't add stupid stuff! Discuss bonus content with Project-Heads first please!//
//////////////////////////////////////////////////////////////////////////////////////////////////////////
~Carn */
//sets up the holiday string in the events manager.
/datum/controller/event/proc/getHoliday()
if(!config.allow_holidays) return // Holiday stuff was not enabled in the config!
holiday = null
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
//Main switch. If any of these are too dumb/inappropriate, or you have better ones, feel free to change whatever
switch(MM)
if(1) //Jan
switch(DD)
if(1) holiday = "New Year"
if(2) //Feb
switch(DD)
if(2) holiday = "Groundhog Day"
if(14) holiday = "Valentine's Day"
if(17) holiday = "Random Acts of Kindness Day"
if(3) //Mar
switch(DD)
if(14) holiday = "Pi Day"
if(17) holiday = "St. Patrick's Day"
if(27)
if(YY == 16)
holiday = "Easter"
if(31)
if(YY == 13)
holiday = "Easter"
if(4) //Apr
switch(DD)
if(1)
holiday = "April Fool's Day"
if(YY == 18 && prob(50)) holiday = "Easter"
if(5)
if(YY == 15) holiday = "Easter"
if(16)
if(YY == 17) holiday = "Easter"
if(20)
holiday = "Four-Twenty"
if(YY == 14 && prob(50)) holiday = "Easter"
if(22) holiday = "Earth Day"
if(5) //May
switch(DD)
if(1) holiday = "Labour Day"
if(4) holiday = "FireFighter's Day"
if(12) holiday = "Owl and Pussycat Day" //what a dumb day of observence...but we -do- have costumes already :3
if(6) //Jun
if(7) //Jul
switch(DD)
if(1) holiday = "Doctor's Day"
if(2) holiday = "UFO Day"
if(8) holiday = "Writer's Day"
if(30) holiday = "Friendship Day"
if(8) //Aug
switch(DD)
if(5) holiday = "Beer Day"
if(9) //Sep
switch(DD)
if(19) holiday = "Talk-Like-a-Pirate Day"
if(28) holiday = "Stupid-Questions Day"
if(10) //Oct
switch(DD)
if(4) holiday = "Animal's Day"
if(7) holiday = "Smiling Day"
if(16) holiday = "Boss' Day"
if(31) holiday = "Halloween"
if(11) //Nov
switch(DD)
if(1) holiday = "Vegan Day"
if(13) holiday = "Kindness Day"
if(19) holiday = "Flowers Day"
if(21) holiday = "Saying-'Hello' Day"
if(12) //Dec
switch(DD)
if(10) holiday = "Human-Rights Day"
if(14) holiday = "Monkey Day"
if(21) holiday = "Mayan Doomsday Anniversary"
if(22) holiday = "Orgasming Day" //lol. These all actually exist
if(24) holiday = "Xmas"
if(25) holiday = "Xmas"
if(26) holiday = "Boxing Day"
if(31) holiday = "New Year"
if(!holiday)
//Friday the 13th
if(DD == 13)
if(time2text(world.timeofday, "DDD") == "Fri")
holiday = "Friday the 13th"
world.update_status()
/datum/controller/event/proc/toggleWizardmode()
wizardmode = !wizardmode
for(var/datum/round_event_control/E in control)
E.weight = initial(E.weight)
if((E.wizardevent && !wizardmode) || (!E.wizardevent && wizardmode))
E.weight = 0
message_admins("Summon Events has been [wizardmode ? "enabled, events will occur every [events.frequency_lower / 600] to [events.frequency_upper / 600] minutes" : "disabled"]!")
log_game("Summon Events was [wizardmode ? "enabled" : "disabled"]!")
/datum/controller/event/proc/resetFrequency()
frequency_lower = initial(frequency_lower)
frequency_upper = initial(frequency_upper)
+1 -1
View File
@@ -10,7 +10,7 @@
/datum/round_event/falsealarm/announce()
var/list/events_list = list()
for(var/datum/round_event_control/E in events.control)
for(var/datum/round_event_control/E in SSevent.control)
if(!E.holidayID) //No holiday cheer allowed during non-holidays. Not even fake holiday cheer.
events_list += E //No holiday cheer allowed during non-holidays. Not even fake holiday cheer.
var/datum/round_event_control/event_control = pick(events_list)
+5 -5
View File
@@ -99,8 +99,8 @@
var/response = alert(M, "Santa is coming to town! Do you want to be santa?", "Ho ho ho!", "Yes", "No")
if(response == "Yes" && M && M.client && M.stat == DEAD && !santa)
santa = new /mob/living/carbon/human(pick(blobstart))
M.mind.transfer_to(santa)
santa.key = M.key
qdel(M)
santa.real_name = "Santa Claus"
santa.name = "Santa Claus"
@@ -117,13 +117,13 @@
santa.equip_to_slot_or_del(new /obj/item/clothing/suit/space/santa, slot_wear_suit)
santa.equip_to_slot_or_del(new /obj/item/clothing/head/santa, slot_head)
santa.equip_to_slot_or_del(new /obj/item/clothing/mask/breath, slot_wear_mask)
santa.equip_to_slot_or_del(new /obj/item/clothing/gloves/red, slot_gloves)
santa.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/red, slot_gloves)
santa.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/red, slot_shoes)
santa.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double, slot_belt)
santa.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain, slot_ears)
santa.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/santabag, slot_back)
santa.equip_to_slot_or_del(new /obj/item/device/flashlight, slot_r_store) //most blob spawn locations are really dark.
var/obj/item/weapon/card/id/gold/santacard = new(santa)
santacard.update_label("Santa Claus", "Santa")
var/datum/job/captain/J = new/datum/job/captain
@@ -147,5 +147,5 @@
var/obj/effect/proc_holder/spell/targeted/area_teleport/teleport/telespell = new(santa)
telespell.clothes_req = 0 //santa robes aren't actually magical.
santa.mind.spell_list += telespell //does the station have chimneys? WHO KNOWS!
M << "<span class='userdanger'>You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.</span>"
santa << "<span class='userdanger'>You are Santa! Your objective is to bring joy to the people on this station. You can conjure more presents using a spell, and there are several presents in your bag.</span>"
+4 -5
View File
@@ -2396,13 +2396,12 @@ It is possible to destroy the net by the occupant or someone else.
..()
return
/obj/effect/energy_net/attack_hand(mob/user)
if (HULK in user.mutations)
user.visible_message("<span class='danger'>[user] rips the energy net apart!</span>", \
/obj/effect/energy_net/attack_hulk(mob/living/carbon/human/user)
..(user, 1)
user.visible_message("<span class='danger'>[user] rips the energy net apart!</span>", \
"<span class='notice'>You easily destroy the energy net.</span>")
health-=50
health-=50
healthcheck()
return
/obj/effect/energy_net/attack_paw(mob/user)
return attack_hand()
+40 -82
View File
@@ -21,7 +21,7 @@
dispatch_type = pick(HIJACK_SYNDIE, RUSKY_PARTY, SPIDER_GIFT, DEPARTMENT_RESUPPLY)
/datum/round_event/shuttle_loan/announce()
supply_shuttle.shuttle_loan = src
SSshuttle.shuttle_loan = src
switch(dispatch_type)
if(HIJACK_SYNDIE)
priority_announce("The syndicate are trying to infiltrate your station. If you let them hijack your shuttle, you'll save us a headache.","Centcom Counter Intelligence")
@@ -38,49 +38,49 @@
priority_announce(thanks_msg, "Cargo shuttle commandeered by Centcom.")
dispatched = 1
supply_shuttle.points += bonus_points
SSshuttle.points += bonus_points
endWhen = activeFor + 1
supply_shuttle.eta_timeofday = (world.timeofday + 3000) % 2160000
supply_shuttle.moving = 1
SSshuttle.supply.sell()
SSshuttle.supply.enterTransit()
SSshuttle.supply.mode = SHUTTLE_RECALL
SSshuttle.supply.setTimer(3000)
switch(dispatch_type)
if(HIJACK_SYNDIE)
supply_shuttle.centcom_message += "<font color=blue>Syndicate hijack team incoming.</font>"
SSshuttle.centcom_message += "<font color=blue>Syndicate hijack team incoming.</font>"
if(RUSKY_PARTY)
supply_shuttle.centcom_message += "<font color=blue>Partying Russians incoming.</font>"
SSshuttle.centcom_message += "<font color=blue>Partying Russians incoming.</font>"
if(SPIDER_GIFT)
supply_shuttle.centcom_message += "<font color=blue>Spider Clan gift incoming.</font>"
SSshuttle.centcom_message += "<font color=blue>Spider Clan gift incoming.</font>"
if(DEPARTMENT_RESUPPLY)
supply_shuttle.centcom_message += "<font color=blue>Department resupply incoming.</font>"
SSshuttle.centcom_message += "<font color=blue>Department resupply incoming.</font>"
/datum/round_event/shuttle_loan/tick()
if(dispatched)
if(supply_shuttle.moving)
if(SSshuttle.supply.mode != SHUTTLE_IDLE)
endWhen = activeFor
else
endWhen = activeFor + 1
//whomever coded this didn't even bother to follow the supply ordering code as an example.
//So I had to waste time rewriting it. Thanks for that >:[
/datum/round_event/shuttle_loan/end()
if(supply_shuttle.shuttle_loan && supply_shuttle.shuttle_loan.dispatched)
if(SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched)
//make sure the shuttle was dispatched in time
supply_shuttle.shuttle_loan = null
SSshuttle.shuttle_loan = null
//spawn some stuff as reward
var/area/shuttle_at = locate(SUPPLY_DOCK_AREATYPE)
var/list/empty_shuttle_turfs = list()
for(var/turf/simulated/shuttle/T in shuttle_at)
if(T.density)
continue
empty_shuttle_turfs.Add(T)
for(var/turf/simulated/shuttle/T in SSshuttle.supply.areaInstance)
if(T.density || T.contents.len) continue
empty_shuttle_turfs += T
if(!empty_shuttle_turfs.len)
return
var/list/shuttle_spawns = list()
switch(dispatch_type)
if(HIJACK_SYNDIE)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/emergency/specialops()
O.orderedby = "Syndicate"
supply_shuttle.shoppinglist += O
SSshuttle.generateSupplyOrder(/datum/supply_packs/emergency/specialops, "Syndicate")
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
@@ -89,21 +89,8 @@
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/syndicate)
var/turf/T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/blood(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/oil(T)
if(RUSKY_PARTY)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/organic/party()
O.orderedby = "Russian Confederation"
supply_shuttle.shoppinglist += O
SSshuttle.generateSupplyOrder(/datum/supply_packs/organic/party, "Russian Confederation")
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/russian/ranged) //drops a mateba
@@ -113,25 +100,8 @@
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/bear)
var/turf/T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/vomit(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/ash(T)
T = pick(empty_shuttle_turfs)
new /obj/effect/decal/cleanable/ash(T)
if(SPIDER_GIFT)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = new /datum/supply_packs/emergency/specialops()
O.orderedby = "Spider Clan"
supply_shuttle.shoppinglist += O
SSshuttle.generateSupplyOrder(/datum/supply_packs/emergency/specialops, "Spider Clan")
shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/poison/giant_spider)
@@ -158,27 +128,20 @@
new /obj/effect/spider/stickyweb(T)
if(DEPARTMENT_RESUPPLY)
var/list/crate_types = list()
var/list/crate_types = list(
/datum/supply_packs/emergency/evac,
/datum/supply_packs/security/supplies,
/datum/supply_packs/organic/food,
/datum/supply_packs/emergency/weedcontrol,
/datum/supply_packs/engineering/tools,
/datum/supply_packs/engineering/engiequipment,
/datum/supply_packs/science/robotics,
/datum/supply_packs/science/plasma,
/datum/supply_packs/medical/supplies
)
crate_types.Add(/datum/supply_packs/emergency/evac)
crate_types.Add(/datum/supply_packs/security/supplies)
crate_types.Add(/datum/supply_packs/organic/food)
crate_types.Add(/datum/supply_packs/emergency/weedcontrol)
crate_types.Add(/datum/supply_packs/engineering/tools)
crate_types.Add(/datum/supply_packs/engineering/engiequipment)
crate_types.Add(/datum/supply_packs/science/robotics)
crate_types.Add(/datum/supply_packs/science/plasma)
crate_types.Add(/datum/supply_packs/medical/supplies)
while(crate_types.len > 0)
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.orderedby = "Centcom"
supply_shuttle.shoppinglist += O
var/spawn_type = crate_types[crate_types.len]
O.object = new spawn_type()
crate_types.Cut(crate_types.len, crate_types.len + 1)
for(var/spawn_type in crate_types)
SSshuttle.generateSupplyOrder(spawn_type, "Centcom")
for(var/i=0,i<3,i++)
var/turf/T = pick(empty_shuttle_turfs)
@@ -186,20 +149,15 @@
new spawn_type(T)
var/false_positive = 0
while(shuttle_spawns.len > 0 && empty_shuttle_turfs.len > 0)
var/turf/T = pick(empty_shuttle_turfs)
while(shuttle_spawns.len && empty_shuttle_turfs.len)
var/turf/T = pick_n_take(empty_shuttle_turfs)
if(T.contents.len && false_positive < 5)
false_positive++
continue
var/spawn_type = shuttle_spawns[1]
shuttle_spawns.Cut(1, 2)
empty_shuttle_turfs.Remove(T)
var/spawn_type = pick_n_take(shuttle_spawns)
new spawn_type(T)
supply_shuttle.buy()
//supply_shuttle.send()
//supply_shuttle.moving = 0
#undef HIJACK_SYNDIE
#undef RUSKY_PARTY
+15 -10
View File
@@ -64,7 +64,7 @@
holder.luminosity = 4
/datum/spacevine_mutation/toxicity
name = "toxicity"
name = "toxic"
hue = "#ff00ff"
/datum/spacevine_mutation/toxicity/on_cross(obj/effect/spacevine/holder, mob/living/crosser)
@@ -87,7 +87,7 @@
explosion(holder.loc, 0, 0, 2, 0, 0)
/datum/spacevine_mutation/fire_proof
name = "fire resist"
name = "fire proof"
hue = "#ff8888"
/datum/spacevine_mutation/fire_proof/process_temperature(obj/effect/spacevine/holder, temp, volume)
@@ -116,7 +116,7 @@
buckled.ex_act(severity)
/datum/spacevine_mutation/transparency
name = "transparency"
name = "transparent"
hue = ""
/datum/spacevine_mutation/transparency/on_grow(obj/effect/spacevine/holder)
@@ -124,7 +124,7 @@
holder.alpha = 125
/datum/spacevine_mutation/oxy_eater
name = "oxygen consumption"
name = "oxygen consuming"
hue = "#ffff88"
/datum/spacevine_mutation/oxy_eater/process_mutation(obj/effect/spacevine/holder)
@@ -134,7 +134,7 @@
GM.oxygen = max(0, GM.oxygen - severity * holder.energy)
/datum/spacevine_mutation/nitro_eater
name = "nitrogen consumption"
name = "nitrogen consuming"
hue = "#8888ff"
/datum/spacevine_mutation/nitro_eater/process_mutation(obj/effect/spacevine/holder)
@@ -144,7 +144,7 @@
GM.nitrogen = max(0, GM.nitrogen - severity * holder.energy)
/datum/spacevine_mutation/carbondioxide_eater
name = "CO2 consumption"
name = "CO2 consuming"
hue = "#00ffff"
/datum/spacevine_mutation/carbondioxide_eater/process_mutation(obj/effect/spacevine/holder)
@@ -154,7 +154,7 @@
GM.carbon_dioxide = max(0, GM.carbon_dioxide - severity * holder.energy)
/datum/spacevine_mutation/plasma_eater
name = "toxins consumption"
name = "toxins consuming"
hue = "#ffbbff"
/datum/spacevine_mutation/plasma_eater/process_mutation(obj/effect/spacevine/holder)
@@ -164,7 +164,7 @@
GM.toxins = max(0, GM.toxins - severity * holder.energy)
/datum/spacevine_mutation/thorns
name = "thorns"
name = "thorny"
hue = "#666666"
/datum/spacevine_mutation/thorns/on_cross(obj/effect/spacevine/holder, crosser)
@@ -354,13 +354,13 @@
qdel(src)
spawn_spacevine_piece(src.loc, , muts)
processing_objects.Add(src)
SSobj.processing.Add(src)
init_subtypes(/datum/spacevine_mutation/, mutations_list)
if(mttv != null)
mutativness = mttv
/obj/effect/spacevine_controller/Destroy()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
..()
/obj/effect/spacevine_controller/proc/spawn_spacevine_piece(var/turf/location, obj/effect/spacevine/parent, list/muts)
@@ -373,10 +373,15 @@
if(parent)
SV.mutations |= parent.mutations
SV.color = parent.color
SV.desc = parent.desc
if(prob(mutativness))
SV.mutations |= pick(mutations_list)
var/datum/spacevine_mutation/randmut = pick(SV.mutations)
SV.color = randmut.hue
SV.desc = "An extremely expansionistic species of vine. These are "
for(var/datum/spacevine_mutation/M in SV.mutations)
SV.desc += "[M.name] "
SV.desc += "vines."
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.on_birth(SV)
@@ -30,7 +30,7 @@
jobs_to_revolt = list("Quartermaster", "Cargo Technician", "Shaft Miner")
nation = pick("Cargo", "Guna", "Suppli", "Mule", "Crate", "Ore", "Mini", "Shaf")
if("whatevercolorrepresentstheservicepeople") //the few, the proud, the technically aligned
jobs_to_revolt = list("Bartender", "Chef", "Botanist", "Clown", "Mime", "Janitor", "Chaplain")
jobs_to_revolt = list("Bartender", "Cook", "Botanist", "Clown", "Mime", "Janitor", "Chaplain")
nation = pick("Honka", "Boozo", "Fatu", "Danka", "Mimi", "Libra", "Jani", "Religi")
nation += pick("stan", "topia", "land", "nia", "ca", "tova", "dor", "ador", "tia", "sia", "ano", "tica", "tide", "cis", "marea", "co", "taoide", "slavia", "stotzka")
+2 -2
View File
@@ -39,7 +39,7 @@
if(!(user in color_altered_mobs))
color_altered_mobs += user
user.color = "#00FF00"
processing_objects.Add(src)
SSobj.processing.Add(src)
..()
/obj/item/weapon/greentext/dropped(mob/living/user as mob)
@@ -48,7 +48,7 @@
user.color = "#FF0000" //ya blew it
last_holder = null
new_holder = null
processing_objects.Remove(src)
SSobj.processing.Remove(src)
..()
/obj/item/weapon/greentext/process()
+2 -2
View File
@@ -6,7 +6,7 @@
earliest_start = 0
/datum/round_event/wizard/summonguns/start()
rightandwrong(0)
rightandwrong(0,,10)
/datum/round_event_control/wizard/summonmagic //The Somewhat Less Classic
name = "Summon Magic"
@@ -16,4 +16,4 @@
earliest_start = 0
/datum/round_event/wizard/summonmagic/start()
rightandwrong(1)
rightandwrong(1,,10)
+45 -101
View File
@@ -20,7 +20,8 @@ mob/living/carbon/
var/hal_crit = 0
mob/living/carbon/proc/handle_hallucinations()
if(handling_hal) return
if(handling_hal)
return
handling_hal = 1
while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25))
@@ -148,7 +149,6 @@ mob/living/carbon/proc/handle_hallucinations()
src << sound('sound/AI/shuttledock.ogg')
if(66 to 70)
//Flashes of danger
//src << "Danger Flash"
if(!halbody)
var/list/possible_points = list()
for(var/turf/simulated/floor/F in view(src,world.view))
@@ -162,8 +162,6 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = image('icons/mob/human.dmi',target,"husk_s",TURF_LAYER)
if(4)
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
// if(5)
// halbody = image('xcomalien.dmi',target,"chryssalid",TURF_LAYER)
if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment.
@@ -171,55 +169,58 @@ mob/living/carbon/proc/handle_hallucinations()
halbody = null
if(71 to 72)
//Fake death
// src.sleeping_willingly = 1
src.sleeping = 20
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
// src.sleeping_willingly = 0
src.sleeping = 0
hal_crit = 0
hal_screwyhud = 0
if(73 to 75)
fake_attack()
handling_hal = 0
/mob/living/carbon/proc/fake_attack()
// var/list/possible_clones = new/list()
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.
/*obj/machinery/proc/mockpanel(list/buttons,start_txt,end_txt,list/mid_txts)
// if(!possible_clones.len) return
// clone = pick(possible_clones)
if(!clone)
return
if(!mocktxt)
//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)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
mocktxt = ""
F.name = clone.name
F.my_target = src
F.weapon_name = clone_weapon
src.hallucinations += F
var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\
"Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\
"OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Captain IQ","Retrieve Arms",\
"Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry")
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
if(mid_txts)
while(mid_txts.len)
var/mid_txt = pick(mid_txts)
mocktxt += mid_txt
mid_txts -= mid_txt
F.updateimage()
while(buttons.len)
var/button = pick(buttons)
var/button_txt = pick(possible_txt)
mocktxt += "<a href='?src=\ref[src];[button]'>[button_txt]</a><br>"
buttons -= button
possible_txt -= button_txt
return start_txt + mocktxt + end_txt + "</TT></BODY></HTML>"
proc/check_panel(mob/M)
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
if(M.hallucination < 15)
return 1
return 0*/
/obj/effect/fake_attacker
icon = null
@@ -245,8 +246,11 @@ proc/check_panel(mob/M)
var/health = 100
/obj/effect/fake_attacker/attackby(var/obj/item/weapon/P as obj, mob/user as mob)
/obj/effect/fake_attacker/attackby(var/obj/item/weapon/P as obj, mob/living/user as mob)
step_away(src,my_target,2)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.visible_message("<span class='danger'>[my_target] flails around wildly.</span>", \
"<span class='danger'>[my_target] has attacked [src]!</span>")
@@ -303,11 +307,13 @@ proc/check_panel(mob/M)
updateimage()
else
if(prob(15))
src.do_attack_animation(my_target)
if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg'))
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1)
my_target.staminaloss += 30
if(prob(20)) my_target.eye_blurry += 3
if(prob(20))
my_target.eye_blurry += 3
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
@@ -326,7 +332,7 @@ proc/check_panel(mob/M)
collapse = 1
updateimage()
/proc/fake_blood(var/mob/target)
/obj/effect/fake_attacker/proc/fake_blood(var/mob/target)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
O.name = "blood"
var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
@@ -350,65 +356,3 @@ 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)
/proc/fake_attack(var/mob/living/target)
// var/list/possible_clones = new/list()
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.
// 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(target.loc)
if(clone.l_hand)
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
clone_weapon = clone.l_hand.name
F.weap = clone.l_hand
else if (clone.r_hand)
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
clone_weapon = clone.r_hand.name
F.weap = clone.r_hand
F.name = clone.name
F.my_target = target
F.weapon_name = clone_weapon
target.hallucinations += F
F.left = image(clone,dir = WEST)
F.right = image(clone,dir = EAST)
F.up = image(clone,dir = NORTH)
F.down = image(clone,dir = SOUTH)
// F.base = new /icon(clone.stand_icon)
// F.currentimage = new /image(clone)
/*
F.left = new /icon(clone.stand_icon,dir=WEST)
for(var/icon/i in clone.overlays)
F.left.Blend(i)
F.up = new /icon(clone.stand_icon,dir=NORTH)
for(var/icon/i in clone.overlays)
F.up.Blend(i)
F.down = new /icon(clone.stand_icon,dir=SOUTH)
for(var/icon/i in clone.overlays)
F.down.Blend(i)
F.right = new /icon(clone.stand_icon,dir=EAST)
for(var/icon/i in clone.overlays)
F.right.Blend(i)
target << F.up
*/
F.updateimage()
-1
View File
@@ -135,7 +135,6 @@
var/inaccurate = 0
if( \
istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/butch) || \
istype(W, /obj/item/weapon/scalpel) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) \
)
@@ -8,6 +8,8 @@
required_reagents = list("soymilk" = 10)
required_catalysts = list("enzyme" = 5)
result_amount = 1
mob_react=1
/datum/chemical_reaction/tofu/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
@@ -20,18 +22,21 @@
result = null
required_reagents = list("soymilk" = 2, "coco" = 2, "sugar" = 2)
result_amount = 1
/datum/chemical_reaction/chocolate_bar/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
new /obj/item/weapon/reagent_containers/food/snacks/chocolatebar(location)
return
/datum/chemical_reaction/chocolate_bar2
name = "Chocolate Bar"
id = "chocolate_bar"
result = null
required_reagents = list("milk" = 2, "coco" = 2, "sugar" = 2)
result_amount = 1
mob_react = 1
/datum/chemical_reaction/chocolate_bar2/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
@@ -73,6 +78,7 @@
required_reagents = list("milk" = 40)
required_catalysts = list("enzyme" = 5)
result_amount = 1
/datum/chemical_reaction/cheesewheel/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
new /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel(location)
@@ -84,6 +90,8 @@
result = null
required_reagents = list("blood" = 5, "clonexadone" = 1)
result_amount = 1
mob_react = 1
/datum/chemical_reaction/syntiflesh/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
new /obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh(location)
+24 -3
View File
@@ -122,7 +122,7 @@
/obj/item/weapon/reagent_containers/food/snacks/badrecipe
name = "burned mess"
desc = "Someone should be demoted from chef for this."
desc = "Someone should be demoted from cook for this."
icon_state = "badrecipe"
/obj/item/weapon/reagent_containers/food/snacks/badrecipe/New()
@@ -202,8 +202,6 @@
reagents.add_reagent("minttoxin", 1)
bitesize = 1
////////////////////////////////FOOD ADDITIONS////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food/snacks/wrap
name = "egg wrap"
desc = "The precursor to Pigs in a Blanket."
@@ -234,3 +232,26 @@
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("toxin", 3)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chococoin
name = "chocolate coin"
desc = "A completely edible but nonflippable festive coin."
icon_state = "chococoin"
/obj/item/weapon/reagent_containers/food/snacks/chococoin/New()
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sugar", 2)
reagents.add_reagent("coco", 2)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chocoorange
name = "chocolate orange"
desc = "A festive chocolate orange"
icon_state = "chocoorange"
/obj/item/weapon/reagent_containers/food/snacks/chocoorange/New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("sugar", 2)
reagents.add_reagent("coco", 2)
+12 -1
View File
@@ -308,4 +308,15 @@
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sugar", 3)
bitesize = 2
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chococornet/
name = "chocolate cornet"
desc = "Which side's the head, the fat end or the thin end?"
icon_state = "chococornet"
/obj/item/weapon/reagent_containers/food/snacks/chococornet/New()
..()
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("sodiumchloride", 1)
reagents.add_reagent("vitamin", 1)
@@ -69,3 +69,17 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/apple
)
result = /obj/item/weapon/reagent_containers/food/snacks/candiedapple
/datum/recipe/chococoin
items = list(
/obj/item/weapon/coin,
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
)
result = /obj/item/weapon/reagent_containers/food/snacks/chococoin
/datum/recipe/chocoorange
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange,
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
)
result = /obj/item/weapon/reagent_containers/food/snacks/chocoorange
@@ -3,7 +3,7 @@
////////////////////////////////////////////////BREAD////////////////////////////////////////////////
/datum/recipe/bread
/datum/recipe/bread/plain
reagents = list("flour" = 15)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/store/bread
@@ -177,3 +177,10 @@
/datum/recipe/cracker
reagents = list("flour" = 5, "sodiumchloride" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/cracker
/datum/recipe/chococornet
reagents = list("flour" = 10, "sodiumchloride" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
)
result = /obj/item/weapon/reagent_containers/food/snacks/chococornet
@@ -3,7 +3,7 @@
////////////////////////////////////////////////PIES////////////////////////////////////////////////
/datum/recipe/pie
/datum/recipe/pie/banana
reagents = list("flour" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
@@ -3,7 +3,7 @@
////////////////////////////////////////////////SANDWICHES////////////////////////////////////////////////
/datum/recipe/sandwich
/datum/recipe/sandwich/plain
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatsteak,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
@@ -3,7 +3,7 @@
////////////////////////////////////////////////SPAGHETTI////////////////////////////////////////////////
/datum/recipe/spaghetti
/datum/recipe/spaghetti/plain
reagents = list("flour" = 5)
result= /obj/item/weapon/reagent_containers/food/snacks/spaghetti
@@ -54,6 +54,6 @@
items = list(
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant
/obj/item/weapon/reagent_containers/food/snacks/grown/eggplant,
)
result = /obj/item/weapon/reagent_containers/food/snacks/eggplantparm
+2 -2
View File
@@ -163,7 +163,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/potato/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You add some cable to the potato and slide it inside the battery encasing.</span>"
var/obj/item/weapon/stock_parts/cell/potato/pocell = new /obj/item/weapon/stock_parts/cell/potato(user.loc)
@@ -539,7 +539,7 @@
..()
if( istype(src.loc, /mob) )
held_mob = src.loc
processing_objects.Add(src)
SSobj.processing.Add(src)
/obj/item/weapon/reagent_containers/food/snacks/grown/ghost_chilli/process()
if(held_mob && src.loc == held_mob)
+24 -7
View File
@@ -793,16 +793,29 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/seeds/replicapod/harvest(mob/user = usr) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
if(ckey && config.revival_pod_plants)
for(var/mob/M in player_list)
if(M.ckey == ckey && M.stat == 2 && !M.suiciding)
var/ckey_holder = null
if(config.revival_pod_plants)
if(ckey)
for(var/mob/M in player_list)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(O.can_reenter_corpse)
if(O.ckey == ckey && O.can_reenter_corpse)
make_podman = 1
break
else
if(M.ckey == ckey && M.stat == 2 && !M.suiciding)
make_podman = 1
break
else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key
for(var/mob/M in player_list)
if(ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
ckey_holder = M.ckey
break
make_podman = 1
break
if(make_podman) //all conditions met!
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
@@ -811,8 +824,12 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else
podman.real_name = "Pod Person [rand(0,999)]"
mind.transfer_to(podman)
podman.ckey = ckey
if(ckey)
podman.ckey = ckey
else
podman.ckey = ckey_holder
podman.gender = blood_gender
podman.faction |= factions
hardset_dna(podman,null,null,podman.real_name,blood_type,/datum/species/plant/pod,"#59CE00")//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman
podman.set_cloned_appearance()
+5 -1
View File
@@ -80,10 +80,12 @@
var/datum/mind/mind = null
var/blood_gender = null
var/blood_type = null
var/factions = null
var/contains_sample = 0
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/syringe))
if(ckey == null)
if(!contains_sample)
for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list)
if(bloodSample.data["mind"] && bloodSample.data["cloneable"] == 1)
mind = bloodSample.data["mind"]
@@ -91,8 +93,10 @@
realName = bloodSample.data["real_name"]
blood_gender = bloodSample.data["gender"]
blood_type = bloodSample.data["blood_type"]
factions = bloodSample.data["factions"]
W.reagents.clear_reagents()
user << "You inject the contents of the syringe into the seeds."
contains_sample = 1
else
user << "The seeds reject the sample!"
else
+2 -1
View File
@@ -18,6 +18,7 @@
density = 1
opacity = 0
var/state = 0
var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/book) //Things allowed in the bookcase
/obj/structure/bookcase/initialize()
@@ -61,7 +62,7 @@
state = 0
if(2)
if(istype(I, /obj/item/weapon/book) || istype(I, /obj/item/weapon/spellbook))
if(is_type_in_list(I, allowed_books))
user.drop_item()
I.loc = src
update_icon()
+12 -1
View File
@@ -471,6 +471,13 @@
force = 10
throwforce = 10
var/cooldown = 0
var/list/can_be_placed_into = list(
/obj/structure/table,
/obj/structure/closet,
/obj/item/weapon/storage,
/obj/structure/safe,
/obj/machinery/disposal
)
/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator)
if(cooldown <= 0)
@@ -489,6 +496,9 @@
if(target in user.contents)
return
if(proximity_flag)
for(var/type in can_be_placed_into)
if(istype(target, type))
return
CreateResonance(target, user)
/obj/effect/resonance
@@ -702,7 +712,8 @@
if(istype(target, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = M
if(malfunctioning)
M.faction = list("lazarus")
H.faction |= list("lazarus", "\ref[user]")
H.robust_searching = 1
H.friends += user
H.attack_same = 1
log_game("[user] has revived hostile mob [target] with a malfunctioning lazarus injector")
@@ -4,20 +4,26 @@
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
circuit = /obj/item/weapon/circuitboard/labor_shuttle
id = "laborcamp"
shuttleId = "laborcamp"
possible_destinations = "laborcamp_home;laborcamp_away"
req_access = list(access_brig)
/obj/machinery/computer/shuttle/labor/one_way
name = "prisoner shuttle console"
desc = "A one-way shuttle console, used to summon the shuttle to the labor camp."
possible_destinations = "laborcamp_away"
circuit = /obj/item/weapon/circuitboard/labor_shuttle/one_way
req_access = list( )
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
if(href_list["move"])
var/datum/shuttle_manager/s = shuttles["laborcamp"]
if(s.location == /area/shuttle/laborcamp/outpost)
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
if(!M)
usr << "<span class='notice'>Cannot locate shuttle.</span>"
return 0
var/obj/docking_port/stationary/S = M.get_docked()
if(S && S.name == "laborcamp_away")
usr << "<span class='notice'>Shuttle is already at the outpost.</span>"
return 0
..()
+19 -16
View File
@@ -92,29 +92,32 @@
else usr << "<span class='warning'>Invalid ID.</span>"
if(check_auth()) //Sanity check against hef spoofs
if(href_list["choice"] == "station")
var/datum/shuttle_manager/s = shuttles["laborcamp"]
if(s.location == /area/shuttle/laborcamp/outpost)
if(alone_in_area(get_area(loc), usr))
if (s.move_shuttle(0)) // No delay, to stop people from getting on while it is departing.
if(!alone_in_area(get_area(src), usr))
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
else
switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home"))
if(1)
usr << "<span class='notice'>Shuttle not found</span>"
if(2)
usr << "<span class='notice'>Shuttle already at station</span>"
if(3)
usr << "<span class='notice'>No permission to dock could be granted.</span>"
else
Radio.set_frequency(SEC_FREQ)
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", SEC_FREQ)
usr << "<span class='notice'>Shuttle recieved message and will be sent shortly.</span>"
else
usr << "<span class='notice'>Shuttle is already moving.</span>"
else
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
else
usr << "<span class='notice'>Shuttle is already on-station.</span>"
if(href_list["choice"] == "release")
var/datum/shuttle_manager/s = shuttles["laborcamp"]
if(s.location == /area/shuttle/laborcamp/outpost)
usr << "<span class='warning'>Prisoners can only be released while docked with the station.</span>"
return
if(alone_in_area(get_area(loc), usr))
if(release_door.density)
release_door.open()
var/obj/docking_port/stationary/S = SSshuttle.getDock("laborcamp_home")
if(S && S.get_docked())
if(release_door && release_door.density)
release_door.open()
else
usr << "<span class='warning'>Prisoners can only be released while docked with the station.</span>"
else
usr << "<span class='warning'>Prisoners are only allowed to be released while alone.</span>"
src.updateUsrDialog()
return
+2 -1
View File
@@ -45,7 +45,8 @@
desc = "Used to call and send the mining shuttle."
req_access = list(access_mining)
circuit = /obj/item/weapon/circuitboard/mining_shuttle
id = "mining"
shuttleId = "mining"
possible_destinations = "mining_home;mining_away"
/******************************Lantern*******************************/
+1
View File
@@ -475,6 +475,7 @@
icon_state = "asteroid"
icon_plating = "asteroid"
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
ignoredirt = 1
/turf/simulated/floor/plating/asteroid/airless
oxygen = 0.01
+26 -6
View File
@@ -7,7 +7,6 @@
stat = DEAD
density = 0
canmove = 0
blinded = 0
anchored = 1 // don't get pushed around
invisibility = INVISIBILITY_OBSERVER
languages = ALL
@@ -127,11 +126,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//world << "DEBUG: malf mode ticker test"
if(malf.malf_mode_declared && (malf.apcs > 0))
stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/ETA
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
ETA = "ETA"
if(SHUTTLE_DOCKED)
ETA = "ETD"
if(ETA)
var/timeleft = SSshuttle.emergency.timeLeft()
stat(null, "[ETA]-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
@@ -301,3 +304,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
return 1
/mob/dead/observer/verb/view_manfiest()
set name = "View Crew Manifest"
set category = "Ghost"
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += data_core.get_manifest()
src << browse(dat, "window=manifest;size=370x420;can_close=1")
/mob/dead/observer/Topic(href, href_list)
if(href_list["follow"])
var/atom/movable/target = locate(href_list["follow"])
if((usr == src) && istype(target) && (target != src)) //for safety against href exploits
ManualFollow(target)
+2 -1
View File
@@ -17,4 +17,5 @@
. = src.say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
src << message
src << "<a href=?src=\ref[src];follow=\ref[speaker]>(F)</a> [message]"
+663
View File
@@ -0,0 +1,663 @@
#define INTERACTING 2
#define TRAVEL 4
#define FIGHTING 8
//TRAITS
#define TRAIT_ROBUST 2
#define TRAIT_UNROBUST 4
#define TRAIT_SMART 8
#define TRAIT_DUMB 16
#define TRAIT_MEAN 32
#define TRAIT_FRIENDLY 64
#define TRAIT_THIEVING 128
//defines
#define MAX_RANGE_FIND 32
#define MIN_RANGE_FIND 16
#define FUZZY_CHANCE_HIGH 85
#define FUZZY_CHANCE_LOW 50
#define CHANCE_TALK 15
/*
NPC VAR EXPLANATIONS (for modules and other things)
doing = their current action, INTERACTING, TRAVEL or FIGHTING
interest = how interested the NPC is in the situation, if they are idle, this drops
timeout = this is internal
TARGET = their current target
LAST_TARGET = their last target
nearby = a list of nearby mobs
best_force = the highest force object, used for checking when to swap items
retal = this is internal
retal_target = this is internal
update_hands = this is a bool (1/0) to determine if the NPC should update what is in his hands
MYID = their ID card
MYPDA = their PDA
main_hand = what is in their "main" hand (chosen from left > right)
TRAITS = the traits assigned to this npc
mymjob = the job assigned to the npc
robustness = the chance for the npc to hit something
smartness = the inverse chance for an npc to do stupid things
attitude = the chance for an npc to do rude or mean things
slyness = the chance for an npc to do naughty things ie thieving
functions = the list of procs that the npc will use for modules
graytide = shitmin var to make them go psycho
*/
/mob/living/carbon/human/interactive
name = "interactive station member"
var/doing = 0
var/interest = 100
var/timeout = 0
var/inactivity_period = 0
var/TARGET = null
var/LAST_TARGET = null
var/list/nearby = list()
var/best_force = 0
var/retal = 0
var/mob/retal_target = null
var/update_hands = 0
//Job and mind data
var/obj/item/weapon/card/id/MYID
var/obj/item/device/pda/MYPDA
var/obj/item/main_hand
var/obj/item/other_hand
var/TRAITS = 0
var/datum/job/myjob
//trait vars
var/robustness = 50
var/smartness = 50
var/attitude = 50
var/slyness = 50
var/graytide = 0
var/chattyness = CHANCE_TALK
//modules
var/list/functions = list("nearbyscan","combat","doorscan","shitcurity","chatter")
/mob/living/carbon/human/interactive/proc/random()
//this is here because this has no client/prefs/brain whatever.
underwear = random_underwear(gender)
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
hair_color = random_short_color()
facial_hair_color = hair_color
eye_color = random_eye_color()
age = rand(AGE_MIN,AGE_MAX)
ready_dna(src,random_blood_type())
//job handling
var/list/jobs = SSjob.occupations
for(var/datum/job/J in jobs)
if(J.title == "Cyborg" || J.title == "AI" || J.title == "Chaplain" || J.title == "Mime")
jobs -= J
myjob = pick(jobs)
if(!graytide)
myjob.equip(src)
myjob.apply_fingerprints(src)
src.job = myjob
/mob/living/carbon/human/interactive/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
..()
retal = 1
retal_target = user
/mob/living/carbon/human/interactive/New()
..()
gender = pick(MALE,FEMALE)
if(gender == MALE)
name = "[pick(first_names_male)] [pick(last_names)]"
real_name = name
else
name = "[pick(first_names_female)] [pick(last_names)]"
real_name = name
random()
MYID = new(src)
MYID.name = "[src.real_name]'s ID Card ([myjob.title])"
MYID.assignment = "[myjob.title]"
MYID.registered_name = src.real_name
MYID.access = myjob.access
src.equip_to_slot_or_del(MYID, slot_wear_id)
MYPDA = new(src)
MYPDA.owner = src.real_name
MYPDA.ownjob = "Crew"
MYPDA.name = "PDA-[src.real_name] ([myjob.title])"
src.equip_to_slot_or_del(MYPDA, slot_belt)
zone_sel = new /obj/screen/zone_sel()
zone_sel.selecting = "chest"
if(prob(10)) //my x is augmented
//arms
if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
var/obj/item/organ/limb/r_arm/R = locate(/obj/item/organ/limb/r_arm) in organs
del(R)
organs += new /obj/item/organ/limb/robot/r_arm
else
var/obj/item/organ/limb/l_arm/L = locate(/obj/item/organ/limb/l_arm) in organs
del(L)
organs += new /obj/item/organ/limb/robot/l_arm
//legs
if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
var/obj/item/organ/limb/r_leg/R = locate(/obj/item/organ/limb/r_leg) in organs
del(R)
organs += new /obj/item/organ/limb/robot/r_leg
else
var/obj/item/organ/limb/l_leg/L = locate(/obj/item/organ/limb/l_leg) in organs
del(L)
organs += new /obj/item/organ/limb/robot/l_leg
//chest and head
if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
var/obj/item/organ/limb/chest/R = locate(/obj/item/organ/limb/chest) in organs
del(R)
organs += new /obj/item/organ/limb/robot/chest
else
var/obj/item/organ/limb/head/L = locate(/obj/item/organ/limb/head) in organs
del(L)
organs += new /obj/item/organ/limb/robot/head
for(var/obj/item/organ/limb/LIMB in organs)
LIMB.owner = src
update_icons()
update_damage_overlays(0)
update_augments()
hand = 0
if(TRAITS & TRAIT_ROBUST)
robustness = 75
else if(TRAITS & TRAIT_UNROBUST)
robustness = 25
//modifiers are prob chances, lower = smarter
if(TRAITS & TRAIT_SMART)
smartness = 25
else if(TRAITS & TRAIT_DUMB)
mutations |= CLUMSY
smartness = 75
if(TRAITS & TRAIT_MEAN)
attitude = 75
else if(TRAITS & TRAIT_FRIENDLY)
attitude = 1
if(TRAITS & TRAIT_THIEVING)
slyness = 75
/mob/living/carbon/human/interactive/attack_hand(mob/living/carbon/human/M as mob)
..()
if (health > 0)
if(M.a_intent == "help")
chatter()
if(M.a_intent == "harm")
retal = 1
retal_target = M
//THESE EXIST FOR DEBUGGING OF THE DOING/INTEREST SYSTEM EASILY
/mob/living/carbon/human/interactive/proc/doing2string(var/doin)
var/toReturn = ""
if(!doin)
toReturn = "not doing anything"
if(doin & INTERACTING)
toReturn += "interacting with something, "
if(doin & FIGHTING)
toReturn += "engaging in combat, "
if(doin & TRAVEL)
toReturn += "and going somewhere"
return toReturn
/mob/living/carbon/human/interactive/proc/interest2string(var/inter)
var/toReturn = "Flatlined"
if(inter >= 0 && inter <= 25)
toReturn = "Very Bored"
if(inter >= 26 && inter <= 50)
toReturn = "Bored"
if(inter >= 51 && inter <= 75)
toReturn = "Content"
if(inter >= 76)
toReturn = "Excited"
return toReturn
//END DEBUG
/mob/living/carbon/human/interactive/proc/isnotfunc()
if(!canmove)
return 1
if(health <= 0)
return 1
if(restrained())
return 1
if(paralysis)
return 1
if(stunned)
return 1
if(stat)
return 1
if(inactivity_period > 0)
return 1
return 0
/mob/living/carbon/human/interactive/proc/enforce_hands()
if(hand)
if(!l_hand)
main_hand = null
if(r_hand)
swap_hands()
else
if(!r_hand)
main_hand = null
if(l_hand)
swap_hands()
/mob/living/carbon/human/interactive/proc/swap_hands()
hand = !hand
var/obj/item/T = other_hand
main_hand = other_hand
other_hand = T
/mob/living/carbon/human/interactive/proc/take_to_slot(var/obj/item/G)
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_l_hand,"right hand" = slot_r_hand)
G.loc = src
if(G.force && G.force > best_force)
best_force = G.force
equip_in_one_of_slots(G, slots)
update_hands = 1
/mob/living/carbon/human/interactive/proc/insert_into_backpack()
var/list/slots = list ("left pocket" = slot_l_store,"right pocket" = slot_r_store,"left hand" = slot_l_hand,"right hand" = slot_r_hand)
var/obj/item/I = get_item_by_slot(pick(slots))
var/obj/item/weapon/storage/BP = get_item_by_slot(slot_back)
if(back && BP && I)
if(BP.can_be_inserted(I,0))
BP.handle_item_insertion(I,0)
else
unEquip(I,TRUE)
update_hands = 1
/mob/living/carbon/human/interactive/Life()
..()
if(isnotfunc()) return
if(a_intent != "disarm")
a_intent = "disarm"
//---------------------------
//---- interest flow control
if(interest < 0 || inactivity_period < 0)
if(interest < 0)
interest = 0
if(inactivity_period < 0)
inactivity_period = 0
if(interest > 100)
interest = 100
//---------------------------
nearby = list()
//VIEW FUNCTIONS
if(!l_hand || !r_hand)
update_hands = 1
if(update_hands)
if(l_hand || r_hand)
if(l_hand)
hand = 1
main_hand = l_hand
if(r_hand)
other_hand = r_hand
else if(r_hand)
hand = 0
main_hand = r_hand
if(l_hand) //this technically shouldnt occur, but its a redundancy
other_hand = l_hand
update_icons()
update_hands = 0
if(grabbed_by.len > 0)
for(var/obj/item/weapon/grab/G in grabbed_by)
if(Adjacent(G))
a_intent = "disarm"
G.assailant.attack_hand(src)
inactivity_period = 10
//proc functions
for(var/Proc in functions)
if(!isnotfunc())
spawn(1)
call(src,Proc)(src)
//target interaction stays hardcoded
if((TARGET && (TARGET in view(1))) || timeout >= 2)
if((TARGET in view(1,src)))//this is a bit redundant but it saves two if blocks
doing |= INTERACTING
//--------DOORS
if(istype(TARGET, /obj/machinery/door))
var/obj/machinery/door/D = TARGET
if(D.check_access(MYID) && !istype(D,/obj/machinery/door/poddoor))
D.open()
sleep(15)
var/turf/T = get_step(get_step(D.loc,dir),dir) //recursion yo
tryWalk(T)
//THIEVING SKILLS
if(prob(slyness))
//---------TOOLS
if(istype(TARGET, /obj/item/weapon))
var/obj/item/weapon/W = TARGET
if(W.force >= best_force || prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
if(!l_hand || !r_hand)
take_to_slot(W)
else
insert_into_backpack()
//---------FASHION
if(istype(TARGET,/obj/item/clothing))
if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
if(!l_hand || !r_hand)
var/obj/item/clothing/C = TARGET
take_to_slot(C)
if(equip_to_appropriate_slot(C))
C.update_icon()
else
var/obj/item/I = get_item_by_slot(C)
unEquip(I)
equip_to_appropriate_slot(C)
update_hands = 1
drop_item()
if(MYPDA in src.loc || MYID in src.loc)
if(MYPDA in src.loc)
equip_to_appropriate_slot(MYPDA)
if(MYID in src.loc)
equip_to_appropriate_slot(MYID)
update_icons()
//THIEVING SKILLS END
//-------------TOUCH ME
if(istype(TARGET,/obj/structure))
var/obj/structure/STR = TARGET
if(main_hand)
var/obj/item/weapon/W = main_hand
STR.attackby(W, src)
else
STR.attack_hand(src)
interest = interest + 25
doing = doing & ~INTERACTING
timeout = 0
TARGET = null
else
tryWalk(TARGET)
timeout++
if(!doing)
interest--
else
interest++
if(inactivity_period > 0)
inactivity_period--
//this is boring, lets move
if(!doing && !isnotfunc() && !TARGET)
doing |= TRAVEL
if(nearby.len > 4)
//i'm crowded, time to leave
TARGET = pick(target_filter(orange(MAX_RANGE_FIND,src)))
else if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
//chance to chase an item
TARGET = locate(/obj/item) in orange(MIN_RANGE_FIND,src)
else if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
//chance to leave
TARGET = locate(/obj/machinery/door) in orange(MIN_RANGE_FIND,src) // this is a sort of fix for the current pathing.
else
//else, target whatever, or go to our department
if(prob(rand(FUZZY_CHANCE_LOW,FUZZY_CHANCE_HIGH)))
TARGET = pick(target_filter(orange(MIN_RANGE_FIND,src)))
else
TARGET = pick(get_area_turfs(job2area(myjob)))
tryWalk(TARGET)
LAST_TARGET = TARGET
/mob/living/carbon/human/interactive/proc/tryWalk(var/turf/TARGET)
if(!isnotfunc())
if(!walk2derpless(TARGET))
timeout++
else
timeout++
/mob/living/carbon/human/interactive/proc/walk2derpless(var/target)
set background = 1
var/turf/T = get_turf(target)
var/turf/D = get_step(src,dir)
if(D)
if(!D.density)
walk_to(src,T,0,5)
doing = doing & ~TRAVEL
return 1
else
sidestep(D)
doing = doing & ~TRAVEL
return 0
else
doing = doing & ~TRAVEL
return 0
/mob/living/carbon/human/interactive/proc/job2area(var/target)
var/datum/job/T = target
if(T.title == "Assistant")
return /area/hallway/primary
if(T.title == "Captain" || T.title == "Head of Personnel")
return /area/bridge
if(T.title == "Bartender" || T.title == "Chef")
return /area/crew_quarters
if(T.title == "Station Engineer" || T.title == "Chief Engineer" || T.title == "Atmospheric Technician")
return /area/engine
if(T.title == "Chief Medical Officer" || T.title == "Medical Doctor" || T.title == "Chemist" || T.title == "Virologist" || T.title == "Geneticist")
return /area/medical
if(T.title == "Research Director" || T.title == "Scientist" || T.title == "Roboticist")
return /area/toxins
if(T.title == "Head of Security" || T.title == "Warden" || T.title == "Security Officer" || T.title == "Detective")
return /area/security
else
return pick(/area/hallway,/area/crew_quarters)
/mob/living/carbon/human/interactive/proc/target_filter(var/target)
var/list/L = target
for(var/atom/A in target)
if(istype(A,/area) || istype(A,/turf/unsimulated) || istype(A,/turf/space))
L -= A
return L
/mob/living/carbon/human/interactive/proc/denied_filter(var/target)
var/list/denied = list(/obj/structure/window,/obj/structure/table) //expand me
for(var/a in denied)
if(istype(target,a))
return 1
return 0
///BUILT IN MODULES
/mob/living/carbon/human/interactive/proc/chatter(obj)
var/verbs_use = pick_list("npc_chatter.txt","verbs_use")
var/verbs_touch = pick_list("npc_chatter.txt","verbs_touch")
var/verbs_move = pick_list("npc_chatter.txt","verbs_move")
var/nouns_insult = pick_list("npc_chatter.txt","nouns_insult")
var/nouns_generic = pick_list("npc_chatter.txt","nouns_generic")
var/nouns_objects = pick_list("npc_chatter.txt","nouns_objects")
var/nouns_body = pick_list("npc_chatter.txt","nouns_body")
var/adjective_insult = pick_list("npc_chatter.txt","adjective_insult")
var/adjective_objects = pick_list("npc_chatter.txt","adjective_objects")
var/adjective_generic = pick_list("npc_chatter.txt","adjective_generic")
var/curse_words = pick_list("npc_chatter.txt","curse_words")
if(doing & INTERACTING)
if(prob(chattyness))
var/chat = pick("This [nouns_objects] is a little [adjective_objects].",
"Well [verbs_use] my [nouns_body], this [nouns_insult] is pretty [adjective_insult].",
"[capitalize(curse_words)], what am I meant to do with this [adjective_insult] [nouns_objects].")
src.say(chat)
if(doing & TRAVEL)
if(prob(chattyness))
var/chat = pick("Oh [curse_words], [verbs_move]!",
"Time to get my [adjective_generic] [adjective_insult] [nouns_body] elsewhere.",
"I wonder if there is anything to [verbs_use] and [verbs_touch] somewhere else..")
src.say(chat)
if(doing & FIGHTING)
if(prob(chattyness))
var/chat = pick("I'm going to [verbs_use] you, you [adjective_insult] [nouns_insult]!",
"Rend and [verbs_touch], Rend and [verbs_use]!",
"You [nouns_insult], I'm going to [verbs_use] you right in the [nouns_body]. JUST YOU WAIT!")
src.say(chat)
if(prob(chattyness/2))
var/what = pick(1,2,3,4,5)
switch(what)
if(1)
src.say("Well [curse_words], this is a [adjective_generic] situation.")
if(2)
src.say("Oh [curse_words], that [nouns_insult] was one hell of an [adjective_insult] [nouns_body].")
if(3)
src.say("I want to [verbs_use] that [nouns_insult] when I find them.")
if(4)
src.say("[pick("Innocent","Guilty","Traitorous","Honk")] until proven [adjective_generic]!")
if(5)
var/toSay = ""
for(var/i = 0; i < 5; i++)
curse_words = pick_list("npc_chatter.txt","curse_words")
toSay += "[curse_words] "
src.say("Hey [nouns_generic], why dont you go [toSay], you [nouns_insult]!")
/mob/living/carbon/human/interactive/proc/shitcurity(obj)
if(retal && TARGET)
for(var/obj/item/I in src.contents)
if(istype(I,/obj/item/weapon/restraints/handcuffs))
take_to_slot(I)
I.attack(TARGET,src)
sleep(25)
/mob/living/carbon/human/interactive/proc/sidestep(obj)
var/shift = 0
for(var/dir in cardinal)
var/turf/T = get_step(src,dir)
if(T)
for(var/obj/A in T.contents)
if(denied_filter(A))
shift = 1
if(T.density)
shift = 1
if(shift)
if(src.dir == NORTH || SOUTH)
var/towalk = pick(EAST,WEST)
walk_to(src,get_step(src,towalk),0,5)
else
var/towalk = pick(NORTH,SOUTH)
walk_to(src,get_step(src,towalk),0,5)
/mob/living/carbon/human/interactive/proc/combat(obj)
set background = 1
enforce_hands()
if(canmove)
if(prob(attitude) && (graytide || (TRAITS & TRAIT_MEAN)) || retal)
a_intent = "harm"
zone_sel.selecting = pick("chest","r_leg","l_leg","r_arm","l_arm","head")
doing |= FIGHTING
if(retal)
TARGET = retal_target
else
var/mob/living/M = locate(/mob/living) in oview(7,src)
if(istype(M,/mob/living/carbon/human/interactive/greytide))
return
if(M != src)
TARGET = M
if(!M)
doing = doing & ~FIGHTING
if((TARGET && (doing & FIGHTING)) || graytide) // this is a redundancy check
var/mob/living/M = TARGET
if(istype(M,/mob/living))
if(M in range(FUZZY_CHANCE_LOW,src))
if(M.health > 1)
if(main_hand)
if(main_hand.force != 0)
if(istype(main_hand,/obj/item/weapon/gun/projectile))
var/obj/item/weapon/gun/projectile/P = main_hand
if(!P.chambered)
P.chamber_round()
P.update_icon()
else if(P.get_ammo(1) == 0)
P.attack_self(src)
else
P.afterattack(TARGET, src)
else if(istype(main_hand,/obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/P = main_hand
if(!P.can_shoot())
P.update_icon()
drop_item()
else
P.afterattack(TARGET, src)
else
if(get_dist(src,TARGET) > 2)
if(!walk2derpless(TARGET))
timeout++
else
var/obj/item/weapon/W = main_hand
if(prob(robustness))
W.attack(TARGET,src)
sleep(1)
else
if(get_dist(src,TARGET) > 2)
tryWalk(TARGET)
else
if(Adjacent(TARGET))
M.attack_hand(src)
sleep(1)
timeout++
else if(timeout >= 10 || M.health <= 1 || !(M in range(14,src)))
doing = doing & ~FIGHTING
timeout = 0
TARGET = null
retal = 0
retal_target = null
else
timeout++
/mob/living/carbon/human/interactive/proc/doorscan(obj)
for(var/dir in cardinal)
var/turf/T = get_step(src,dir)
if(T)
for(var/obj/machinery/door/D in T.contents)
if(D.check_access(MYID) && !istype(D,/obj/machinery/door/poddoor) && D.density)
//layer 3.1 is "closed" for most doors, this is just a hacky !open check because i cannot find an open var
spawn(1)
D.open()
sleep(5)
walk2derpless(get_step(D,dir))
/mob/living/carbon/human/interactive/proc/nearbyscan(obj)
for(var/mob/living/M in view(4,src))
if(M != src)
nearby += M
//END OF MODULES
/mob/living/carbon/human/interactive/angry
New()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
..()
/mob/living/carbon/human/interactive/friendly
New()
TRAITS |= TRAIT_FRIENDLY
TRAITS |= TRAIT_UNROBUST
..()
/mob/living/carbon/human/interactive/greytide
New()
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_MEAN
TRAITS |= TRAIT_THIEVING
TRAITS |= TRAIT_DUMB
graytide = 1
..()
#undef INTERACTING
#undef TRAVEL
#undef FIGHTING
#undef TRAIT_ROBUST
#undef TRAIT_UNROBUST
#undef TRAIT_SMART
#undef TRAIT_DUMB
#undef TRAIT_MEAN
#undef TRAIT_FRIENDLY
#undef TRAIT_THIEVING
+9 -10
View File
@@ -113,10 +113,6 @@
/mob/living/carbon/alien/proc/handle_mutations_and_radiation()
if(getFireLoss())
if((COLD_RESISTANCE in mutations) || prob(5))
adjustFireLoss(-1)
// Aliens love radiation nom nom nom
if (radiation)
if (radiation > 100)
@@ -164,12 +160,15 @@
if (client.statpanel == "Status")
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
var/ETA
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
ETA = "ETA"
if(SHUTTLE_DOCKED)
ETA = "ETD"
if(ETA)
var/timeleft = SSshuttle.emergency.timeLeft()
stat(null, "[ETA]-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/living/carbon/alien/Stun(amount)
if(status_flags & CANSTUN)
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
@@ -50,10 +50,15 @@
//Hunter verbs
/mob/living/carbon/alien/humanoid/hunter/proc/toggle_leap()
/mob/living/carbon/alien/humanoid/hunter/proc/toggle_leap(var/message = 1)
leap_on_click = !leap_on_click
leap_icon.icon_state = "leap_[leap_on_click ? "on":"off"]"
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
if(message)
src << "<span class='noticealien'>You will now [leap_on_click ? "leap at":"slash at"] enemies!</span>"
else
return
/mob/living/carbon/alien/humanoid/hunter/ClickOn(var/atom/A, var/params)
face_atom(A)
@@ -66,6 +71,10 @@
#define MAX_ALIEN_LEAP_DIST 7
/mob/living/carbon/alien/humanoid/hunter/proc/leap_at(var/atom/A)
if(pounce_cooldown)
src << "<span class='alertalien'>You are too fatigued to pounce right now!</span>"
return
if(leaping) //Leap while you leap, so you can leap while you leap
return
@@ -76,13 +85,14 @@
if(lying)
return
leaping = 1
update_icons()
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
leaping = 0
update_icons()
else //Maybe uses plasma in the future, although that wouldn't make any sense...
leaping = 1
update_icons()
throw_at(A,MAX_ALIEN_LEAP_DIST,1)
leaping = 0
update_icons()
/mob/living/carbon/alien/humanoid/throw_impact(A)
/mob/living/carbon/alien/humanoid/hunter/throw_impact(A)
var/msg = ""
if(A)
@@ -92,6 +102,11 @@
L.Weaken(5)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
toggle_leap(0)
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time) //3s by default
pounce_cooldown = !pounce_cooldown
else
msg = "<span class ='alertalien'>[src] smashes into [A]!</span>"
weakened = 2
@@ -5,6 +5,8 @@
var/obj/item/l_store = null
var/caste = ""
var/leap_on_click = 0
var/pounce_cooldown = 0
var/pounce_cooldown_time = 30
update_icon = 1
//This is fine right now, if we're adding organ specific damage this needs to be updated
@@ -85,19 +87,22 @@
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user)
if(user.a_intent == "harm")
..(user, 1)
adjustBruteLoss(14 + rand(1,9))
Paralyse(1)
step_away(src,user,15)
sleep(1)
step_away(src,user,15)
return 1
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if(..())
switch(M.a_intent)
if ("harm")
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
damage += 14
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
@@ -23,7 +23,7 @@
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
if(SSmob.times_fired%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe()
@@ -38,14 +38,10 @@
//Chemicals in the body
handle_chemicals_in_body()
//Disabilities
handle_disabilities()
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
blinded = null
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
@@ -67,28 +63,6 @@
if(client)
handle_regular_hud_updates()
/mob/living/carbon/alien/humanoid/proc/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
src << "<span class='danger'>You have a seizure!</span>"
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
var/difference = abs(current-loc_temp) //get difference
@@ -110,12 +84,12 @@
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
eye_blind = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
eye_blind = 1
stat = DEAD
silent = 0
return 1
@@ -131,11 +105,11 @@
if(paralysis)
AdjustParalysis(-1)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
@@ -149,16 +123,15 @@
move_delay_add = max(0, move_delay_add - rand(1, 2))
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
eye_blind = max(eye_blind, 1)
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
@@ -189,7 +162,7 @@
/mob/living/carbon/alien/humanoid/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
if (stat == 2)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
@@ -242,12 +215,12 @@
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
if ((eye_blind))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
if (disabilities & NEARSIGHT)
client.screen += global_hud.vimpaired
if (eye_blurry)
@@ -265,3 +238,4 @@
reset_view(null)
return 1
@@ -104,17 +104,21 @@
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user)
if(user.a_intent == "harm")
..(user, 1)
adjustBruteLoss(5 + rand(1,9))
Paralyse(1)
spawn()
step_away(src,user,15)
sleep(1)
step_away(src,user,15)
return 1
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if(..())
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
add_logs(M, src, "attacked", admin=0)
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
@@ -20,7 +20,7 @@
amount_grown++
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
if(SSair.times_fired%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe()
else //Still give containing object the chance to interact
@@ -38,7 +38,6 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
blinded = null
//Handle temperature/pressure differences between body and environment
handle_environment(enviroment)
@@ -64,12 +63,12 @@
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
eye_blind = max(1, eye_blind)
silent = 0
else //ALIVE. LIGHTS ARE ON
if(health < -25 || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
eye_blind = max(1, eye_blind)
silent = 0
return 1
@@ -84,11 +83,11 @@
if(paralysis)
AdjustParalysis(-2)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
else if(sleeping)
sleeping = max(sleeping-1, 0)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
@@ -102,16 +101,15 @@
move_delay_add = max(0, move_delay_add - rand(1, 2))
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
eye_blind = max(eye_blind, 1)
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
@@ -138,7 +136,7 @@
/mob/living/carbon/alien/larva/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in mutations))
if (stat == 2)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
@@ -191,12 +189,12 @@
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
if ((eye_blind))
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
if (disabilities & NEARSIGHT)
client.screen += global_hud.vimpaired
if (eye_blurry)
@@ -217,3 +215,4 @@
/mob/living/carbon/alien/larva/proc/handle_random_events()
return
+2 -2
View File
@@ -101,7 +101,7 @@
breath.toxins -= toxins_used
breath.oxygen += toxins_used
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(breath.temperature > (T0C+66)) // Hot air hurts :(
if(prob(20))
src << "<span class='danger'>You feel a searing heat in your lungs!</span>"
fire_alert = max(fire_alert, 1)
@@ -124,7 +124,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
if(air_master.current_cycle%3==1)
if(SSmob.times_fired%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -14,10 +14,11 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(istype(loc, /mob/living))
affected_mob = loc
affected_mob.status_flags |= XENO_HOST
SSobj.processing.Add(src)
if(istype(affected_mob,/mob/living/carbon))
var/mob/living/carbon/H = affected_mob
H.med_hud_set_status()
processing_objects.Add(src)
SSobj.processing.Add(src)
spawn(0)
AddInfectionImages(affected_mob)
else
@@ -37,10 +38,11 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(!affected_mob) return
if(loc != affected_mob)
affected_mob.status_flags &= ~(XENO_HOST)
SSobj.processing.Remove(src)
if(istype(affected_mob,/mob/living/carbon))
var/mob/living/carbon/H = affected_mob
H.med_hud_set_status()
processing_objects.Remove(src)
SSobj.processing.Remove(src)
spawn(0)
RemoveInfectionImages(affected_mob)
affected_mob = null
@@ -53,6 +55,8 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
switch(stage)
if(2, 3)
if(affected_mob == DEAD)
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
@@ -62,6 +66,8 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
if(prob(1))
affected_mob << "<span class='danger'>Mucous runs down the back of your throat.</span>"
if(4)
if(affected_mob == DEAD)
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
@@ -76,9 +82,10 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
affected_mob.adjustToxLoss(1)
affected_mob.updatehealth()
if(5)
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(affected_mob != DEAD)
affected_mob << "<span class='danger'>You feel something tearing its way out of your stomach...</span>"
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(50))
AttemptGrow()
+6 -9
View File
@@ -18,7 +18,6 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
blinded = null
//Handle temperature/pressure differences between body and environment
if(environment) // More error checking
@@ -125,12 +124,12 @@
updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
eye_blind = max(eye_blind, 1)
silent = 0
else //ALIVE. LIGHTS ARE ON
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
death()
blinded = 1
eye_blind = max(eye_blind, 1)
silent = 0
return 1
@@ -144,8 +143,7 @@
if(31 to INFINITY)
emp_damage = 30//Let's not overdo it
if(21 to 30)//High level of EMP damage, unable to see, hear, or speak
eye_blind = 1
blinded = 1
eye_blind = max(eye_blind, 1)
ear_deaf = 1
silent = 1
if(!alert)//Sounds an alarm, but only once per 'level'
@@ -156,7 +154,6 @@
emp_damage -= 1
if(20)
alert = 0
blinded = 0
eye_blind = 0
ear_deaf = 0
silent = 0
@@ -209,7 +206,7 @@
/mob/living/carbon/brain/proc/handle_regular_hud_updates()
if (stat == 2 || (XRAY in src.mutations))
if (stat == 2)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
@@ -249,12 +246,12 @@
client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired)
if ((blind && stat != 2))
if ((blinded))
if (eye_blind)
blind.layer = 18
else
blind.layer = 0
if (disabilities & NEARSIGHTED)
if (disabilities & NEARSIGHT)
client.screen += global_hud.vimpaired
if (eye_blurry)
+14 -6
View File
@@ -1,3 +1,8 @@
/mob/living/carbon/UnarmedAttack(var/atom/A, var/proximity_flag)
..()
for(var/datum/mutation/human/HM in dna.mutations)
. += HM.on_attack_hand(A, src)
/mob/living/carbon/prepare_huds()
..()
prepare_data_huds()
@@ -27,7 +32,7 @@
src.nutrition -= HUNGER_FACTOR/10
if(src.m_intent == "run")
src.nutrition -= HUNGER_FACTOR/10
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
if((src.disabilities & FAT) && src.m_intent == "run" && src.bodytemperature <= 360)
src.bodytemperature += 2
/mob/living/carbon/movement_delay()
@@ -83,13 +88,16 @@
//src.updatehealth()
src.visible_message(
"<span class='danger'>[src] was shocked by the [source]!</span>", \
"<span class='userdanger'>You feel a powerful shock course through your body!</span>", \
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
"<span class='danger'>You hear a heavy electrical crack.</span>" \
)
// if(src.stunned < shock_damage) src.stunned = shock_damage
Stun(5)//This should work for now, more is really silly and makes you lay there forever
// if(src.weakened < 20*siemens_coeff) src.weakened = 20*siemens_coeff
Weaken(5)
src.jitteriness += 1000 //High numbers for violent convulsions
src.stuttering += 2
Stun(2)
spawn(20)
src.jitteriness -= 990 //Still jittery, but vastly less
Stun(3)
Weaken(3)
return shock_damage
@@ -52,8 +52,8 @@
return 1
/mob/living/carbon/proc/ChangeToHusk()
if(HUSK in mutations) return
mutations.Add(HUSK)
if(disabilities & HUSK) return
disabilities |= HUSK
status_flags |= DISFIGURED //makes them unknown without fucking up other stuff like admintools
return 1
@@ -239,7 +239,9 @@
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(getorgan(/obj/item/organ/brain))
if(!key)
if(istype(src,/mob/living/carbon/human/interactive))
msg += "<span class='deadsay'>[t_He] [t_is] appears to be some sort of sick automaton, [t_his] eyes are glazed over and [t_his] mouth is slightly agape.</span>\n"
else if(!key)
msg += "<span class='deadsay'>[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.</span>\n"
else if(!client)
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
+27 -20
View File
@@ -32,6 +32,8 @@
randomize_human(src)
..()
var/mob/M = src
faction |= "\ref[M]"
/mob/living/carbon/human/prepare_data_huds()
//Update med hud images...
@@ -51,20 +53,25 @@
/mob/living/carbon/human/Stat()
..()
statpanel("Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
if(malf.malf_mode_declared && (malf.apcs > 0))
stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
if(emergency_shuttle)
if(emergency_shuttle.online && emergency_shuttle.location < 2)
var/timeleft = emergency_shuttle.timeleft()
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
if (client.statpanel == "Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
if(ticker && ticker.mode && ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
if(malf.malf_mode_declared && (malf.apcs > 0))
stat(null, "Time left: [max(malf.AI_win_timeleft/malf.apcs, 0)]")
var/ETA
switch(SSshuttle.emergency.mode)
if(SHUTTLE_CALL)
ETA = "ETA"
if(SHUTTLE_DOCKED)
ETA = "ETD"
if(ETA)
var/timeleft = SSshuttle.emergency.timeLeft()
stat(null, "[ETA]-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
if (internal)
if (!internal.air_contents)
qdel(internal)
@@ -303,7 +310,7 @@
if(href_list["criminal"])
if(istype(usr, /mob/living/carbon/human))
var/mob/living/carbon/human/H = usr
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security))
if(usr.stat || usr == src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
// Checks the user has security clearence before allowing them to change arrest status via hud, comment out to enable all access
@@ -329,7 +336,7 @@
if(href_list["status"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Discharged", "Cancel")
if(R)
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security))
if(setcriminal != "Cancel")
investigate_log("[src.key] has been set from [R.fields["criminal"]] to [setcriminal] by [usr.name] ([usr.key]).", "records")
R.fields["criminal"] = setcriminal
@@ -338,7 +345,7 @@
if(href_list["view"])
if(R)
if(usr.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security) || !istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if(usr.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security))
return
usr << "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]"
usr << "<b>Minor Crimes:</b>"
@@ -363,7 +370,7 @@
var/t1 = copytext(sanitize(input("Please input minor crime names:", "Security HUD", "", null) as text),1,MAX_MESSAGE_LEN)
var/t2 = copytext(sanitize(input("Please input minor crime details:", "Security HUD", "", null) as message),1,MAX_MESSAGE_LEN)
if(R)
if (!t1 || !t2 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security) || !istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if (!t1 || !t2 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security))
return
var/crime = data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
data_core.addMinorCrime(R.fields["id"], crime)
@@ -374,7 +381,7 @@
var/t1 = copytext(sanitize(input("Please input major crime names:", "Security HUD", "", null) as text),1,MAX_MESSAGE_LEN)
var/t2 = copytext(sanitize(input("Please input major crime details:", "Security HUD", "", null) as message),1,MAX_MESSAGE_LEN)
if(R)
if (!t1 || !t2 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security) || !istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if (!t1 || !t2 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security))
return
var/crime = data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
data_core.addMajorCrime(R.fields["id"], crime)
@@ -384,7 +391,7 @@
if(href_list["view_comment"])
if(R)
if(H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security) || !istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if(H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security))
return
usr << "<b>Comments/Log:</b>"
var/counter = 1
@@ -398,7 +405,7 @@
if(R)
var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN)
if(R)
if (!t1 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security) || !istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses))
if (!t1 || !allowed_access || H.stat || H.weakened || H.stunned || H.restrained() || !istype(H.glasses, /obj/item/clothing/glasses/hud/security))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
@@ -1,3 +1,7 @@
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user)
adjustBruteLoss(5)
Weaken(4)
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M)
if(..()) //to allow surgery to return properly.
return
@@ -44,18 +44,6 @@
else
heal_overall_damage(0, -amount)
/mob/living/carbon/human/Stun(amount)
if(HULK in mutations) return
..()
/mob/living/carbon/human/Weaken(amount)
if(HULK in mutations) return
..()
/mob/living/carbon/human/Paralyse(amount)
if(HULK in mutations) return
..()
mob/living/carbon/human/proc/hat_fall_prob()
var/multiplier = 1
var/obj/item/clothing/head/H = head
@@ -441,7 +441,6 @@ emp_act
update_damage_overlays(0)
updatehealth()
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
"<span class='userdanger'>[M.name] has hit [src]!</span>")
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
@@ -21,6 +21,7 @@
var/underwear = "Nude" //Which underwear the player wants
var/undershirt = "Nude" //Which undershirt the player wants
var/socks = "Nude" //Which socks the player wants
var/backbag = 2 //Which backpack type the player has chosen. Nothing, Satchel or Backpack.
//Equipment slots
+27 -56
View File
@@ -49,18 +49,21 @@
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
//to find it.
blinded = null
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
tinttotal = tintcheck() //here as both hud updates and status updates call it
//TODO: seperate this out
var/datum/gas_mixture/environment = loc.return_air()
handle_regular_hud_updates()
//No need to update all of these procs if the guy is dead.
if(stat != DEAD)
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
breathe() //Only try to take a breath every 4 ticks, unless suffocating
for(var/datum/mutation/human/HM in dna.mutations)
HM.on_life(src)
if(SSmob.times_fired%4==2 || failed_last_breath) //First, resolve location and get a breath
breathe() //Only try to take a breath every 4 ticks, unless suffocating
else //Still give containing object the chance to interact
if(istype(loc, /obj/))
var/obj/location_as_object = loc
@@ -97,8 +100,6 @@
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
handle_regular_hud_updates()
if(dna)
dna.species.spec_life(src) // for mutantraces
@@ -125,34 +126,6 @@
/mob/living/carbon/human/proc/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 1))
src << "<span class='danger'>You have a seizure!</span>"
for(var/mob/O in viewers(src, null))
if(O == src)
continue
O.show_message(text("<span class='userdanger'>[src] starts having a seizure!</span>"), 1)
Paralyse(10)
Jitter(1000)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
drop_item()
emote("cough")
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
Stun(10)
switch(rand(1, 3))
if(1)
emote("twitch")
if(2 to 3)
say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point.
var/y_offset = pixel_y + rand(-1,1)
animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1)
if (disabilities & NERVOUS)
if (prob(10))
stuttering = max(10, stuttering)
if (getBrainLoss() >= 60 && stat != 2)
if (prob(3))
switch(pick(1,2,3))
@@ -335,7 +308,7 @@
/mob/living/carbon/human/proc/get_cold_protection(temperature)
if(COLD_RESISTANCE in mutations)
if(dna.check_mutation(COLDRES))
return 1 //Fully protected from the cold.
if(dna && COLDRES in dna.species.specflags)
@@ -437,13 +410,13 @@
/mob/living/carbon/human/proc/handle_regular_status_updates()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
eye_blind = max(eye_blind, 1)
silent = 0
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain))
death()
blinded = 1
eye_blind = max(eye_blind, 1)
silent = 0
return 1
@@ -460,11 +433,7 @@
adjustOxyLoss(1)*/
if(hallucination)
if(hallucination >= 20)
if(prob(3))
fake_attack(src)
if(!handling_hal)
spawn handle_hallucinations() //The not boring kind!
spawn handle_hallucinations()
if(hallucination<=2)
hallucination = 0
@@ -477,13 +446,13 @@
if(paralysis)
AdjustParalysis(-1)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
else if(sleeping)
handle_dreams()
adjustStaminaLoss(-10)
sleeping = max(sleeping-1, 0)
blinded = 1
eye_blind = max(eye_blind, 1)
stat = UNCONSCIOUS
if( prob(10) && health && !hal_crit )
spawn(0)
@@ -493,27 +462,29 @@
stat = CONSCIOUS
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
blinded = 1
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
eye_blind = max(eye_blind, 1)
else if(eye_blind) //blindness, heals slowly over time
eye_blind = max(eye_blind-1,0)
blinded = 1
else if(tinttotal >= TINT_BLIND) //covering your eyes heals blurry eyes faster
eye_blurry = max(eye_blurry-3, 0)
// blinded = 1 //now handled under /handle_regular_hud_updates()
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
//Ears
if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
ear_deaf = max(ear_deaf, 1)
else if(istype(ears, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster, and slowly heals deafness
ear_damage = max(ear_damage-0.15, 0)
ear_deaf = max(ear_deaf-1, 1)
else if(ear_deaf) //deafness, heals slowly over time
ear_deaf = max(ear_deaf-1, 0)
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
ear_damage = max(ear_damage-0.05, 0)
else
/* might be better to create a variable here, and instead of doing this nested for. */
// deafness heals slowly over time, unless ear_damage is over 100
if (ear_damage < 100)
// Heal the first 1/3 here
ear_deaf = max(ear_deaf - 1, 0)
ear_damage = max(ear_damage-0.05, 0)
if(istype(ears, /obj/item/clothing/ears/earmuffs)) // earmuffs rest your ears, healing 3x faster, but keeping you deaf.
// Heal the 2/3 here
ear_deaf = max(ear_deaf, 1)
ear_damage = max(ear_damage-0.10, 0)
//Dizziness
if(dizziness)
@@ -707,7 +678,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
if(air_master.current_cycle%3==1)
if(SSmob.times_fired%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10

Some files were not shown because too many files have changed in this diff Show More