Merge branch 'master' into upstream-merge-32116

This commit is contained in:
LetterJay
2017-10-29 03:45:59 -04:00
committed by GitHub
115 changed files with 2009 additions and 1736 deletions

View File

@@ -237,6 +237,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=icissue'>IC</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=close'>CLOSE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=resolve'>RSLVE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=handleissue'>HANDLE</A>)"
//private
/datum/admin_help/proc/LinkedReplyName(ref_src)
@@ -382,6 +383,22 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
AddInteraction("Marked as IC issue by [key_name]")
Resolve(silent = TRUE)
//Let the initiator know their ahelp is being handled
/datum/admin_help/proc/HandleIssue(key_name = key_name_admin(usr))
if(state != AHELP_ACTIVE)
return
var/msg = "<span class ='adminhelp'>Your ticket is now being handled by an admin. Please be patient.</span>"
if(initiator)
to_chat(initiator, msg)
SSblackbox.inc("ahelp_handleissue")
msg = "Ticket [TicketHref("#[id]")] is being handled by [key_name]"
message_admins(msg)
log_admin_private(msg)
AddInteraction("Being handled by [key_name]")
//Show the ticket panel
/datum/admin_help/proc/TicketPanel()
var/list/dat = list("<html><head><title>Ticket #[id]</title></head>")
@@ -442,6 +459,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
Close()
if("resolve")
Resolve()
if("handleissue")
HandleIssue()
if("reopen")
Reopen()
@@ -489,9 +508,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
return
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
return
msg = trim(msg)
if(!msg)
return

View File

@@ -82,6 +82,7 @@
var/valueholder = "derp"
var/objholder = /obj/structure/closet
var/atom/movable/stored = null
var/list/preview = list()
/datum/buildmode/New(client/c)
create_buttons()
@@ -94,6 +95,8 @@
holder.screen -= buttons
holder.click_intercept = null
holder.show_popup_menus = 1
usr.client.images -= preview
preview.Cut()
qdel(src)
return
@@ -150,6 +153,7 @@
if(AREA_BUILDMODE)
dat += "***********************************************************"
dat += "Left Mouse Button on turf/obj/mob = Select corner"
dat += "Right Mouse Button on turf/obj/mob = Reset corner selection"
dat += "Right Mouse Button on buildmode button = Select generator"
dat += "***********************************************************"
if(COPY_BUILDMODE)
@@ -338,13 +342,20 @@
throw_atom.throw_at(object, 10, 1,user)
log_admin("Build Mode: [key_name(user)] threw [throw_atom] at [object] ([object.x],[object.y],[object.z])")
if(AREA_BUILDMODE)
if(!cornerA)
cornerA = get_turf(object)
return
if(cornerA && !cornerB)
cornerB = get_turf(object)
if(left_click) //rectangular
if(!cornerA)
cornerA = get_turf(object)
preview += image('icons/turf/overlays.dmi',cornerA,"greenOverlay")
usr.client.images -= preview
usr.client.images += preview
return
if(cornerA && !cornerB)
cornerB = get_turf(object)
preview += image('icons/turf/overlays.dmi',cornerB,"blueOverlay")
usr.client.images -= preview
usr.client.images += preview
to_chat(user, "<span class='boldwarning'>Region selected, if you're happy with your selection left click again, otherwise right click.</span>")
return
if(cornerA && cornerB)
if(!generator_path)
to_chat(user, "<span class='warning'>Select generator type first.</span>")
@@ -354,10 +365,18 @@
if(GLOB.reloading_map)
to_chat(user, "<span class='boldwarning'>You are already reloading an area! Please wait for it to fully finish loading before trying to load another!</span>")
return
G.defineRegion(cornerA,cornerB,1)
G.generate()
G.defineRegion(cornerA, cornerB, 1)
for(var/t in G.map)
preview += image('icons/turf/overlays.dmi', t ,"redOverlay")
usr.client.images -= preview
usr.client.images += preview
var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No")
if(confirm == "Yes")
G.generate()
cornerA = null
cornerB = null
usr.client.images -= preview
preview.Cut()
return
//Something wrong - Reset
cornerA = null

View File

@@ -45,7 +45,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/allow_midround_antag = 1
var/preferred_map = null
var/pda_style = MONO
var/uses_glasses_colour = 0
var/screenshake = 100
@@ -285,10 +285,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
if(CONFIG_GET(flag/join_with_mutant_race))
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
else
dat += "<b>Species:</b> Human<BR>"
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</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>"
@@ -337,79 +334,79 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</td>"
if(CONFIG_GET(flag/join_with_mutant_race)) //We don't allow mutant bodyparts for humans either unless this is true.
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<td valign='top' width='14%'>"
dat += "<td valign='top' width='14%'>"
dat += "<h3>Mutant Color</h3>"
dat += "<h3>Mutant Color</h3>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "</td>"
dat += "</td>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Tail</h3>"
dat += "<h3>Tail</h3>"
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Snout</h3>"
dat += "<h3>Snout</h3>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Horns</h3>"
dat += "<h3>Horns</h3>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Frills</h3>"
dat += "<h3>Frills</h3>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Spines</h3>"
dat += "<h3>Spines</h3>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Body Markings</h3>"
dat += "<h3>Body Markings</h3>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "</td>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Legs</h3>"
dat += "<h3>Legs</h3>"
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if(CONFIG_GET(flag/join_with_mutant_humans))
if("tail_human" in pref_species.mutant_bodyparts)
@@ -574,61 +571,60 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "[features["flavor_text"]]"
else
dat += "[TextPreview(features["flavor_text"])]...<BR>"
if(CONFIG_GET(flag/join_with_mutant_race))//really don't need this check, but fuck un-tabbing all those lines
dat += "<h2>Body</h2>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : "Female"]</a><BR>"
dat += "<b>Species:</b><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A><BR>"
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><BR>"
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<b>Primary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<b>Secondary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
dat += "<b>Tertiary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
if(pref_species.use_skintones)
dat += "<b>Skin Tone: </b><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Genitals Use Skintone:</b><a href='?_src_=prefs;preference=genital_colour'>[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<h2>Body</h2>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : "Female"]</a><BR>"
dat += "<b>Species:</b><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A><BR>"
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><BR>"
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<b>Primary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<b>Secondary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
dat += "<b>Tertiary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
if(pref_species.use_skintones)
dat += "<b>Skin Tone: </b><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Genitals Use Skintone:</b><a href='?_src_=prefs;preference=genital_colour'>[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]</a><BR>"
if(HAIR in pref_species.species_traits)
dat += "<b>Hair Style: </b><a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
dat += "<b>Hair Color: </b><span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<b>Facial Hair Style: </b><a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
dat += "<b>Facial Hair Color: </b><span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
if(EYECOLOR in pref_species.species_traits)
dat += "<b>Eye Color: </b><span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
else if("mam_tail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
else if("tail_human" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<b>Frills: </b><a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<b>Spines: </b><a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
else if("mam_body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=mam_body_markings;task=input'>[features["mam_body_markings"]]</a><BR>"
if("mam_ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=mam_ears;task=input'>[features["mam_ears"]]</a><BR>"
else if("ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<b>Legs: </b><a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
if("taur" in pref_species.mutant_bodyparts)
dat += "<b>Taur: </b><a href='?_src_=prefs;preference=taur;task=input'>[features["taur"]]</a><BR>"
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
dat += "<b>Wings: </b><a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
if("xenohead" in pref_species.mutant_bodyparts)
dat += "<b>Caste: </b><a href='?_src_=prefs;preference=xenohead;task=input'>[features["xenohead"]]</a><BR>"
if("xenotail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=xenotail;task=input'>[features["xenotail"]]</a><BR>"
if("xenodorsal" in pref_species.mutant_bodyparts)
dat += "<b>Dorsal Tubes: </b><a href='?_src_=prefs;preference=xenodorsal;task=input'>[features["xenodorsal"]]</a><BR>"
if(HAIR in pref_species.species_traits)
dat += "<b>Hair Style: </b><a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
dat += "<b>Hair Color: </b><span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<b>Facial Hair Style: </b><a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
dat += "<b>Facial Hair Color: </b><span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
if(EYECOLOR in pref_species.species_traits)
dat += "<b>Eye Color: </b><span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
else if("mam_tail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
else if("tail_human" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<b>Frills: </b><a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<b>Spines: </b><a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
else if("mam_body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=mam_body_markings;task=input'>[features["mam_body_markings"]]</a><BR>"
if("mam_ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=mam_ears;task=input'>[features["mam_ears"]]</a><BR>"
else if("ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<b>Legs: </b><a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
if("taur" in pref_species.mutant_bodyparts)
dat += "<b>Taur: </b><a href='?_src_=prefs;preference=taur;task=input'>[features["taur"]]</a><BR>"
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
dat += "<b>Wings: </b><a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
if("xenohead" in pref_species.mutant_bodyparts)
dat += "<b>Caste: </b><a href='?_src_=prefs;preference=xenohead;task=input'>[features["xenohead"]]</a><BR>"
if("xenotail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=xenotail;task=input'>[features["xenotail"]]</a><BR>"
if("xenodorsal" in pref_species.mutant_bodyparts)
dat += "<b>Dorsal Tubes: </b><a href='?_src_=prefs;preference=xenodorsal;task=input'>[features["xenodorsal"]]</a><BR>"
dat += "</td><td width='300px' height='300px' valign='top'>"
@@ -1188,7 +1184,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("species")
var/result = input(user, "Select a species", "Species Selection") as null|anything in CONFIG_GET(keyed_flag_list/roundstart_races)
var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
if(result)
var/newtype = GLOB.species_list[result]
@@ -1826,10 +1822,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.dna.features = features.Copy() //Flavor text is now a DNA feature
character.dna.real_name = character.real_name
var/datum/species/chosen_species
if(pref_species != /datum/species/human && CONFIG_GET(flag/join_with_mutant_race))
if(pref_species.id in GLOB.roundstart_races)
chosen_species = pref_species.type
else
chosen_species = /datum/species/human
pref_species = new /datum/species/human
save_character()
character.set_species(chosen_species, icon_update=0)
//citadel code

View File

@@ -294,14 +294,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Species
var/species_id
S["species"] >> species_id
var/list/roundstart_races = CONFIG_GET(keyed_flag_list/roundstart_races)
if(species_id && (species_id in roundstart_races) && CONFIG_GET(flag/join_with_mutant_race))
if(species_id)
var/newtype = GLOB.species_list[species_id]
pref_species = new newtype()
else if (roundstart_races.len)
var/rando_race = pick(roundstart_races)
if (rando_race)
pref_species = new rando_race()
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
WRITE_FILE(S["features["mcolor"]"] , "#FFF")

View File

@@ -59,8 +59,8 @@
var/heart_strength = "<span class='danger'>no</span>"
var/lung_strength = "<span class='danger'>no</span>"
var/obj/item/organ/heart/heart = M.getorganslot("heart")
var/obj/item/organ/lungs/lungs = M.getorganslot("lungs")
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
if(!(M.stat == DEAD || (M.status_flags&FAKEDEATH)))
if(heart && istype(heart))
@@ -179,4 +179,4 @@
desc = "Damn, it feels good to be a gangster."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
item_color = "bling"
item_color = "bling"

View File

@@ -13,6 +13,20 @@
item_color = "engineering" //Determines used sprites: hardsuit[on]-[color] and hardsuit[on]-[color]2 (lying down sprite)
actions_types = list(/datum/action/item_action/toggle_helmet_light)
var/rad_count = 0
var/rad_record = 0
var/grace_count = 0
var/datum/looping_sound/geiger/soundloop
/obj/item/clothing/head/helmet/space/hardsuit/Initialize()
. = ..()
soundloop = new(list(), FALSE, TRUE)
soundloop.volume = 5
START_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
on = !on
@@ -31,6 +45,7 @@
..()
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot)
if(slot == slot_head)
@@ -41,8 +56,11 @@
if(slot != slot_head)
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
else
qdel(src)
else
soundloop.start(user)
/obj/item/clothing/head/helmet/space/hardsuit/proc/display_visor_message(var/msg)
var/mob/wearer = loc
@@ -50,9 +68,22 @@
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", 1)
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
..()
if(severity > RAD_AMOUNT_EXTREME)
display_visor_message("Radiation pulse detected! Magnitude: <span class='green'>[severity]</span> RADs.")
. = ..()
rad_count += severity
/obj/item/clothing/head/helmet/space/hardsuit/process()
if(!rad_count)
grace_count++
if(grace_count == 2)
soundloop.last_radiation = 0
return
grace_count = 0
rad_record -= rad_record/5
rad_record += rad_count/5
rad_count = 0
soundloop.last_radiation = rad_record
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
..()

View File

@@ -112,8 +112,9 @@
item_state = "bombsuit_white"
/*
* Radiation protection
*/
* Radiation protection
*/
/obj/item/clothing/head/radiation
name = "radiation hood"
icon_state = "rad"

View File

@@ -10,12 +10,8 @@
..()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
var/obj/item/storage/backpack/b = locate() in H.contents
new /obj/item/storage/spooky(b)
if(ishuman(H) || islizard(H))
if(prob(50))
H.set_species(/datum/species/skeleton)
else
H.set_species(/datum/species/zombie)
if(b)
new /obj/item/storage/spooky(b)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list)
Ian.place_on_head(new /obj/item/bedsheet(Ian))
@@ -26,77 +22,6 @@
/datum/round_event/spooky/announce()
priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE")
//Eyeball migration
/datum/round_event_control/carp_migration/eyeballs
name = "Eyeball Migration"
typepath = /datum/round_event/carp_migration/eyeballs
holidayID = HALLOWEEN
weight = 25
earliest_start = 0
/datum/round_event/carp_migration/eyeballs/start()
for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list)
new /mob/living/simple_animal/hostile/carp/eyeball(C.loc)
//Pumpking meteors waves
/datum/round_event_control/meteor_wave/spooky
name = "Pumpkin Wave"
typepath = /datum/round_event/meteor_wave/spooky
holidayID = HALLOWEEN
weight = 20
max_occurrences = 2
/datum/round_event/meteor_wave/spooky
endWhen = 40
/datum/round_event/meteor_wave/spooky/tick()
if(IsMultiple(activeFor, 4))
spawn_meteors(3, GLOB.meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm
//Creepy clown invasion
/datum/round_event_control/creepy_clowns
name = "Clowns"
typepath = /datum/round_event/creepy_clowns
holidayID = HALLOWEEN
weight = 20
earliest_start = 0
/datum/round_event/creepy_clowns
endWhen = 40
/datum/round_event/creepy_clowns/start()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(!H.client || !istype(H))
return
to_chat(H, "<span class='danger'>Honk...</span>")
SEND_SOUND(H, sound('sound/spookoween/scary_clown_appear.ogg'))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 50)
/datum/round_event/creepy_clowns/tick()
if(IsMultiple(activeFor, 4))
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if (prob(66))
playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1)
if (prob(33))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 25)
else if (prob(25))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown/scary(T, H, 25)
else if (prob(5))
var/turf/T = get_turf(H)
if(T)
spawn_atom_to_turf(/obj/effect/mob_spawn/human/clown/corpse, H, 1)
else if (prob(1))
spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1)
/datum/round_event/creepy_clowns/announce()
priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg')
//spooky foods (you can't actually make these when it's not halloween)
/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull
name = "skull cookie"
@@ -110,7 +35,6 @@
icon = 'icons/obj/halloween_items.dmi'
icon_state = "coffincookie"
//spooky items
/obj/item/storage/spooky

View File

@@ -1,68 +1,72 @@
// Normal strength
/datum/round_event_control/meteor_wave
name = "Meteor Wave: Normal"
typepath = /datum/round_event/meteor_wave
weight = 4
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave
startWhen = 6
endWhen = 66
announceWhen = 1
var/list/wave_type
var/wave_name = "normal"
/datum/round_event/meteor_wave/New()
..()
if(!wave_type)
determine_wave_type()
/datum/round_event/meteor_wave/proc/determine_wave_type()
if(!wave_name)
wave_name = pickweight(list(
"normal" = 50,
"threatening" = 40,
"catastrophic" = 10))
switch(wave_name)
if("normal")
wave_type = GLOB.meteors_normal
if("threatening")
wave_type = GLOB.meteors_threatening
if("catastrophic")
wave_type = GLOB.meteors_catastrophic
if("meaty")
wave_type = GLOB.meteorsB
if("space dust")
wave_type = GLOB.meteorsC
else
WARNING("Wave name of [wave_name] not recognised.")
kill()
/datum/round_event/meteor_wave/announce()
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
/datum/round_event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
/datum/round_event_control/meteor_wave/threatening
name = "Meteor Wave: Threatening"
typepath = /datum/round_event/meteor_wave/threatening
weight = 2
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/threatening
wave_name = "threatening"
/datum/round_event_control/meteor_wave/catastrophic
name = "Meteor Wave: Catastrophic"
typepath = /datum/round_event/meteor_wave/catastrophic
weight = 1
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/catastrophic
wave_name = "catastrophic"
// Normal strength
/datum/round_event_control/meteor_wave
name = "Meteor Wave: Normal"
typepath = /datum/round_event/meteor_wave
weight = 4
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave
startWhen = 6
endWhen = 66
announceWhen = 1
var/list/wave_type
var/wave_name = "normal"
/datum/round_event/meteor_wave/New()
..()
if(!wave_type)
determine_wave_type()
/datum/round_event/meteor_wave/proc/determine_wave_type()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
wave_name = "halloween"
if(!wave_name)
wave_name = pickweight(list(
"normal" = 50,
"threatening" = 40,
"catastrophic" = 10))
switch(wave_name)
if("normal")
wave_type = GLOB.meteors_normal
if("threatening")
wave_type = GLOB.meteors_threatening
if("catastrophic")
wave_type = GLOB.meteors_catastrophic
if("meaty")
wave_type = GLOB.meteorsB
if("space dust")
wave_type = GLOB.meteorsC
if("halloween")
wave_type = GLOB.meteorsSPOOKY
else
WARNING("Wave name of [wave_name] not recognised.")
kill()
/datum/round_event/meteor_wave/announce()
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
/datum/round_event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
/datum/round_event_control/meteor_wave/threatening
name = "Meteor Wave: Threatening"
typepath = /datum/round_event/meteor_wave/threatening
weight = 2
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/threatening
wave_name = "threatening"
/datum/round_event_control/meteor_wave/catastrophic
name = "Meteor Wave: Catastrophic"
typepath = /datum/round_event/meteor_wave/catastrophic
weight = 1
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/catastrophic
wave_name = "catastrophic"

View File

@@ -272,7 +272,7 @@
/datum/holiday/halloween
name = HALLOWEEN
begin_day = 30
begin_day = 28
begin_month = OCTOBER
end_day = 2
end_month = NOVEMBER

View File

@@ -14,7 +14,7 @@
facial_hair_color = hair_color
eye_color = random_eye_color()
if(!pref_species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features()
age = rand(AGE_MIN,AGE_MAX)

View File

@@ -216,25 +216,23 @@
. = list()
if(!bloodtype)
return
switch(bloodtype)
if("A-")
return list("A-", "O-")
if("A+")
return list("A-", "A+", "O-", "O+")
if("B-")
return list("B-", "O-")
if("B+")
return list("B-", "B+", "O-", "O+")
if("AB-")
return list("A-", "B-", "O-", "AB-")
if("AB+")
return list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+")
if("O-")
return list("O-")
if("O+")
return list("O-", "O+")
if("L")
return list("L")
var/static/list/bloodtypes_safe = list(
"A-" = list("A-", "O-"),
"A+" = list("A-", "A+", "O-", "O+"),
"B-" = list("B-", "O-"),
"B+" = list("B-", "B+", "O-", "O+"),
"AB-" = list("A-", "B-", "O-", "AB-"),
"AB+" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+"),
"O-" = list("O-"),
"O+" = list("O-", "O+"),
"L" = list("L"),
"U" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+", "L", "U")
)
var/safe = bloodtypes_safe[bloodtype]
if(safe)
. = safe
//to add a splatter of blood or other mob liquid.
/mob/living/proc/add_splatter_floor(turf/T, small_drip)

View File

@@ -19,7 +19,7 @@
/mob/living/brain/proc/create_dna()
stored_dna = new /datum/dna/stored(src)
if(!stored_dna.species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
stored_dna.species = new rando_race()
/mob/living/brain/Destroy()

View File

@@ -6,7 +6,7 @@
throw_range = 5
layer = ABOVE_MOB_LAYER
zone = "head"
slot = "brain"
slot = ORGAN_SLOT_BRAIN
vital = TRUE
origin_tech = "biotech=5"
attack_verb = list("attacked", "slapped", "whacked")
@@ -70,7 +70,7 @@
C.dna.copy_dna(brainmob.stored_dna)
if(L.disabilities & NOCLONE)
brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body
var/obj/item/organ/zombie_infection/ZI = L.getorganslot("zombie_infection")
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned
if(L.mind && L.mind.current)

View File

@@ -224,7 +224,7 @@
internal = null
update_internals_hud_icon(0)
else if(ITEM && istype(ITEM, /obj/item/tank))
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot("breathing_tube"))
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = ITEM
update_internals_hud_icon(1)
@@ -523,7 +523,7 @@
sight = initial(sight)
lighting_alpha = initial(lighting_alpha)
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(!E)
update_tint()
else
@@ -580,7 +580,7 @@
if(wear_mask)
. += wear_mask.tint
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(E)
. += E.tint

View File

@@ -14,7 +14,7 @@
var/obj/item/clothing/mask/MFP = src.wear_mask
number += MFP.flash_protect
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(!E)
number = INFINITY //Can't get flashed without eyes
else
@@ -28,7 +28,7 @@
number += 1
if(head && (head.flags_2 & BANG_PROTECT_2))
number += 1
var/obj/item/organ/ears/E = getorganslot("ears")
var/obj/item/organ/ears/E = getorganslot(ORGAN_SLOT_EARS)
if(!E)
number = INFINITY
else
@@ -279,7 +279,7 @@
var/damage = intensity - get_eye_protection()
if(.) // we've been flashed
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(visual)
@@ -323,7 +323,7 @@
/mob/living/carbon/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
var/ear_safety = get_ear_protection()
var/obj/item/organ/ears/ears = getorganslot("ears")
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
if(stun_pwr)
@@ -363,6 +363,6 @@
/mob/living/carbon/can_hear()
. = FALSE
var/obj/item/organ/ears/ears = getorganslot("ears")
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
if(istype(ears) && !ears.deaf)
. = TRUE

View File

@@ -39,7 +39,7 @@
return 1
// Do we have a jetpack implant (and is it on)?
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot("thrusters")
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot(ORGAN_SLOT_THRUSTERS)
if(istype(T) && movement_dir && T.allow_thrust(0.01))
return 1

View File

@@ -20,7 +20,7 @@
if(stat == DEAD)
return
stop_sound_channel(CHANNEL_HEARTBEAT)
var/obj/item/organ/heart/H = getorganslot("heart")
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
if(H)
H.beat = BEAT_NONE

View File

@@ -270,13 +270,13 @@
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/perpname = get_face_name(get_id_name(""))
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud))
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud))
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.general)
if(href_list["photo_front"] || href_list["photo_side"])
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
var/obj/item/photo/P = null
if(href_list["photo_front"])
@@ -287,13 +287,13 @@
P.show(H)
if(href_list["hud"] == "m")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
if(href_list["p_stat"])
var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
if(health_status && health_status != "Cancel")
R.fields["p_stat"] = health_status
@@ -303,7 +303,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
if(health_status && health_status != "Cancel")
R.fields["m_stat"] = health_status
@@ -352,7 +352,7 @@
to_chat(usr, "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>")
if(href_list["hud"] == "s")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/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
@@ -379,7 +379,7 @@
if(setcriminal != "Cancel")
if(R)
if(H.canUseHUD())
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
investigate_log("[src.key] has been set from [R.fields["criminal"]] to [setcriminal] by [usr.name] ([usr.key]).", INVESTIGATE_RECORDS)
R.fields["criminal"] = setcriminal
sec_hud_set_security_status()
@@ -389,7 +389,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
to_chat(usr, "<b>Minor Crimes:</b>")
@@ -418,7 +418,7 @@
return
else if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
GLOB.data_core.addMinorCrime(R.fields["id"], crime)
@@ -433,7 +433,7 @@
return
else if (!H.canUseHUD())
return
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
GLOB.data_core.addMajorCrime(R.fields["id"], crime)
@@ -444,7 +444,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
to_chat(usr, "<b>Comments/Log:</b>")
var/counter = 1
@@ -462,7 +462,7 @@
return
else if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
@@ -637,7 +637,7 @@
return 0
var/they_breathe = (!(NOBREATH in C.dna.species.species_traits))
var/they_lung = C.getorganslot("lungs")
var/they_lung = C.getorganslot(ORGAN_SLOT_LUNGS)
if(C.health > HEALTH_THRESHOLD_CRIT)
return

View File

@@ -451,7 +451,7 @@
siemens_coeff = gloves_siemens_coeff
if(undergoing_cardiac_arrest() && !illusion)
if(shock_damage * siemens_coeff >= 1 && prob(25))
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
heart.beating = TRUE
if(stat == CONSCIOUS)
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")

View File

@@ -225,7 +225,7 @@
/mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
update_hair()
if(toggle_off && internal && !getorganslot("breathing_tube"))
if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
update_internals_hud_icon(0)
internal = null
if(C.flags_inv & HIDEEYES)

View File

@@ -93,7 +93,7 @@
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
/mob/living/carbon/human/check_breath(datum/gas_mixture/breath)
var/L = getorganslot("lungs")
var/L = getorganslot(ORGAN_SLOT_LUNGS)
if(!L)
if(health >= HEALTH_THRESHOLD_CRIT)
@@ -338,7 +338,7 @@
/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
if(istype(heart) && heart.beating)
return FALSE
return TRUE
@@ -347,7 +347,7 @@
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
if(!istype(heart))
return

View File

@@ -49,7 +49,7 @@
CHECK_DNA_AND_SPECIES(src)
// how do species that don't breathe talk? magic, that's what.
if(!(NOBREATH in dna.species.species_traits) && !getorganslot("lungs"))
if(!(NOBREATH in dna.species.species_traits) && !getorganslot(ORGAN_SLOT_LUNGS))
return 0
if(mind)
return !mind.miming

View File

@@ -1,5 +1,7 @@
// This code handles different species in the game.
GLOBAL_LIST_EMPTY(roundstart_races)
#define HEAT_DAMAGE_LEVEL_1 2
#define HEAT_DAMAGE_LEVEL_2 3
#define HEAT_DAMAGE_LEVEL_3 8
@@ -12,7 +14,6 @@
var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this
var/limbs_id //this is used if you want to use a different species limb sprites. Mainly used for angels as they look like humans.
var/name // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever
var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?)
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
@@ -65,6 +66,7 @@
var/breathid = "o2"
var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain
var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
var/obj/item/organ/ears/mutantears = /obj/item/organ/ears
var/obj/item/mutanthands
@@ -92,6 +94,20 @@
..()
/proc/generate_selectable_species()
for(var/I in subtypesof(/datum/species))
var/datum/species/S = new I
if(S.check_roundstart_eligible())
GLOB.roundstart_races += S.id
qdel(S)
if(!GLOB.roundstart_races.len)
GLOB.roundstart_races += "human"
/datum/species/proc/check_roundstart_eligible()
if(id in (CONFIG_GET(keyed_flag_list/roundstart_races)))
return TRUE
return FALSE
/datum/species/proc/random_name(gender,unique,lastname)
if(unique)
return random_unique_name(gender)
@@ -122,15 +138,15 @@
//Will regenerate missing organs
/datum/species/proc/regenerate_organs(mob/living/carbon/C,datum/species/old_species,replace_current=TRUE)
var/obj/item/organ/brain/brain = C.getorganslot("brain")
var/obj/item/organ/heart/heart = C.getorganslot("heart")
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
var/obj/item/organ/ears/ears = C.getorganslot("ears")
var/obj/item/organ/tongue/tongue = C.getorganslot("tongue")
var/obj/item/organ/liver/liver = C.getorganslot("liver")
var/obj/item/organ/stomach/stomach = C.getorganslot("stomach")
var/obj/item/organ/brain/brain = C.getorganslot(ORGAN_SLOT_BRAIN)
var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/lungs/lungs = C.getorganslot(ORGAN_SLOT_LUNGS)
var/obj/item/organ/appendix/appendix = C.getorganslot(ORGAN_SLOT_APPENDIX)
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
var/obj/item/organ/tongue/tongue = C.getorganslot(ORGAN_SLOT_TONGUE)
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH)
var/should_have_brain = TRUE
var/should_have_heart = !(NOBLOOD in species_traits)
@@ -154,7 +170,7 @@
heart.Remove(C,1)
QDEL_NULL(heart)
if(should_have_heart && !heart)
heart = new()
heart = new mutant_heart()
heart.Insert(C)
if(lungs && (replace_current || !should_have_lungs))
@@ -1152,7 +1168,7 @@
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
H.vomit(10, TRUE)
if(radiation > RAD_MOB_MUTATE)
if(prob(1))
to_chat(H, "<span class='danger'>You mutate!</span>")
@@ -1204,7 +1220,7 @@
if(!gravity)
var/obj/item/tank/jetpack/J = H.back
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot("thrusters")
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot(ORGAN_SLOT_THRUSTERS)
if(!istype(J) && istype(C))
J = C.jetpack
if(istype(J) && J.full_speed && J.allow_thrust(0.01, H)) //Prevents stacking
@@ -1260,7 +1276,7 @@
return 1
else
var/we_breathe = (!(NOBREATH in user.dna.species.species_traits))
var/we_lung = user.getorganslot("lungs")
var/we_lung = user.getorganslot(ORGAN_SLOT_LUNGS)
if(we_breathe && we_lung)
user.do_cpr(target)

View File

@@ -8,7 +8,6 @@
attack_verb = "claw"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRIED
disliked_food = TOXIC
@@ -31,7 +30,6 @@
attack_verb = "peck"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRUIT
disliked_food = TOXIC
@@ -53,7 +51,6 @@
attack_verb = "bite"
attack_sound = 'sound/weapons/bite.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT
disliked_food = TOXIC
@@ -75,7 +72,6 @@
attack_verb = "flutter" //wat?
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRUIT
disliked_food = TOXIC
@@ -105,7 +101,6 @@
skinned_type = /obj/item/stack/sheet/animalhide/xeno
exotic_bloodtype = "L"
damage_overlay_type = "xeno"
roundstart = 1
liked_food = MEAT
//Praise the Omnissiah, A challange worthy of my skills - HS
@@ -138,7 +133,6 @@
meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno
skinned_type = /obj/item/stack/sheet/animalhide/xeno
// safe_toxins_max = 32 //Too much of anything is bad.
roundstart = 0
// whitelisted = 1
// whitelist = list("talkingcactus") //testing whitelisting
@@ -182,7 +176,6 @@
punchdamagehigh = 14
punchstunthreshold = 13
blacklisted = 1
roundstart = 0
whitelist = 1
whitelist = list("talkingcactus")
@@ -233,7 +226,6 @@
attack_verb = "bite"
attack_sound = 'sound/weapons/bite.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
// roundstart = 1
whitelisted = 1
whitelist = list("rubyflamewing")
blacklisted = 0
@@ -248,4 +240,3 @@
attack_verb = "claw"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1

View File

@@ -13,7 +13,6 @@
disliked_food = NONE
liked_food = NONE
toxic_food = NONE
roundstart = TRUE
/datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species)

View File

@@ -25,6 +25,10 @@
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
H.heal_overall_damage(1,1)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/shadow/nightmare
name = "Nightmare"
@@ -61,7 +65,8 @@
return -1
return 0
/datum/species/shadow/nightmare/check_roundstart_eligible()
return FALSE
//Organs

View File

@@ -11,3 +11,8 @@
damage_overlay_type = ""//let's not show bloody wounds or burns over bones.
disliked_food = NONE
liked_food = NONE
/datum/species/skeleton/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()

View File

@@ -118,4 +118,4 @@
else
return ..()
else
return ..()
return ..()

View File

@@ -0,0 +1,130 @@
/datum/species/vampire
name = "vampire"
id = "vampire"
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOHUNGER,NOBREATH,DRINKSBLOOD)
mutant_bodyparts = list("tail_human", "ears", "wings")
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None")
exotic_bloodtype = "U"
use_skintones = TRUE
mutant_heart = /obj/item/organ/heart/vampire
mutanttongue = /obj/item/organ/tongue/vampire
blacklisted = TRUE
limbs_id = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
var/info_text = "You are a <span class='danger'>Vampire</span>. You will slowly but constantly lose blood if outside of a coffin. If inside a coffin, you will slowly heal. You may gain more blood by grabbing a live victim and using your drain ability."
/datum/species/vampire/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return FALSE
/datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
. = ..()
to_chat(C, "[info_text]")
C.skin_tone = "albino"
C.update_body(0)
if(C.mind)
var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new
C.mind.AddSpell(B)
/datum/species/vampire/on_species_loss(mob/living/carbon/C)
. = ..()
if(C.mind)
for(var/S in C.mind.spell_list)
var/obj/effect/proc_holder/spell/S2 = S
if(S2.type == /obj/effect/proc_holder/spell/targeted/shapeshift/bat)
C.mind.spell_list.Remove(S2)
qdel(S2)
/datum/species/vampire/spec_life(mob/living/carbon/human/C)
. = ..()
if(istype(C.loc, /obj/structure/closet/coffin))
C.heal_overall_damage(4,4)
C.adjustToxLoss(-4)
C.adjustOxyLoss(-4)
C.adjustCloneLoss(-4)
return
C.blood_volume -= 1.5
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
to_chat(C, "<span class='danger'>You ran out of blood!</span>")
C.dust()
var/area/A = get_area(C)
if(istype(A, /area/chapel))
to_chat(C, "<span class='danger'>You don't belong here!</span>")
C.adjustFireLoss(20)
C.adjust_fire_stacks(6)
C.IgniteMob()
/obj/item/organ/tongue/vampire
name = "vampire tongue"
actions_types = list(/datum/action/item_action/organ_action/vampire)
color = "#1C1C1C"
var/drain_cooldown = 0
#define VAMP_DRAIN_AMOUNT 50
/datum/action/item_action/organ_action/vampire
name = "Drain Victim"
desc = "Leech blood from any carbon victim you are passively grabbing."
/datum/action/item_action/organ_action/vampire/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
var/obj/item/organ/tongue/vampire/V = target
if(V.drain_cooldown >= world.time)
to_chat(H, "<span class='notice'>You just drained blood, wait a few seconds.</span>")
return
if(H.pulling && iscarbon(H.pulling))
var/mob/living/carbon/victim = H.pulling
if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='notice'>You're already full!</span>")
return
if(victim.stat == DEAD)
to_chat(H, "<span class='notice'>You need a living victim!</span>")
return
if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || victim.dna.species.exotic_blood)))
to_chat(H, "<span class='notice'>[victim] doesn't have blood!</span>")
return
V.drain_cooldown = world.time + 30
if(!do_after(H, 30, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood
var/drained_blood = min(victim.blood_volume, VAMP_DRAIN_AMOUNT, blood_volume_difference)
to_chat(victim, "<span class='danger'>[H] is draining your blood!</span>")
to_chat(H, "<span class='notice'>You drain some blood!</span>")
playsound(H, 'sound/items/drink.ogg', 30, 1, -2)
victim.blood_volume = Clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
H.blood_volume = Clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
if(!victim.blood_volume)
to_chat(H, "<span class='warning'>You finish off [victim]'s blood supply!</span>")
#undef VAMP_DRAIN_AMOUNT
/obj/item/organ/heart/vampire
name = "vampire heart"
actions_types = list(/datum/action/item_action/organ_action/vampire_heart)
color = "#1C1C1C"
/datum/action/item_action/organ_action/vampire_heart
name = "Check Blood Level"
desc = "Check how much blood you have remaining."
/datum/action/item_action/organ_action/vampire_heart/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
to_chat(H, "<span class='notice'>Current blood level: [H.blood_volume]/[BLOOD_VOLUME_MAXIMUM].</span>")
/obj/effect/proc_holder/spell/targeted/shapeshift/bat
name = "Bat Form"
desc = "Take on the shape a space bat."
invocation = "Squeak!"
charge_max = 50
cooldown_min = 50
shapeshift_type = /mob/living/simple_animal/hostile/retaliate/bat
current_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat)
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat)

View File

@@ -14,6 +14,11 @@
disliked_food = NONE
liked_food = NONE
/datum/species/zombie/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/zombie/infectious
name = "Infectious Zombie"
id = "memezombies"
@@ -24,6 +29,10 @@
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
var/regen_cooldown = 0
/datum/species/zombie/infectious/check_roundstart_eligible()
return FALSE
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
. = min(2, amount)
@@ -52,7 +61,7 @@
// Infection organ needs to be handled separately from mutant_organs
// because it persists through species transitions
var/obj/item/organ/zombie_infection/infection
infection = C.getorganslot("zombie_infection")
infection = C.getorganslot(ORGAN_SLOT_ZOMBIE)
if(!infection)
infection = new()
infection.Insert(C)

View File

@@ -58,7 +58,7 @@
var/datum/gas_mixture/breath
if(!getorganslot("breathing_tube"))
if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL))
losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath
@@ -110,7 +110,7 @@
if((status_flags & GODMODE))
return
var/lungs = getorganslot("lungs")
var/lungs = getorganslot(ORGAN_SLOT_LUNGS)
if(!lungs)
adjustOxyLoss(2)
@@ -230,7 +230,7 @@
if(internal.loc != src)
internal = null
update_internals_hud_icon(0)
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot("breathing_tube"))
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = null
update_internals_hud_icon(0)
else
@@ -401,7 +401,7 @@
/////////
/mob/living/carbon/proc/handle_liver()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if((!dna && !liver) || (NOLIVER in dna.species.species_traits))
return
if(liver)
@@ -414,17 +414,17 @@
liver_failure()
/mob/living/carbon/proc/undergoing_liver_failure()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(liver && liver.failing)
return TRUE
/mob/living/carbon/proc/return_liver_damage()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(liver)
return liver.damage
/mob/living/carbon/proc/applyLiverDamage(var/d)
var/obj/item/organ/liver/L = getorganslot("liver")
var/obj/item/organ/liver/L = getorganslot(ORGAN_SLOT_LIVER)
if(L)
L.damage += d

View File

@@ -140,7 +140,7 @@
return protection
/mob/living/carbon/monkey/IsVocal()
if(!getorganslot("lungs"))
if(!getorganslot(ORGAN_SLOT_LUNGS))
return 0
return 1

View File

@@ -1,6 +1,6 @@
/mob/living/carbon/treat_message(message)
message = ..(message)
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(!T) //hoooooouaah!
var/regex/tongueless_lower = new("\[gdntke]+", "g")
var/regex/tongueless_upper = new("\[GDNTKE]+", "g")
@@ -21,7 +21,7 @@
/mob/living/carbon/get_spans()
. = ..()
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(T)
. |= T.get_spans()
@@ -30,7 +30,7 @@
. |= I.get_held_item_speechspans(src)
/mob/living/carbon/could_speak_in_language(datum/language/dt)
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(T)
. = T.could_speak_in_language(dt)
else

View File

@@ -3,7 +3,7 @@
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
/mob/living/carbon/damage_eyes(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(amount>0)
@@ -15,7 +15,7 @@
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
/mob/living/carbon/set_eye_damage(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
eyes.eye_damage = max(amount,0)
@@ -28,7 +28,7 @@
clear_fullscreen("eye_damage")
/mob/living/carbon/adjust_eye_damage(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
eyes.eye_damage = max(eyes.eye_damage+amount, 0)

View File

@@ -898,14 +898,17 @@
to_chat(G, "<span class='holoparasite'>Your summoner has changed form!</span>")
/mob/living/rad_act(amount)
amount = max(amount-RAD_BACKGROUND_RADIATION, 0)
if(!amount || amount < RAD_MOB_SKIN_PROTECTION)
return
if(amount)
var/blocked = getarmor(null, "rad")
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked)
if(amount > RAD_AMOUNT_EXTREME)
apply_damage((amount-RAD_AMOUNT_EXTREME)/RAD_AMOUNT_EXTREME, BURN, null, blocked)
var/blocked = getarmor(null, "rad")
if(amount > RAD_BURN_THRESHOLD)
apply_damage((amount-RAD_BURN_THRESHOLD)/RAD_BURN_THRESHOLD, BURN, null, blocked)
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), IRRADIATE, blocked)
/mob/living/proc/fakefireextinguish()
return

View File

@@ -362,7 +362,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(message_mode == MODE_VOCALCORDS)
if(iscarbon(src))
var/mob/living/carbon/C = src
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE)
if(V && V.can_speak_with())
V.handle_speech(message) //message
V.speak_with(message) //action

View File

@@ -8,7 +8,7 @@
return DEFAULT_TASTE_SENSITIVITY
/mob/living/carbon/get_taste_sensitivity()
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE)
if(istype(tongue))
. = tongue.taste_sensitivity
else

View File

@@ -139,7 +139,7 @@
#define BRAINS_BLOWN_THROW_RANGE 3
#define BRAINS_BLOWN_THROW_SPEED 1
/obj/item/gun/ballistic/suicide_act(mob/user)
var/obj/item/organ/brain/B = user.getorganslot("brain")
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
if (B && chambered && chambered.BB && can_trigger_gun(user) && !chambered.BB.nodamage)
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
sleep(25)

View File

@@ -38,7 +38,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/mob/living/carbon/human/H = M
if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER)
H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
var/obj/item/organ/liver/L = H.getorganslot("liver")
var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER)
H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10)
return ..() || .

View File

@@ -550,7 +550,7 @@
if(!M.is_mouth_covered() && !M.is_eyes_covered())
unprotected = TRUE
if(unprotected)
if(!M.getorganslot("eye_sight")) //can't blind somebody with no eyes
if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
else
if(!M.eye_blurry)

View File

@@ -454,7 +454,7 @@
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M)
if(M.radiation > 0)
M.radiation -= min(M.radiation, 4)
M.radiation -= min(M.radiation, 8)
..()
/datum/reagent/medicine/pen_acid
@@ -466,7 +466,7 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M)
M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/100
M.radiation -= max(M.radiation-RAD_MOB_SAFE, 0)/50
M.adjustToxLoss(-2*REM, 0)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
@@ -671,7 +671,7 @@
taste_description = "dull toxin"
/datum/reagent/medicine/oculine/on_mob_life(mob/living/M)
var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight")
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(M.disabilities & BLIND)

View File

@@ -24,9 +24,9 @@
else //ingest, patch or inject
M.ForceContractDisease(D)
if(method == INJECT && iscarbon(M))
if(iscarbon(M))
var/mob/living/carbon/C = M
if(C.get_blood_id() == "blood")
if(C.get_blood_id() == "blood" && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits))))
if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type)))
C.reagents.add_reagent("toxin", reac_volume * 0.5)
else
@@ -1596,7 +1596,7 @@
/datum/reagent/romerol/on_mob_life(mob/living/carbon/human/H)
// Silently add the zombie infection organ to be activated upon death
if(!H.getorganslot("zombie_infection"))
if(!H.getorganslot(ORGAN_SLOT_ZOMBIE))
var/obj/item/organ/zombie_infection/ZI = new()
ZI.Insert(H)
..()

View File

@@ -65,6 +65,9 @@
/obj/item/reagent_containers/blood/lizard
blood_type = "L"
/obj/item/reagent_containers/blood/universal
blood_type = "U"
/obj/item/reagent_containers/blood/empty
name = "blood pack"
icon_state = "empty"

View File

@@ -253,7 +253,7 @@
if(VAULT_TOXIN)
to_chat(H, "<span class='notice'>You feel resistant to airborne toxins.</span>")
if(locate(/obj/item/organ/lungs) in H.internal_organs)
var/obj/item/organ/lungs/L = H.internal_organs_slot["lungs"]
var/obj/item/organ/lungs/L = H.internal_organs_slot[ORGAN_SLOT_LUNGS]
L.tox_breath_dam_min = 0
L.tox_breath_dam_max = 0
S.species_traits |= VIRUSIMMUNE

View File

@@ -1,38 +1,38 @@
/datum/surgery/eye_surgery
name = "eye surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list("eyes")
requires_bodypart_type = 0
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/eyes/E = target.getorganslot("eye_sight")
if(!E)
to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.")
return FALSE
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to fix [target]'s eyes.", "<span class='notice'>You begin to fix [target]'s eyes...</span>")
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully fixes [target]'s eyes!", "<span class='notice'>You succeed in fixing [target]'s eyes.</span>")
target.cure_blind()
target.set_blindness(0)
target.cure_nearsighted()
target.blur_eyes(35) //this will fix itself slowly.
target.set_eye_damage(0)
return TRUE
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorgan(/obj/item/organ/brain))
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>", "<span class='warning'>You accidentally stab [target] right in the brain!</span>")
target.adjustBrainLoss(100)
else
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
return FALSE
/datum/surgery/eye_surgery
name = "eye surgery"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
possible_locs = list("eyes")
requires_bodypart_type = 0
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25)
time = 64
/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target)
var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES)
if(!E)
to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.")
return FALSE
/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] begins to fix [target]'s eyes.", "<span class='notice'>You begin to fix [target]'s eyes...</span>")
/datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
user.visible_message("[user] successfully fixes [target]'s eyes!", "<span class='notice'>You succeed in fixing [target]'s eyes.</span>")
target.cure_blind()
target.set_blindness(0)
target.cure_nearsighted()
target.blur_eyes(35) //this will fix itself slowly.
target.set_eye_damage(0)
return TRUE
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(target.getorgan(/obj/item/organ/brain))
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain!</span>", "<span class='warning'>You accidentally stab [target] right in the brain!</span>")
target.adjustBrainLoss(100)
else
user.visible_message("<span class='warning'>[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.</span>", "<span class='warning'>You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.</span>")
return FALSE

View File

@@ -2,7 +2,7 @@
name = "appendix"
icon_state = "appendix"
zone = "groin"
slot = "appendix"
slot = ORGAN_SLOT_APPENDIX
var/inflamed = 0
/obj/item/organ/appendix/update_icon()

View File

@@ -2,7 +2,6 @@
name = "arm-mounted implant"
desc = "You shouldn't see this! Adminhelp and report this as an issue on github!"
zone = "r_arm"
slot = "r_arm_device"
icon_state = "implant-toolkit"
w_class = WEIGHT_CLASS_NORMAL
actions_types = list(/datum/action/item_action/organ_action/toggle)
@@ -20,9 +19,18 @@
holder = new holder(src)
update_icon()
slot = zone + "_device"
SetSlotFromZone()
items_list = contents.Copy()
/obj/item/organ/cyberimp/arm/proc/SetSlotFromZone()
switch(zone)
if("l_arm")
slot = ORGAN_SLOT_LEFT_ARM_AUG
if("r_arm")
slot = ORGAN_SLOT_RIGHT_ARM_AUG
else
CRASH("Invalid zone for [type]")
/obj/item/organ/cyberimp/arm/update_icon()
if(zone == "r_arm")
transform = null
@@ -40,7 +48,7 @@
zone = "l_arm"
else
zone = "r_arm"
slot = zone + "_device"
SetSlotFromZone()
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.</span>")
update_icon()
else if(istype(W, /obj/item/card/emag))

View File

@@ -13,7 +13,7 @@
var/hunger_threshold = NUTRITION_LEVEL_STARVING
var/synthesizing = 0
var/poison_amount = 5
slot = "stomach"
slot = ORGAN_SLOT_STOMACH
origin_tech = "materials=2;powerstorage=2;biotech=2"
/obj/item/organ/cyberimp/chest/nutriment/on_life()
@@ -51,7 +51,7 @@
icon_state = "chest_implant"
implant_color = "#AD0000"
origin_tech = "materials=5;programming=4;biotech=4"
slot = "heartdrive"
slot = ORGAN_SLOT_HEART_AID
var/revive_cost = 0
var/reviving = 0
var/cooldown = 0
@@ -119,8 +119,8 @@
/obj/item/organ/cyberimp/chest/thrusters
name = "implantable thrusters set"
desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \
Unlike regular jetpacks, this device has no stabilization system."
slot = "thrusters"
Unlike regular jetpack, this device has no stabilization system."
slot = ORGAN_SLOT_THRUSTERS
icon_state = "imp_jetpack"
origin_tech = "materials=4;magnets=4;biotech=4;engineering=5"
implant_overlay = null

View File

@@ -3,7 +3,7 @@
desc = "artificial photoreceptors with specialized functionality"
icon_state = "eye_implant"
implant_overlay = "eye_implant_overlay"
slot = "eye_sight"
slot = ORGAN_SLOT_EYES
zone = "eyes"
w_class = WEIGHT_CLASS_TINY
@@ -11,7 +11,7 @@
/obj/item/organ/cyberimp/eyes/hud
name = "HUD implant"
desc = "These cybernetic eyes will display a HUD over everything you see. Maybe."
slot = "eye_hud"
slot = ORGAN_SLOT_HUD
var/HUD_type = 0
/obj/item/organ/cyberimp/eyes/hud/Insert(var/mob/living/carbon/M, var/special = 0, drop_if_replaced = FALSE)

View File

@@ -44,7 +44,7 @@
var/active = 0
var/list/stored_items = list()
implant_color = "#DE7E00"
slot = "brain_antidrop"
slot = ORGAN_SLOT_BRAIN_ANTIDROP
origin_tech = "materials=4;programming=5;biotech=4"
actions_types = list(/datum/action/item_action/organ_action/toggle)
@@ -101,7 +101,7 @@
name = "CNS Rebooter implant"
desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned."
implant_color = "#FFFF00"
slot = "brain_antistun"
slot = ORGAN_SLOT_BRAIN_ANTISTUN
origin_tech = "materials=5;programming=4;biotech=5"
/obj/item/organ/cyberimp/brain/anti_stun/on_life()
@@ -133,7 +133,7 @@
name = "breathing tube implant"
desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked."
icon_state = "implant_mask"
slot = "breathing_tube"
slot = ORGAN_SLOT_BREATHING_TUBE
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=2;biotech=3"

View File

@@ -3,7 +3,7 @@
icon_state = "ears"
desc = "There are three parts to the ear. Inner, middle and outer. Only one of these parts should be normally visible."
zone = "head"
slot = "ears"
slot = ORGAN_SLOT_EARS
gender = PLURAL
// `deaf` measures "ticks" of deafness. While > 0, the person is unable

View File

@@ -3,7 +3,7 @@
icon_state = "eyeballs"
desc = "I see you!"
zone = "eyes"
slot = "eye_sight"
slot = ORGAN_SLOT_EYES
gender = PLURAL
var/sight_flags = 0

View File

@@ -3,7 +3,7 @@
desc = "I feel bad for the heartless bastard who lost this."
icon_state = "heart-on"
zone = "chest"
slot = "heart"
slot = ORGAN_SLOT_HEART
origin_tech = "biotech=5"
// Heart attack code is in code/modules/mob/living/carbon/human/life.dm
var/beating = 1

View File

@@ -8,7 +8,7 @@
origin_tech = "biotech=3"
w_class = WEIGHT_CLASS_NORMAL
zone = "chest"
slot = "liver"
slot = ORGAN_SLOT_LIVER
desc = "Pairing suggestion: chianti and fava beans."
var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure
var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol

View File

@@ -12,7 +12,7 @@
name = "lungs"
icon_state = "lungs"
zone = "chest"
slot = "lungs"
slot = ORGAN_SLOT_LUNGS
gender = PLURAL
w_class = WEIGHT_CLASS_NORMAL

View File

@@ -118,7 +118,7 @@
var/has_liver = (!(NOLIVER in dna.species.species_traits))
var/has_stomach = (!(NOSTOMACH in dna.species.species_traits))
if(has_liver && !getorganslot("liver"))
if(has_liver && !getorganslot(ORGAN_SLOT_LIVER))
var/obj/item/organ/liver/LI
if(dna.species.mutantliver)
@@ -127,7 +127,7 @@
LI = new()
LI.Insert(src)
if(has_stomach && !getorganslot("stomach"))
if(has_stomach && !getorganslot(ORGAN_SLOT_STOMACH))
var/obj/item/organ/stomach/S
if(dna.species.mutantstomach)
@@ -136,15 +136,15 @@
S = new()
S.Insert(src)
if(breathes && !getorganslot("lungs"))
if(breathes && !getorganslot(ORGAN_SLOT_LUNGS))
var/obj/item/organ/lungs/L = new()
L.Insert(src)
if(blooded && !getorganslot("heart"))
if(blooded && !getorganslot(ORGAN_SLOT_HEART))
var/obj/item/organ/heart/H = new()
H.Insert(src)
if(!getorganslot("tongue"))
if(!getorganslot(ORGAN_SLOT_TONGUE))
var/obj/item/organ/tongue/T
if(dna && dna.species && dna.species.mutanttongue)
@@ -155,7 +155,7 @@
// if they have no mutant tongues, give them a regular one
T.Insert(src)
if(!getorganslot("eye_sight"))
if(!getorganslot(ORGAN_SLOT_EYES))
var/obj/item/organ/eyes/E
if(dna && dna.species && dna.species.mutanteyes)
@@ -165,7 +165,7 @@
E = new()
E.Insert(src)
if(!getorganslot("ears"))
if(!getorganslot(ORGAN_SLOT_EARS))
var/obj/item/organ/ears/ears
if(dna && dna.species && dna.species.mutantears)
ears = new dna.species.mutantears

View File

@@ -4,7 +4,7 @@
origin_tech = "biotech=4"
w_class = WEIGHT_CLASS_NORMAL
zone = "chest"
slot = "stomach"
slot = ORGAN_SLOT_STOMACH
attack_verb = list("gored", "squished", "slapped", "digested")
desc = "Onaka ga suite imasu."
var/disgust_metabolism = 1

View File

@@ -2,7 +2,7 @@
name = "tail"
desc = "What did you cut this off of?"
zone = "groin"
slot = "tail"
slot = ORGAN_SLOT_TAIL
/obj/item/organ/tail/cat
name = "cat tail"

View File

@@ -3,7 +3,7 @@
desc = "A fleshy muscle mostly used for lying."
icon_state = "tonguenormal"
zone = "mouth"
slot = "tongue"
slot = ORGAN_SLOT_TONGUE
attack_verb = list("licked", "slobbered", "slapped", "frenched", "tongued")
var/list/languages_possible
var/say_mod = null
@@ -83,7 +83,7 @@
var/mob/living/carbon/human/user = usr
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
var/obj/item/organ/tongue/T = H.getorganslot("tongue")
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
if(!T || T.type != type)
continue
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")

View File

@@ -7,7 +7,7 @@
name = "vocal cords"
icon_state = "appendix"
zone = "mouth"
slot = "vocal_cords"
slot = ORGAN_SLOT_VOICE
gender = PLURAL
var/list/spans = null
@@ -24,15 +24,13 @@
name = "adamantine resonator"
desc = "Fragments of adamantine exist in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders."
zone = "head"
slot = "adamantine_resonator"
slot = ORGAN_SLOT_ADAMANTINE_RESONATOR
icon_state = "adamantine_resonator"
/obj/item/organ/vocal_cords/adamantine
name = "adamantine vocal cords"
desc = "When adamantine resonates, it causes all nearby pieces of adamantine to resonate as well. Adamantine golems use this to broadcast messages to nearby golems."
actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords)
zone = "mouth"
slot = "vocal_cords"
icon_state = "adamantine_cords"
/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger()
@@ -48,7 +46,7 @@
for(var/m in GLOB.player_list)
if(iscarbon(m))
var/mob/living/carbon/C = m
if(C.getorganslot("adamantine_resonator"))
if(C.getorganslot(ORGAN_SLOT_ADAMANTINE_RESONATOR))
to_chat(C, msg)
if(isobserver(m))
var/link = FOLLOW_LINK(m, owner)
@@ -59,8 +57,6 @@
name = "divine vocal cords"
desc = "They carry the voice of an ancient god."
icon_state = "voice_of_god"
zone = "mouth"
slot = "vocal_cords"
actions_types = list(/datum/action/item_action/organ_action/colossus)
var/next_command = 0
var/cooldown_mod = 1

View File

@@ -44,7 +44,7 @@
return
var/obj/item/organ/zombie_infection/infection
infection = target.getorganslot("zombie_infection")
infection = target.getorganslot(ORGAN_SLOT_ZOMBIE)
if(!infection)
infection = new()
infection.Insert(target)

View File

@@ -2,7 +2,7 @@
name = "festering ooze"
desc = "A black web of pus and viscera."
zone = "head"
slot = "zombie_infection"
slot = ORGAN_SLOT_ZOMBIE
icon_state = "blacktumor"
origin_tech = "biotech=5"
var/datum/species/old_species = /datum/species/human