diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 3e19f0bfc1..235156d3d3 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -401,7 +401,7 @@ occupantData["structuralEnzymes"] = null occupantData["radiationLevel"] = null else - occupantData["name"] = connected.occupant.name + occupantData["name"] = connected.occupant.real_name occupantData["stat"] = connected.occupant.stat occupantData["isViableSubject"] = 1 if (NOCLONE in connected.occupant.mutations || !src.connected.occupant.dna) @@ -551,7 +551,7 @@ if (href_list["selectUIBlock"] && href_list["selectUISubblock"]) // This chunk of code updates selected block / sub-block based on click var/select_block = text2num(href_list["selectUIBlock"]) var/select_subblock = text2num(href_list["selectUISubblock"]) - if ((select_block <= 13) && (select_block >= 1)) + if ((select_block <= DNA_UI_LENGTH) && (select_block >= 1)) src.selected_ui_block = select_block if ((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1)) src.selected_ui_subblock = select_subblock @@ -704,7 +704,7 @@ databuf.types = DNA2_BUF_UE databuf.dna = src.connected.occupant.dna.Clone() if(ishuman(connected.occupant)) - databuf.dna.real_name=connected.occupant.name + databuf.dna.real_name=connected.occupant.dna.real_name databuf.name = "Unique Identifier" src.buffers[bufferId] = databuf return 1 @@ -715,7 +715,7 @@ databuf.types = DNA2_BUF_UI|DNA2_BUF_UE databuf.dna = src.connected.occupant.dna.Clone() if(ishuman(connected.occupant)) - databuf.dna.real_name=connected.occupant.name + databuf.dna.real_name=connected.occupant.dna.real_name databuf.name = "Unique Identifier + Unique Enzymes" src.buffers[bufferId] = databuf return 1 @@ -726,7 +726,7 @@ databuf.types = DNA2_BUF_SE databuf.dna = src.connected.occupant.dna.Clone() if(ishuman(connected.occupant)) - databuf.dna.real_name=connected.occupant.name + databuf.dna.real_name=connected.occupant.dna.real_name databuf.name = "Structural Enzymes" src.buffers[bufferId] = databuf return 1 diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 50ddd8a288..8b49a4574a 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -106,9 +106,19 @@ VOX HEIST ROUNDTYPE vox.f_style = "Shaved" for(var/datum/organ/external/limb in vox.organs) limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT) + + //Now apply cortical stack. + var/datum/organ/external/E = vox.get_organ("head") + var/obj/item/weapon/implant/cortical/I = new(vox) + I.imp_in = vox + I.implanted = 1 + I.part = E + E.implants += I + cortical_stacks += I + vox.equip_vox_raider() vox.regenerate_icons() - + raider.objectives = raid_objectives greet_vox(raider) @@ -284,4 +294,4 @@ datum/game_mode/proc/auto_declare_completion_heist() //maybe send the player a message that they've gone home/been kidnapped? Someone responsible for vox lore should write that. Del(M) for (var/obj/O in skipjack.contents) - Del(O) //no hiding in lockers or anything \ No newline at end of file + Del(O) //no hiding in lockers or anything diff --git a/code/game/machinery/embedded_controller/docking_program.dm b/code/game/machinery/embedded_controller/docking_program.dm index f6f1eaf7c7..032676f037 100644 --- a/code/game/machinery/embedded_controller/docking_program.dm +++ b/code/game/machinery/embedded_controller/docking_program.dm @@ -6,7 +6,9 @@ #define MODE_NONE 0 #define MODE_SERVER 1 -#define MODE_CLIENT 2 //The one who initiated the docking, and who can initiate the undocking. The server cannot initiate undocking. (Think server == station, client == shuttle) +#define MODE_CLIENT 2 //The one who initiated the docking, and who can initiate the undocking. The server cannot initiate undocking, and is the one responsible for deciding to accept a docking request and signals when docking and undocking is complete. (Think server == station, client == shuttle) + +#define MESSAGE_RESEND_TIME 5 //how long (in seconds) do we wait before resending a message /* *** STATE TABLE *** @@ -64,9 +66,10 @@ var/dock_state = STATE_UNDOCKED var/control_mode = MODE_NONE var/response_sent = 0 //so we don't spam confirmation messages + var/resend_counter = 0 //for periodically resending confirmation messages in case they are missed - var/override_enabled = 0 //skips checks for the docking port being ready - var/received_confirm = 0 //for undocking, whether the client has recieved a confirmation from the server + var/override_enabled = 0 //when enabled, do not open/close doors or cycle airlocks and wait for the player to do it manually + var/received_confirm = 0 //for undocking, whether the server has recieved a confirmation from the client /datum/computer/file/embedded_program/docking/receive_signal(datum/signal/signal, receive_method, receive_param) var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id @@ -158,10 +161,12 @@ finish_undocking() reset() //server is done undocking! - + if (response_sent || resend_counter > 0) + resend_counter++ - if (dock_state != STATE_DOCKING && dock_state != STATE_UNDOCKING) + if (resend_counter >= MESSAGE_RESEND_TIME || (dock_state != STATE_DOCKING && dock_state != STATE_UNDOCKING)) response_sent = 0 + resend_counter = 0 //handle invalid states if (control_mode == MODE_NONE && dock_state != STATE_UNDOCKED) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 22caeb2090..441dee233a 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -92,7 +92,7 @@ REAGENT SCANNER usr << "\red You don't have the dexterity to do this!" return user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") - + if (!istype(M, /mob/living/carbon) || (ishuman(M) && (M:species.flags & IS_SYNTHETIC))) //these sensors are designed for organic life user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR") @@ -102,7 +102,7 @@ REAGENT SCANNER user.show_message("\red Warning: Blood Level ERROR: --% --cl.\blue Type: ERROR") user.show_message("\blue Subject's pulse: -- bpm.") return - + var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) var/OX = M.getOxyLoss() > 50 ? "[M.getOxyLoss()]" : M.getOxyLoss() var/TX = M.getToxLoss() > 50 ? "[M.getToxLoss()]" : M.getToxLoss() @@ -141,7 +141,20 @@ REAGENT SCANNER user.show_message("[OX] | [TX] | [BU] | [BR]") if (istype(M, /mob/living/carbon)) if(M:reagents.total_volume > 0) - user.show_message(text("\red Warning: Unknown substance detected in subject's blood.")) + var/unknown = 0 + var/reagentdata[0] + for(var/A in M.reagents.reagent_list) + var/datum/reagent/R = A + if(R.scannable) + reagentdata["[R.id]"] = "\t \blue [round(M.reagents.get_reagent_amount(R.id), 1)]u [R.name]" + else + unknown++ + if(reagentdata.len) + user.show_message("\blue Beneficial reagents detected in subject's blood:") + for(var/d in reagentdata) + user.show_message(reagentdata[d]) + if(unknown) + user.show_message(text("\red Warning: Unknown substance[(unknown>1)?"s":""] detected in subject's blood.")) if(M:virus2.len) var/mob/living/carbon/C = M for (var/ID in C.virus2) @@ -154,8 +167,8 @@ REAGENT SCANNER for(var/datum/disease/D in M.viruses) if(!D.hidden[SCANNER]) user.show_message(text("\red Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) - if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) - user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.") +// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) +// user.show_message("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.") if (M.has_brain_worms()) user.show_message("\red Subject suffering from aberrant brain activity. Recommend further scanning.") else if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index c53bd3f99b..eeca2089ee 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -157,7 +157,10 @@ var/datum/organ/external/affecting = H.get_organ(user.zone_sel.selecting) if(affecting.open == 0) - if(!affecting.bandage()) + var/bandaged = affecting.bandage() + var/disinfected = affecting.disinfect() + + if(!(bandaged || disinfected)) user << "\red The wounds on [M]'s [affecting.display_name] have already been treated." return 1 else @@ -174,7 +177,8 @@ else user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.display_name].", \ "\blue You smear some bioglue over [W.desc] on [M]'s [affecting.display_name]." ) - affecting.heal_damage(heal_brute,0) + if (bandaged) + affecting.heal_damage(heal_brute,0) use(1) else if (can_operate(H)) //Checks if mob is lying down on table for surgery diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index e8cfce100d..11c3980db4 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1114,7 +1114,7 @@ var/global/floorIsLava = 0 return 1 return 0 -/proc/get_options_bar(whom, detail = 2, name = 0, link = 1) +/proc/get_options_bar(whom, detail = 2, name = 0, link = 1, highlight_special = 1) if(!whom) return "(*null*)" var/mob/M @@ -1129,12 +1129,12 @@ var/global/floorIsLava = 0 return "(*not an mob*)" switch(detail) if(0) - return "[key_name(C, link, name)]" + return "[key_name(C, link, name, highlight_special)]" if(1) - return "[key_name(C, link, name)](?)" + return "[key_name(C, link, name, highlight_special)](?)" if(2) var/ref_mob = "\ref[M]" - return "[key_name(C, link, name)](?) (PP) (VV) (SM) (JMP) (CA)" + return "[key_name(C, link, name, highlight_special)](?) (PP) (VV) (SM) (JMP) (CA)" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 63b9db599b..073ad330fa 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -91,8 +91,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," if(!mob) return //this doesn't happen var/ref_mob = "\ref[mob]" + var/mentor_msg = "\blue HELP: [get_options_bar(mob, 2, 1, 1, 0)][ai_found ? " (CL)" : ""]: [msg]" msg = "\blue HELP: [get_options_bar(mob, 2, 1, 1)][ai_found ? " (CL)" : ""]: [msg]" - //send this msg to all admins var/admin_number_afk = 0 for(var/client/X in admins) @@ -101,7 +101,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," admin_number_afk++ if(X.prefs.toggles & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' - X << msg + if(X.holder.rights == R_MENTOR) + X << mentor_msg // Mentors won't see coloring of names on people with special_roles (Antags, etc.) + else + X << msg //show it to the person adminhelping too src << "PM to-Admins: [original_msg]" diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 70fcdbf444..a312416ccc 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -37,5 +37,7 @@ if(config.mods_are_mentors) channel = "MENTOR:" for(var/client/C in admins) - if((R_ADMIN|R_MOD|R_MENTOR) & C.holder.rights) + if((R_ADMIN|R_MOD) & C.holder.rights) C << "[channel] [key_name(src,1)] (JMP): [msg]" + else // Mentors get same message without fancy coloring of name if special_role. + C << "[channel] [key_name(src,1,1,0)] (JMP): [msg]" diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 326921c1f6..6224bf8168 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -172,10 +172,9 @@ icons.Add(usr.zone_sel) for(var/obj/screen/I in icons) - if(I.color && I.alpha) - I.icon = ui_style2icon(UI_style_new) - I.color = UI_style_color_new - I.alpha = UI_style_alpha_new + I.icon = ui_style2icon(UI_style_new) + I.color = UI_style_color_new + I.alpha = UI_style_alpha_new diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 64e70e05b9..a3c9babd97 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -2,7 +2,7 @@ ..() // Increase germ_level regularly - if(germ_level < GERM_LEVEL_AMBIENT && prob(80)) //if you're just standing there, you shouldn't get more germs beyond an ambient level + if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level germ_level++ /mob/living/carbon/Move(NewLoc, direct) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e18b44a2bd..37b69afdaa 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -768,6 +768,10 @@ note dizziness decrements automatically in the mob's Life() proc. lying = 1 else lying = 1 + else if(buckled && (buckled.movable)) + anchored = 0 + canmove = 1 + lying = 0 else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH)) lying = 1 canmove = 0 @@ -801,36 +805,34 @@ note dizziness decrements automatically in the mob's Life() proc. return canmove -/mob/verb/eastface() - set hidden = 1 +/mob/proc/facedir(var/ndir) if(!canface()) return 0 - dir = EAST + dir = ndir + if(buckled && buckled.movable) + buckled.dir = ndir + buckled.handle_rotation() client.move_delay += movement_delay() return 1 +/mob/verb/eastface() + set hidden = 1 + return facedir(EAST) + + /mob/verb/westface() set hidden = 1 - if(!canface()) return 0 - dir = WEST - client.move_delay += movement_delay() - return 1 + return facedir(WEST) /mob/verb/northface() set hidden = 1 - if(!canface()) return 0 - dir = NORTH - client.move_delay += movement_delay() - return 1 + return facedir(NORTH) /mob/verb/southface() set hidden = 1 - if(!canface()) return 0 - dir = SOUTH - client.move_delay += movement_delay() - return 1 + return facedir(SOUTH) /mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index b5761df24c..f75f9e055d 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -17,6 +17,20 @@ /datum/organ/proc/get_icon() return icon('icons/mob/human.dmi',"blank") +//Germs +/datum/organ/proc/handle_antibiotics() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + + if (antibiotics < 5) + return + + if (germ_level < INFECTION_LEVEL_ONE) + germ_level = 0 //cure instantly + else if (germ_level < INFECTION_LEVEL_TWO) + germ_level -= 6 //at germ_level == 500, this should cure the infection in a minute + else + germ_level -= 2 //at germ_level == 1000, this will cure the infection in 5 minutes + //Handles chem traces /mob/living/carbon/human/proc/handle_trace_chems() //New are added for reagents to random organs. diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 3040b0bddc..5cf4d01302 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -352,68 +352,97 @@ INFECTION_LEVEL_TWO above this germ level the infection will start to spread to INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level. -Note that amputating the affected organ does in fact remove the infection from the -player's body, though, antitox and spaceacillin are easy enough to get I doubt it will ever be needed. +Note that amputating the affected organ does in fact remove the infection from the player's body. */ /datum/organ/external/proc/update_germs() - if(status & (ORGAN_ROBOT|ORGAN_DESTROYED)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. + if(status & (ORGAN_ROBOT|ORGAN_DESTROYED) || (owner.species && owner.species.flags & IS_PLANT)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. germ_level = 0 return if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs - //Syncing germ levels with external wounds + //** Syncing germ levels with external wounds + handle_germ_sync() + + //** Handle antibiotics and curing infections + handle_antibiotics() + + //** Handle the effects of infections + handle_germ_effects() + +/datum/organ/external/proc/handle_germ_sync() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + for(var/datum/wound/W in wounds) + //Open wounds can become infected + if (owner.germ_level > W.germ_level && W.infection_check()) + W.germ_level++ + + if (antibiotics < 5) for(var/datum/wound/W in wounds) - //Open wounds can become infected - if (owner.germ_level > W.germ_level && W.infection_check()) - W.germ_level++ - //Infected wounds raise the organ's germ level - W.germ_level = max(W.germ_level, germ_level) //Wounds get all the germs - if (W.germ_level > germ_level) //Badly infected wounds raise internal germ levels + if (W.germ_level > germ_level) germ_level++ + break //limit increase to a maximum of one per second - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - if (germ_level > 0 && antibiotics > 5) - if (prob(4*antibiotics)) germ_level-- //the higher the germ level the more antibiotics you'll need. +/datum/organ/external/proc/handle_germ_effects() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + + if (germ_level < INFECTION_LEVEL_ONE && prob(60)) //this could be an else clause, but it looks cleaner this way + germ_level-- //since germ_level increases at a rate of 1 per second with dirty wounds, prob(60) should give us about 5 minutes before level one. + + if(germ_level >= INFECTION_LEVEL_ONE) + //having an infection raises your body temperature + var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature + if (owner.bodytemperature < fever_temperature) + //world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature." + owner.bodytemperature++ - if(germ_level >= INFECTION_LEVEL_ONE) - //having an infection raises your body temperature - var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 1)* min(germ_level/INFECTION_LEVEL_THREE, 1) + owner.species.body_temperature - if (owner.bodytemperature < fever_temperature) - //world << "fever: [owner.bodytemperature] < [fever_temperature], raising temperature." - owner.bodytemperature++ - - if(prob(round(germ_level/10))) + if(prob(round(germ_level/10))) + if (antibiotics < 5) germ_level++ - if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections - owner.adjustToxLoss(1) + + if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections + owner.adjustToxLoss(1) - if(germ_level >= INFECTION_LEVEL_TWO) - //spread the infection + if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < 5) + //spread the infection to internal organs + var/datum/organ/internal/target_organ = null //make internal organs become infected one at a time instead of all at once + for (var/datum/organ/internal/I in internal_organs) + if (I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one + if (!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level + target_organ = I + + if (!target_organ) + //figure out which organs we can spread germs to and pick one at random + var/list/candidate_organs = list() for (var/datum/organ/internal/I in internal_organs) if (I.germ_level < germ_level) - I.germ_level++ + candidate_organs += I + if (candidate_organs.len) + target_organ = pick(candidate_organs) + + if (target_organ) + target_organ.germ_level++ - if (children) //To child organs - for (var/datum/organ/external/child in children) - if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT)) - if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) - child.germ_level++ + //spread the infection to child and parent organs + if (children) + for (var/datum/organ/external/child in children) + if (child.germ_level < germ_level && !(child.status & ORGAN_ROBOT)) + if (child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) + child.germ_level++ - if (parent) - if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT)) - if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) - parent.germ_level++ + if (parent) + if (parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT)) + if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) + parent.germ_level++ - if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections - if (!(status & ORGAN_DEAD)) - status |= ORGAN_DEAD - owner << "You can't feel your [display_name] anymore..." - - germ_level++ - owner.adjustToxLoss(1) + if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections + if (!(status & ORGAN_DEAD)) + status |= ORGAN_DEAD + owner << "You can't feel your [display_name] anymore..." + germ_level++ + owner.adjustToxLoss(1) //Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections /datum/organ/external/proc/update_wounds() @@ -429,7 +458,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i // let the GC handle the deletion of the wound // Internal wounds get worse over time. Low temperatures (cryo) stop them. - if(W.internal && !W.is_treated() && owner.bodytemperature >= 170) + if(W.internal && !W.can_autoheal() && owner.bodytemperature >= 170) var/bicardose = owner.reagents.get_reagent_amount("bicaridine") var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline") if(!bicardose || !inaprovaline) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, and also stop bleeding @@ -446,7 +475,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i var/heal_amt = 0 // if damage >= 50 AFTER treatment then it's probably too severe to heal within the timeframe of a round. - if (W.is_treated() && W.wound_damage() < 50) + if (W.can_autoheal() && W.wound_damage() < 50) heal_amt += 0.5 //we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime @@ -461,8 +490,8 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i // Salving also helps against infection if(W.germ_level > 0 && W.salved && prob(2)) - W.germ_level = 0 W.disinfected = 1 + W.germ_level = 0 // sync the organ's damage with its wounds src.update_damages() @@ -665,6 +694,15 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i W.bandaged = 1 return rval +/datum/organ/external/proc/disinfect() + var/rval = 0 + for(var/datum/wound/W in wounds) + if(W.internal) continue + rval |= !W.disinfected + W.disinfected = 1 + W.germ_level = 0 + return rval + /datum/organ/external/proc/clamp() var/rval = 0 src.status &= ~ORGAN_BLEEDING @@ -726,7 +764,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i /datum/organ/external/proc/has_infected_wound() for(var/datum/wound/W in wounds) - if(W.germ_level > 150) + if(W.germ_level > INFECTION_LEVEL_ONE) return 1 return 0 diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index d5e1b19b6c..3721633dce 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -32,35 +32,37 @@ src.owner = H /datum/organ/internal/process() - //Process infections if (!germ_level) return - if (robotic >= 2) //TODO make robotic internal and external organs separate types of organ instead of a flag + if (robotic >= 2 || (owner.species && owner.species.flags & IS_PLANT)) //TODO make robotic internal and external organs separate types of organ instead of a flag germ_level = 0 return - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs + //** Handle antibiotics and curing infections + handle_antibiotics() - if (germ_level > 0 && antibiotics > 5) - if (prob(4*antibiotics)) germ_level-- - if (antibiotics > 30) germ_level-- - - if (germ_level >= INFECTION_LEVEL_ONE/2) - if(prob(round(germ_level/6))) //aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes - germ_level++ - if(prob(1)) - take_damage(1,silent=0) - - if (germ_level >= INFECTION_LEVEL_TWO) - var/datum/organ/external/parent = owner.get_organ(parent_organ) - if (parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) - parent.germ_level++ + //** Handle the effects of infections + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - if (prob(5)) //about once every 20 seconds - take_damage(1,silent=prob(30)) + if (germ_level < INFECTION_LEVEL_ONE/2 && prob(30)) + germ_level-- + + if (germ_level >= INFECTION_LEVEL_ONE/2) + //aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes + if(antibiotics < 5 && prob(round(germ_level/6))) + germ_level++ + if (germ_level >= INFECTION_LEVEL_TWO) + var/datum/organ/external/parent = owner.get_organ(parent_organ) + //spread germs + if (antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) + parent.germ_level++ + + if (prob(3)) //about once every 30 seconds + take_damage(1,silent=prob(30)) /datum/organ/internal/proc/take_damage(amount, var/silent=0) if(src.robotic == 2) @@ -121,6 +123,11 @@ parent_organ = "chest" process() + ..() + if (germ_level > INFECTION_LEVEL_ONE) + if(prob(5)) + owner.emote("cough") //respitory tract infection + if(is_bruised()) if(prob(2)) spawn owner.emote("me", 1, "coughs up blood!") @@ -135,6 +142,14 @@ var/process_accuracy = 10 process() + ..() + if (germ_level > INFECTION_LEVEL_ONE) + if(prob(1)) + owner << "\red Your skin itches." + if (germ_level > INFECTION_LEVEL_TWO) + if(prob(1)) + spawn owner.vomit() + if(owner.life_tick % process_accuracy == 0) if(src.damage < 0) src.damage = 0 @@ -177,6 +192,7 @@ parent_organ = "head" process() //Eye damage replaces the old eye_stat var. + ..() if(is_bruised()) owner.eye_blurry = 20 if(is_broken()) diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index e2763d4697..d20fc0dbfb 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -85,24 +85,25 @@ proc/wound_damage() return src.damage / src.amount - // checks whether the wound has been appropriately treated - // always returns 1 for wounds that are too minor to need treatment - proc/is_treated() + proc/can_autoheal() if(src.wound_damage() <= autoheal_cutoff) return 1 - + + return is_treated() + + // checks whether the wound has been appropriately treated + proc/is_treated() if(damage_type == BRUISE || damage_type == CUT) return bandaged else if(damage_type == BURN) return salved - // Checks whether other other can be merged into src. proc/can_merge(var/datum/wound/other) if (other.type != src.type) return 0 if (other.current_stage != src.current_stage) return 0 if (other.damage_type != src.damage_type) return 0 - if (!(other.is_treated()) != !(src.is_treated())) return 0 + if (!(other.can_autoheal()) != !(src.can_autoheal())) return 0 if (!(other.bandaged) != !(src.bandaged)) return 0 if (!(other.clamped) != !(src.clamped)) return 0 if (!(other.salved) != !(src.salved)) return 0 @@ -120,20 +121,28 @@ // checks if wound is considered open for external infections // untreated cuts (and bleeding bruises) and burns are possibly infectable, chance higher if wound is bigger proc/infection_check() - if (is_treated() && damage < 10) + if (damage < 10) //small cuts, tiny bruises, and moderate burns shouldn't be infectable. + return 0 + if (is_treated() && damage < 25) //anything less than a flesh wound (or equivalent) isn't infectable if treated properly return 0 if (disinfected) + germ_level = 0 //reset this, just in case return 0 + + if (damage_type == BRUISE && !bleeding()) //bruises only infectable if bleeding + return 0 + var/dam_coef = round(damage/10) switch (damage_type) if (BRUISE) - return prob(dam_coef*5) && bleeding() //bruises only infectable if bleeding + return prob(dam_coef*5) if (BURN) return prob(dam_coef*10) if (CUT) return prob(dam_coef*20) return 0 + // heal the given amount of damage, and if the given amount of damage was more // than what needed to be healed, return how much heal was left // set @heals_internal to also heal internal organ damage @@ -183,10 +192,20 @@ return 1 - proc/bleeding() - // internal wounds don't bleed in the sense of this function - return ((wound_damage() > 30 || bleed_timer > 0) && !(bandaged||clamped) && (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) && current_stage <= max_bleeding_stage && !src.internal) + if (src.internal) + return 0 // internal wounds don't bleed in the sense of this function + + if (current_stage > max_bleeding_stage) + return 0 + + if (bandaged||clamped) + return 0 + + if (wound_damage() <= 30 && bleed_timer <= 0) + return 0 //Bleed timer has run out. Wounds with more than 30 damage don't stop bleeding on their own. + + return (damage_type == BRUISE && wound_damage() >= 20 || damage_type == CUT && wound_damage() >= 5) /** CUTS **/ /datum/wound/cut/small diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 94caf95981..2bb33f891a 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -22,6 +22,7 @@ datum var/custom_metabolism = REAGENTS_METABOLISM var/overdose = 0 var/overdose_dam = 1 + var/scannable = 0 //shows up on health analyzers //var/list/viruses = list() var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) @@ -408,6 +409,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE*2 + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(!M) M = holder.my_atom @@ -778,6 +780,8 @@ datum reagent_state = LIQUID color = "#C855DC" overdose = 60 + scannable = 1 + custom_metabolism = 0.025 // Lasts 10 minutes for 15 units on_mob_life(var/mob/living/M as mob) if (volume > overdose) @@ -792,6 +796,8 @@ datum reagent_state = LIQUID color = "#C8A5DC" overdose = 30 + scannable = 1 + custom_metabolism = 0.025 // Lasts 10 minutes for 15 units on_mob_life(var/mob/living/M as mob) if (volume > overdose) @@ -806,6 +812,7 @@ datum reagent_state = LIQUID color = "#C805DC" overdose = 20 + custom_metabolism = 0.25 // Lasts 10 minutes for 15 units on_mob_life(var/mob/living/M as mob) if (volume > overdose) @@ -835,6 +842,18 @@ datum description = "Sterilizes wounds in preparation for surgery." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 + + //makes you squeaky clean + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if (method == TOUCH) + M.germ_level -= min(volume*20, M.germ_level) + + reaction_obj(var/obj/O, var/volume) + O.germ_level -= min(volume*20, O.germ_level) + + reaction_turf(var/turf/T, var/volume) + T.germ_level -= min(volume*20, T.germ_level) + /* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) src = null if (method==TOUCH) @@ -996,6 +1015,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1031,6 +1051,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1048,6 +1069,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE/2 + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN @@ -1065,6 +1087,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) @@ -1088,6 +1111,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE/2 + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) @@ -1110,6 +1134,7 @@ datum description = "Tricordrazine is a highly potent stimulant, originally derived from cordrazine. Can be used to treat a wide range of injuries." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) @@ -1129,6 +1154,7 @@ datum description = "Dylovene is a broad-spectrum antitoxin." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(!M) M = holder.my_atom @@ -1187,6 +1213,7 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 custom_metabolism = 0.01 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1226,6 +1253,7 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 custom_metabolism = 0.05 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1261,6 +1289,7 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 custom_metabolism = 0.05 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1275,6 +1304,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1296,6 +1326,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = 10 + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1315,6 +1346,7 @@ datum reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob, var/alien) if(M.stat == 2.0) @@ -1346,6 +1378,7 @@ datum description = "A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1363,6 +1396,7 @@ datum description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' the cloning process when used in conjunction with a cryo tube." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1381,6 +1415,7 @@ datum reagent_state = SOLID color = "#669900" // rgb: 102, 153, 0 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1410,6 +1445,7 @@ datum color = "#C8A5DC" // rgb: 200, 165, 220 custom_metabolism = 0.01 overdose = REAGENTS_OVERDOSE + scannable = 1 on_mob_life(var/mob/living/M as mob) ..() diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 401d98b7ef..827c400898 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -28,7 +28,9 @@ return /obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone) - return + if (can_operate(M)) //Checks if mob is lying down on table for surgery + if (do_surgery(M,user,src)) + return // this prevented pills, food, and other things from being picked up by bags. // possibly intentional, but removing it allows us to not duplicate functionality. diff --git a/code/modules/shuttles/shuttle_supply.dm b/code/modules/shuttles/shuttle_supply.dm index 41d0a82224..a33f067c8e 100644 --- a/code/modules/shuttles/shuttle_supply.dm +++ b/code/modules/shuttles/shuttle_supply.dm @@ -47,11 +47,11 @@ sleep(5) if (destination != away_area) + //late + if (prob(late_chance)) + sleep(rand(0,max_late_time)) + move(away_area, destination) - - //late - if (prob(late_chance)) - sleep(rand(0,max_late_time)) moving_status = SHUTTLE_IDLE diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 122da9f236..129f54daa4 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -1,10 +1,7 @@ #define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more -#define THERMAL_RELEASE_MODIFIER 10 //Higher == less heat released during reaction -#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction -#define OXYGEN_RELEASE_MODIFIER 750 //Higher == less oxygen released at high temperature/power #define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction -#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction +#define PHORON_RELEASE_MODIFIER 1500 //Higher == less phoron released by reaction #define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power #define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power diff --git a/code/modules/surgery/headreattach.dm b/code/modules/surgery/headreattach.dm index 17db2c30e3..72da44cc81 100644 --- a/code/modules/surgery/headreattach.dm +++ b/code/modules/surgery/headreattach.dm @@ -64,7 +64,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) var/datum/organ/external/affected = target.get_organ(target_zone) - return affected.status & ORGAN_CUT_AWAY && affected.open < 3 && !(affected.status & ORGAN_ATTACHABLE) + return affected.status & ORGAN_CUT_AWAY && target.op_stage.head_reattach == 0 && !(affected.status & ORGAN_ATTACHABLE) begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -73,10 +73,9 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\blue [user] has finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].", \ "\blue You have finished repositioning flesh and tissue to something anatomically recognizable where [target]'s head used to be with \the [tool].") - affected.open = 3 + target.op_stage.head_reattach = 1 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -97,8 +96,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) - var/datum/organ/external/affected = target.get_organ(target_zone) - return affected.open == 3 + return target.op_stage.head_reattach == 1 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is stapling and suturing flesh into place in [target]'s esophagal and vocal region with \the [tool].", \ @@ -106,10 +104,9 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\blue [user] has finished stapling [target]'s neck into place with \the [tool].", \ "\blue You have finished stapling [target]'s neck into place with \the [tool].") - affected.open = 4 + target.op_stage.head_reattach = 2 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/datum/organ/external/affected = target.get_organ(target_zone) @@ -132,8 +129,7 @@ can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) if(..()) - var/datum/organ/external/affected = target.get_organ(target_zone) - return affected.open == 4 + return target.op_stage.head_reattach == 2 begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] starts adjusting area around [target]'s neck with \the [tool].", \ @@ -144,6 +140,7 @@ var/datum/organ/external/affected = target.get_organ(target_zone) user.visible_message("\blue [user] has finished adjusting the area around [target]'s neck with \the [tool].", \ "\blue You have finished adjusting the area around [target]'s neck with \the [tool].") + target.op_stage.head_reattach = 0 affected.status |= ORGAN_ATTACHABLE affected.amputated = 1 affected.setAmputatedTree() diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index bd1002b06d..7d113950e2 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -51,3 +51,121 @@ user.visible_message("\red [user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!" , \ "\red Your hand slips, smearing [tool] in the incision in [target]'s [affected.display_name]!") affected.take_damage(5, 0) + +/datum/surgery_step/fix_dead_tissue //Debridement + priority = 2 + allowed_tools = list( + /obj/item/weapon/scalpel = 100, \ + /obj/item/weapon/kitchenknife = 75, \ + /obj/item/weapon/shard = 50, \ + ) + + can_infect = 1 + blood_level = 1 + + min_duration = 110 + max_duration = 160 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if(!hasorgans(target)) + return 0 + + if (target_zone == "mouth" || target_zone == "eyes") + return 0 + + var/datum/organ/external/affected = target.get_organ(target_zone) + + return affected.open == 2 && (affected.status & ORGAN_DEAD) + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool]." , \ + "You start cutting away necrotic tissue in [target]'s [affected.display_name] with \the [tool].") + target.custom_pain("The pain in [affected.display_name] is unbearable!",1) + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + user.visible_message("\blue [user] has cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].", \ + "\blue You have cut away necrotic tissue in [target]'s [affected.display_name] with \the [tool].") + affected.open = 3 + + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!", \ + "\red Your hand slips, slicing an artery inside [target]'s [affected.display_name] with \the [tool]!") + affected.createwound(CUT, 20, 1) + +/datum/surgery_step/treat_necrosis + priority = 2 + allowed_tools = list( + /obj/item/weapon/reagent_containers/dropper = 100, + /obj/item/weapon/reagent_containers/glass/bottle = 75, + /obj/item/weapon/reagent_containers/glass/beaker = 75, + /obj/item/weapon/reagent_containers/spray = 50, + /obj/item/weapon/reagent_containers/glass/bucket = 50, + ) + + can_infect = 0 + blood_level = 0 + + min_duration = 50 + max_duration = 60 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if (!istype(tool, /obj/item/weapon/reagent_containers)) + return 0 + + var/obj/item/weapon/reagent_containers/container = tool + if(!container.reagents.has_reagent("peridaxon")) + return 0 + + if(!hasorgans(target)) + return 0 + + if (target_zone == "mouth" || target_zone == "eyes") + return 0 + + var/datum/organ/external/affected = target.get_organ(target_zone) + return affected.open == 3 && (affected.status & ORGAN_DEAD) + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool]." , \ + "You start applying medication to the affected tissue in [target]'s [affected.display_name] with \the [tool].") + target.custom_pain("Something in your [affected.display_name] is causing you a lot of pain!",1) + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + + if (!istype(tool, /obj/item/weapon/reagent_containers)) + return + + var/obj/item/weapon/reagent_containers/container = tool + + var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) + if (trans > 0) + container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue + + if(container.reagents.has_reagent("peridaxon")) + affected.status &= ~ORGAN_DEAD + + user.visible_message("\blue [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.display_name]", \ + "\blue You apply [trans] units of the solution to affected tissue in [target]'s [affected.display_name] with \the [tool].") + + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + var/datum/organ/external/affected = target.get_organ(target_zone) + + if (!istype(tool, /obj/item/weapon/reagent_containers)) + return + + var/obj/item/weapon/reagent_containers/container = tool + + var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) + container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue + + user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \ + "\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!") + + //no damage or anything, just wastes medicine diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 05371f18c8..8e94c03ddc 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -111,4 +111,5 @@ proc/sort_surgeries() var/eyes = 0 var/face = 0 var/appendix = 0 - var/ribcage = 0 \ No newline at end of file + var/ribcage = 0 + var/head_reattach = 0 diff --git a/code/setup.dm b/code/setup.dm index be0ecd1bfb..a86e066576 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -1,814 +1,814 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -#define DEBUG - -#define PI 3.1415 - -#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol) -#define ONE_ATMOSPHERE 101.325 //kPa - -#define CELL_VOLUME 2500 //liters in a cell -#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC - -#define O2STANDARD 0.21 -#define N2STANDARD 0.79 - -#define MOLES_O2STANDARD MOLES_CELLSTANDARD*O2STANDARD // O2 standard value (21%) -#define MOLES_N2STANDARD MOLES_CELLSTANDARD*N2STANDARD // N2 standard value (79%) - -#define MOLES_PHORON_VISIBLE 0.7 //Moles in a standard cell after which phoron is visible -#define MIN_TOXIN_DAMAGE 1 //This and MAX_TOXIN_DAMAGE are for when a mob breathes poisonous air -#define MAX_TOXIN_DAMAGE 10 //This and MIN_TOXIN_DAMAGE are for when a mob breathes poisonous air - -#define BREATH_VOLUME 0.5 //liters in a normal breath -#define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME /(T20C*R_IDEAL_GAS_EQUATION)) -#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME - //Amount of air to take a from a tile -#define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 - //Amount of air needed before pass out/suffocation commences - -// Pressure limits. -#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) -#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) -#define WARNING_LOW_PRESSURE 50 //This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) -#define HAZARD_LOW_PRESSURE 20 //This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) - -#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount. -#define BODYTEMP_AUTORECOVERY_DIVISOR 12 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive. -#define BODYTEMP_AUTORECOVERY_MINIMUM 1 //Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50. -#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster. -#define BODYTEMP_HEAT_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster. -#define BODYTEMP_COOLING_MAX -30 //The maximum number of degrees that your body can cool in 1 tick, when in a cold area. -#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, when in a hot area. - -#define BODYTEMP_HEAT_DAMAGE_LIMIT 360.15 // The limit the human body can take before it starts taking damage from heat. -#define BODYTEMP_COLD_DAMAGE_LIMIT 260.15 // The limit the human body can take before it starts taking damage from coldness. - -#define SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0. -#define SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0. -#define SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE 5000 //These need better heat protect, but not as good heat protect as firesuits. -#define FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE 30000 //what max_heat_protection_temperature is set to for firesuit quality headwear. MUST NOT BE 0. -#define FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE 30000 //for fire helmet quality items (red and white hardhats) -#define HELMET_MIN_COLD_PROTECTION_TEMPERATURE 160 //For normal helmets -#define HELMET_MAX_HEAT_PROTECTION_TEMPERATURE 600 //For normal helmets -#define ARMOR_MIN_COLD_PROTECTION_TEMPERATURE 160 //For armor -#define ARMOR_MAX_HEAT_PROTECTION_TEMPERATURE 600 //For armor - -#define GLOVES_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For some gloves (black and) -#define GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For some gloves -#define SHOE_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For gloves -#define SHOE_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For gloves - - -#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE -#define MAX_HIGH_PRESSURE_DAMAGE 4 //This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :( -#define LOW_PRESSURE_DAMAGE 2 //The amounb of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). - -#define PRESSURE_SUIT_REDUCTION_COEFFICIENT 0.8 //This is how much (percentual) a suit with the flag STOPSPRESSUREDMAGE reduces pressure. -#define PRESSURE_HEAD_REDUCTION_COEFFICIENT 0.4 //This is how much (percentual) a helmet/hat with the flag STOPSPRESSUREDMAGE reduces pressure. - -// Doors! -#define DOOR_CRUSH_DAMAGE 10 - -// Factor of how fast mob nutrition decreases -#define HUNGER_FACTOR 0.05 - -// How many units of reagent are consumed per tick, by default. -#define REAGENTS_METABOLISM 0.2 - -// By defining the effect multiplier this way, it'll exactly adjust -// all effects according to how they originally were with the 0.4 metabolism -#define REAGENTS_EFFECT_MULTIPLIER REAGENTS_METABOLISM / 0.4 - - -#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 - //Minimum ratio of air that must move to/from a tile to suspend group processing -#define MINIMUM_AIR_TO_SUSPEND MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND - //Minimum amount of air that has to move before a group processing can be suspended - -#define MINIMUM_MOLES_DELTA_TO_MOVE MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND //Either this must be active -#define MINIMUM_TEMPERATURE_TO_MOVE T20C+100 //or this (or both, obviously) - -#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012 -#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 - //Minimum temperature difference before group processing is suspended -#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 - //Minimum temperature difference before the gas temperatures are just set to be equal - -#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10 -#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200 - -#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4 -#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0 -#define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0 -#define SPACE_HEAT_TRANSFER_COEFFICIENT 0.2 //a hack to partly simulate radiative heat -#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4 -#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now - //Must be between 0 and 1. Values closer to 1 equalize temperature faster - //Should not exceed 0.4 else strange heat flow occur - -/* -#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C -#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C -#define FIRE_SPREAD_RADIOSITY_SCALE 0.85 -#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile -#define FIRE_PHORON_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt phoron into the tile -#define FIRE_GROWTH_RATE 40000 //For small fires - -#define WATER_BOIL_TEMP 393 */ - -// Fire Damage -#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C -#define CARBON_LIFEFORM_FIRE_DAMAGE 4 - -//Phoron fire properties -#define PHORON_MINIMUM_BURN_TEMPERATURE 100+T0C -#define PHORON_FLASHPOINT 246+T0C -#define PHORON_UPPER_TEMPERATURE 1370+T0C -#define PHORON_MINIMUM_OXYGEN_NEEDED 2 -#define PHORON_MINIMUM_OXYGEN_PHORON_RATIO 20 -#define PHORON_OXYGEN_FULLBURN 10 - -#define T0C 273.15 // 0degC -#define T20C 293.15 // 20degC -#define TCMB 2.7 // -270.3degC - -//Used to be used by FEA -//var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference when atmos wants to remove excess heat. - -#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking -#define TANK_RUPTURE_PRESSURE (40.*ONE_ATMOSPHERE) // Tank spills all contents into atmosphere - -#define TANK_FRAGMENT_PRESSURE (50.*ONE_ATMOSPHERE) // Boom 3x3 base explosion -#define TANK_FRAGMENT_SCALE (10.*ONE_ATMOSPHERE) // +1 for each SCALE kPa aboe threshold - // was 2 atm - -//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage -var/MAX_EXPLOSION_RANGE = 14 -//#define MAX_EXPLOSION_RANGE 14 // Defaults to 12 (was 8) -- TLE - -#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone. - -#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien. - -#define NORMPIPERATE 30 //pipe-insulation rate divisor -#define HEATPIPERATE 8 //heat-exch pipe insulation - -#define FLOWFRAC 0.99 // fraction of gas transfered per process - -#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up - - -//ITEM INVENTORY SLOT BITMASKS -#define SLOT_OCLOTHING 1 -#define SLOT_ICLOTHING 2 -#define SLOT_GLOVES 4 -#define SLOT_EYES 8 -#define SLOT_EARS 16 -#define SLOT_MASK 32 -#define SLOT_HEAD 64 -#define SLOT_FEET 128 -#define SLOT_ID 256 -#define SLOT_BELT 512 -#define SLOT_BACK 1024 -#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets. -#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets. -#define SLOT_TWOEARS 8192 -#define SLOT_LEGS = 16384 - -//FLAGS BITMASK -#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere - //To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. -#define TABLEPASS 2 // can pass by a table or rack - -#define MASKINTERNALS 8 // mask allows internals -//#define SUITSPACE 8 // suit protects against space - -#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) -#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. -#define NOSHIELD 32 // weapon not affected by shield -#define CONDUCT 64 // conducts electricity (metal etc.) -#define FPRINT 256 // takes a fingerprint -#define ON_BORDER 512 // item has priority to check when entering or leaving -#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message with the default handler -#define NOBLOODY 2048 // used to items if they don't want to get a blood overlay - -#define GLASSESCOVERSEYES 1024 -#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags -#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes -#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head -#define HEADCOVERSMOUTH 2048 - -#define THICKMATERIAL 1024 //From /tg: prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with NOSLIP for shoes) -#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc - -#define OPENCONTAINER 4096 // is an open container for chemistry purposes - -#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) -#define ONESIZEFITSALL 8192 -#define PHORONGUARD 16384 //Does not get contaminated by phoron. - -#define NOREACT 16384 //Reagents dont' react inside this container. - -#define BLOCKHEADHAIR 4 // temporarily removes the user's hair overlay. Leaves facial hair. -#define BLOCKHAIR 32768 // temporarily removes the user's hair, facial and otherwise. - -//flags for pass_flags -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 - -//turf-only flags -#define NOJAUNT 1 - - -//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDETAIL 16 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEMASK 1 //APPLIES ONLY TO HELMETS/MASKS!! -#define HIDEEARS 2 //APPLIES ONLY TO HELMETS/MASKS!! (ears means headsets and such) -#define HIDEEYES 4 //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses) -#define HIDEFACE 8 //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown. - -//slots -#define slot_back 1 -#define slot_wear_mask 2 -#define slot_handcuffed 3 -#define slot_l_hand 4 -#define slot_r_hand 5 -#define slot_belt 6 -#define slot_wear_id 7 -#define slot_l_ear 8 -#define slot_glasses 9 -#define slot_gloves 10 -#define slot_head 11 -#define slot_shoes 12 -#define slot_wear_suit 13 -#define slot_w_uniform 14 -#define slot_l_store 15 -#define slot_r_store 16 -#define slot_s_store 17 -#define slot_in_backpack 18 -#define slot_legcuffed 19 -#define slot_r_ear 20 -#define slot_legs 21 - -//Cant seem to find a mob bitflags area other than the powers one - -// bitflags for clothing parts -#define HEAD 1 -#define UPPER_TORSO 2 -#define LOWER_TORSO 4 -#define LEG_LEFT 8 -#define LEG_RIGHT 16 -#define LEGS 24 -#define FOOT_LEFT 32 -#define FOOT_RIGHT 64 -#define FEET 96 -#define ARM_LEFT 128 -#define ARM_RIGHT 256 -#define ARMS 384 -#define HAND_LEFT 512 -#define HAND_RIGHT 1024 -#define HANDS 1536 -#define FULL_BODY 2047 - -// bitflags for the percentual amount of protection a piece of clothing which covers the body part offers. -// Used with human/proc/get_heat_protection() and human/proc/get_cold_protection() -// The values here should add up to 1. -// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30% -#define THERMAL_PROTECTION_HEAD 0.3 -#define THERMAL_PROTECTION_UPPER_TORSO 0.15 -#define THERMAL_PROTECTION_LOWER_TORSO 0.15 -#define THERMAL_PROTECTION_LEG_LEFT 0.075 -#define THERMAL_PROTECTION_LEG_RIGHT 0.075 -#define THERMAL_PROTECTION_FOOT_LEFT 0.025 -#define THERMAL_PROTECTION_FOOT_RIGHT 0.025 -#define THERMAL_PROTECTION_ARM_LEFT 0.075 -#define THERMAL_PROTECTION_ARM_RIGHT 0.075 -#define THERMAL_PROTECTION_HAND_LEFT 0.025 -#define THERMAL_PROTECTION_HAND_RIGHT 0.025 - - -//bitflags for mutations - // Extra powers: -#define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) -#define SCREAM (1<<11) // supersonic screaming (25%) -#define EXPLOSIVE (1<<12) // exploding on-demand (15%) -#define REGENERATION (1<<13) // superhuman regeneration (30%) -#define REPROCESSOR (1<<14) // eat anything (50%) -#define SHAPESHIFTING (1<<15) // take on the appearance of anything (40%) -#define PHASING (1<<16) // ability to phase through walls (40%) -#define SHIELD (1<<17) // shielding from all projectile attacks (30%) -#define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) -#define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) - - -// String identifiers for associative list lookup - -// mob/var/list/mutations - -#define STRUCDNASIZE 27 -#define UNIDNASIZE 13 - - // Generic mutations: -#define TK 1 -#define COLD_RESISTANCE 2 -#define XRAY 3 -#define HULK 4 -#define CLUMSY 5 -#define FAT 6 -#define HUSK 7 -#define NOCLONE 8 - - - // Extra powers: -#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes -#define HEAL 10 // healing people with hands -#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%) -#define SCREAM 12 // supersonic screaming (25%) -#define EXPLOSIVE 13 // exploding on-demand (15%) -#define REGENERATION 14 // superhuman regeneration (30%) -#define REPROCESSOR 15 // eat anything (50%) -#define SHAPESHIFTING 16 // take on the appearance of anything (40%) -#define PHASING 17 // ability to phase through walls (40%) -#define SHIELD 18 // shielding from all projectile attacks (30%) -#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) -#define ELECTRICITY 20 // ability to shoot electric attacks (15%) - - //2spooky -#define SKELETON 29 -#define PLANT 30 - -// Other Mutations: -#define mNobreath 100 // no need to breathe -#define mRemote 101 // remote viewing -#define mRegen 102 // health regen -#define mRun 103 // no slowdown -#define mRemotetalk 104 // remote talking -#define mMorph 105 // changing appearance -#define mBlend 106 // nothing (seriously nothing) -#define mHallucination 107 // hallucinations -#define mFingerprints 108 // no fingerprints -#define mShock 109 // insulated hands -#define mSmallsize 110 // table climbing - -//disabilities -#define NEARSIGHTED 1 -#define EPILEPSY 2 -#define COUGHING 4 -#define TOURETTES 8 -#define NERVOUS 16 - -//sdisabilities -#define BLIND 1 -#define MUTE 2 -#define DEAF 4 - -//mob/var/stat things -#define CONSCIOUS 0 -#define UNCONSCIOUS 1 -#define DEAD 2 - -// channel numbers for power -#define EQUIP 1 -#define LIGHT 2 -#define ENVIRON 3 -#define TOTAL 4 //for total power used only - -// bitflags for machine stat variable -#define BROKEN 1 -#define NOPOWER 2 -#define POWEROFF 4 // tbd -#define MAINT 8 // under maintaince -#define EMPED 16 // temporary broken by EMP pulse - -//bitflags for door switches. -#define OPEN 1 -#define IDSCAN 2 -#define BOLTS 4 -#define SHOCK 8 -#define SAFE 16 - -#define ENGINE_EJECT_Z 3 - -//metal, glass, rod stacks -#define MAX_STACK_AMOUNT_METAL 50 -#define MAX_STACK_AMOUNT_GLASS 50 -#define MAX_STACK_AMOUNT_RODS 60 - -#define GAS_O2 (1 << 0) -#define GAS_N2 (1 << 1) -#define GAS_PL (1 << 2) -#define GAS_CO2 (1 << 3) -#define GAS_N2O (1 << 4) - - -var/list/accessable_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60) -//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. -//(Exceptions: extended, sandbox and nuke) -Errorage -//Was list("3" = 30, "4" = 70). -//Spacing should be a reliable method of getting rid of a body -- Urist. -//Go away Urist, I'm restoring this to the longer list. ~Errorage - -#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) - - -var/list/global_mutations = list() // list of hidden mutation things - -//Bluh shields - - -//Damage things //TODO: merge these down to reduce on defines -//Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc... -#define BRUTE "brute" -#define BURN "fire" -#define TOX "tox" -#define OXY "oxy" -#define CLONE "clone" -#define HALLOSS "halloss" - -#define STUN "stun" -#define WEAKEN "weaken" -#define PARALYZE "paralize" -#define IRRADIATE "irradiate" -#define AGONY "agony" // Added in PAIN! -#define STUTTER "stutter" -#define EYE_BLUR "eye_blur" -#define DROWSY "drowsy" - -//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches -#define BRUTELOSS 1 -#define FIRELOSS 2 -#define TOXLOSS 4 -#define OXYLOSS 8 - -//Bitflags defining which status effects could be or are inflicted on a mob -#define CANSTUN 1 -#define CANWEAKEN 2 -#define CANPARALYSE 4 -#define CANPUSH 8 -#define LEAPING 16 -#define PASSEMOTES 32 //Mob has a cortical borer or holders inside of it that need to see emotes. -#define GODMODE 4096 -#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath -#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system -#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy. - -var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg') - -//Grab levels -#define GRAB_PASSIVE 1 -#define GRAB_AGGRESSIVE 2 -#define GRAB_NECK 3 -#define GRAB_UPGRADING 4 -#define GRAB_KILL 5 - -//Security levels -#define SEC_LEVEL_GREEN 0 -#define SEC_LEVEL_BLUE 1 -#define SEC_LEVEL_RED 2 -#define SEC_LEVEL_DELTA 3 - -#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level - -var/list/liftable_structures = list(\ - - /obj/machinery/autolathe, \ - /obj/machinery/constructable_frame, \ - /obj/machinery/hydroponics, \ - /obj/machinery/computer, \ - /obj/machinery/optable, \ - /obj/structure/dispenser, \ - /obj/machinery/gibber, \ - /obj/machinery/microwave, \ - /obj/machinery/vending, \ - /obj/machinery/seed_extractor, \ - /obj/machinery/space_heater, \ - /obj/machinery/recharge_station, \ - /obj/machinery/flasher, \ - /obj/structure/stool, \ - /obj/structure/closet, \ - /obj/machinery/photocopier, \ - /obj/structure/filingcabinet, \ - /obj/structure/reagent_dispensers, \ - /obj/machinery/portable_atmospherics/canister) - -//A set of constants used to determine which type of mute an admin wishes to apply: -//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) -//Therefore there needs to be a gap between the flags for the automute flags -#define MUTE_IC 1 -#define MUTE_OOC 2 -#define MUTE_PRAY 4 -#define MUTE_ADMINHELP 8 -#define MUTE_DEADCHAT 16 -#define MUTE_ALL 31 - -//Number of identical messages required to get the spam-prevention automute thing to trigger warnings and automutes -#define SPAM_TRIGGER_WARNING 5 -#define SPAM_TRIGGER_AUTOMUTE 10 - -//Some constants for DB_Ban -#define BANTYPE_PERMA 1 -#define BANTYPE_TEMP 2 -#define BANTYPE_JOB_PERMA 3 -#define BANTYPE_JOB_TEMP 4 -#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. - -#define SEE_INVISIBLE_MINIMUM 5 - -#define SEE_INVISIBLE_OBSERVER_NOLIGHTING 15 - -#define INVISIBILITY_LIGHTING 20 - -#define SEE_INVISIBLE_LIVING 25 - -#define SEE_INVISIBLE_LEVEL_ONE 35 //Used by some stuff in code. It's really poorly organized. -#define INVISIBILITY_LEVEL_ONE 35 //Used by some stuff in code. It's really poorly organized. - -#define SEE_INVISIBLE_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized. -#define INVISIBILITY_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized. - -#define INVISIBILITY_OBSERVER 60 -#define SEE_INVISIBLE_OBSERVER 60 - -#define INVISIBILITY_MAXIMUM 100 - -//Object specific defines -#define CANDLE_LUM 3 //For how bright candles are - - -//Some mob defines below -#define AI_CAMERA_LUMINOSITY 6 - -#define BORGMESON 1 -#define BORGTHERM 2 -#define BORGXRAY 4 - -//some arbitrary defines to be used by self-pruning global lists. (see master_controller) -#define PROCESS_KILL 26 //Used to trigger removal from a processing list - - -#define HOSTILE_STANCE_IDLE 1 -#define HOSTILE_STANCE_ALERT 2 -#define HOSTILE_STANCE_ATTACK 3 -#define HOSTILE_STANCE_ATTACKING 4 -#define HOSTILE_STANCE_TIRED 5 - -#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued. - -//Damage things - -#define CUT "cut" -#define BRUISE "bruise" -#define BRUTE "brute" -#define BURN "fire" -#define TOX "tox" -#define OXY "oxy" -#define CLONE "clone" -#define HALLOSS "halloss" - -#define STUN "stun" -#define WEAKEN "weaken" -#define PARALYZE "paralize" -#define IRRADIATE "irradiate" -#define STUTTER "stutter" -#define SLUR "slur" -#define EYE_BLUR "eye_blur" -#define DROWSY "drowsy" - -///////////////////ORGAN DEFINES/////////////////// - -#define ORGAN_CUT_AWAY 1 -#define ORGAN_GAUZED 2 -#define ORGAN_ATTACHABLE 4 -#define ORGAN_BLEEDING 8 -#define ORGAN_BROKEN 32 -#define ORGAN_DESTROYED 64 -#define ORGAN_ROBOT 128 -#define ORGAN_SPLINTED 256 -#define SALVED 512 -#define ORGAN_DEAD 1024 -#define ORGAN_MUTATED 2048 - -#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued. - - - -//Please don't edit these values without speaking to Errorage first ~Carn -//Admin Permissions -#define R_BUILDMODE 1 -#define R_ADMIN 2 -#define R_BAN 4 -#define R_FUN 8 -#define R_SERVER 16 -#define R_DEBUG 32 -#define R_POSSESS 64 -#define R_PERMISSIONS 128 -#define R_STEALTH 256 -#define R_REJUVINATE 512 -#define R_VAREDIT 1024 -#define R_SOUNDS 2048 -#define R_SPAWN 4096 -#define R_MOD 8192 -#define R_MENTOR 16384 - -#define R_MAXPERMISSION 16384 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. - -#define R_HOST 65535 - -//Preference toggles -#define SOUND_ADMINHELP 1 -#define SOUND_MIDI 2 -#define SOUND_AMBIENCE 4 -#define SOUND_LOBBY 8 -#define CHAT_OOC 16 -#define CHAT_DEAD 32 -#define CHAT_GHOSTEARS 64 -#define CHAT_GHOSTSIGHT 128 -#define CHAT_PRAYER 256 -#define CHAT_RADIO 512 -#define CHAT_ATTACKLOGS 1024 -#define CHAT_DEBUGLOGS 2048 -#define CHAT_LOOC 4096 -#define CHAT_GHOSTRADIO 8192 - - -#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC) - -#define BE_TRAITOR 1 -#define BE_OPERATIVE 2 -#define BE_CHANGELING 4 -#define BE_WIZARD 8 -#define BE_MALF 16 -#define BE_REV 32 -#define BE_ALIEN 64 -#define BE_PAI 128 -#define BE_CULTIST 256 -#define BE_MONKEY 512 -#define BE_NINJA 1024 -#define BE_RAIDER 2048 -#define BE_PLANT 4096 -#define BE_MUTINEER 8192 - -var/list/be_special_flags = list( - "Traitor" = BE_TRAITOR, - "Operative" = BE_OPERATIVE, - "Changeling" = BE_CHANGELING, - "Wizard" = BE_WIZARD, - "Malf AI" = BE_MALF, - "Revolutionary" = BE_REV, - "Xenomorph" = BE_ALIEN, - "pAI" = BE_PAI, - "Cultist" = BE_CULTIST, - "Monkey" = BE_MONKEY, - "Ninja" = BE_NINJA, - "Raider" = BE_RAIDER, - "Diona" = BE_PLANT, - "Mutineer" = BE_MUTINEER - ) - -#define AGE_MIN 17 //youngest a character can be -#define AGE_MAX 85 //oldest a character can be - -//Languages! -#define LANGUAGE_HUMAN 1 -#define LANGUAGE_ALIEN 2 -#define LANGUAGE_DOG 4 -#define LANGUAGE_CAT 8 -#define LANGUAGE_BINARY 16 -#define LANGUAGE_OTHER 32768 - -#define LANGUAGE_UNIVERSAL 65535 - -#define LEFT 1 -#define RIGHT 2 - -// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans. -#define HEALTH_HUD 1 // a simple line rounding the mob's number health -#define STATUS_HUD 2 // alive, dead, diseased, etc. -#define ID_HUD 3 // the job asigned to your ID -#define WANTED_HUD 4 // wanted, released, parroled, security status -#define IMPLOYAL_HUD 5 // loyality implant -#define IMPCHEM_HUD 6 // chemical implant -#define IMPTRACK_HUD 7 // tracking implant -#define SPECIALROLE_HUD 8 // AntagHUD image -#define STATUS_HUD_OOC 9 // STATUS_HUD without virus db check for someone being ill. - -//Pulse levels, very simplified -#define PULSE_NONE 0 //so !M.pulse checks would be possible -#define PULSE_SLOW 1 //<60 bpm -#define PULSE_NORM 2 //60-90 bpm -#define PULSE_FAST 3 //90-120 bpm -#define PULSE_2FAST 4 //>120 bpm -#define PULSE_THREADY 5 //occurs during hypovolemic shock -//feel free to add shit to lists below -var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate -var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate -var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") //this stops the heart -var/list/cheartstopper = list("potassium_chloride") //this stops the heart when overdose is met -- c = conditional - -//proc/get_pulse methods -#define GETPULSE_HAND 0 //less accurate (hand) -#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc) - -var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them. - "thunder", - "ERT", - "NUKE" - ) - -//Species flags. -#define NO_BLOOD 1 -#define NO_BREATHE 2 -#define NO_SCAN 4 -#define NO_PAIN 8 - -#define HAS_SKIN_TONE 16 -#define HAS_SKIN_COLOR 32 -#define HAS_LIPS 64 -#define HAS_UNDERWEAR 128 -#define HAS_TAIL 256 - -#define IS_SLOW 512 -#define IS_PLANT 1024 -#define IS_WHITELISTED 2048 - -#define RAD_ABSORB 4096 -#define REQUIRE_LIGHT 8192 - -#define IS_SYNTHETIC 16384 - -//Language flags. -#define WHITELISTED 1 // Language is available if the speaker is whitelisted. -#define RESTRICTED 2 // Language can only be accquired by spawning or an admin. -#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight -#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. - -//Flags for zone sleeping -#define ZONE_ACTIVE 1 -#define ZONE_SLEEPING 0 - -//some colors -#define COLOR_RED "#FF0000" -#define COLOR_GREEN "#00FF00" -#define COLOR_BLUE "#0000FF" -#define COLOR_CYAN "#00FFFF" -#define COLOR_PINK "#FF00FF" -#define COLOR_YELLOW "#FFFF00" -#define COLOR_ORANGE "#FF9900" -#define COLOR_WHITE "#FFFFFF" - - - -/* - Germs and infections -*/ - -#define GERM_LEVEL_AMBIENT 110 //maximum germ level you can reach by standing still -#define GERM_LEVEL_MOVE_CAP 200 //maximum germ level you can reach by running around - -#define INFECTION_LEVEL_ONE 100 -#define INFECTION_LEVEL_TWO 500 -#define INFECTION_LEVEL_THREE 1000 - - -/* - Shuttles -*/ - -// these define the time taken for the shuttle to get to SS13 -// and the time before it leaves again -#define SHUTTLE_PREPTIME 300 // 5 minutes = 300 seconds - after this time, the shuttle departs centcom and cannot be recalled -#define SHUTTLE_LEAVETIME 180 // 3 minutes = 180 seconds - the duration for which the shuttle will wait at the station after arriving -#define SHUTTLE_TRANSIT_DURATION 300 // 5 minutes = 300 seconds - how long it takes for the shuttle to get to the station -#define SHUTTLE_TRANSIT_DURATION_RETURN 120 // 2 minutes = 120 seconds - for some reason it takes less time to come back, go figure. - -//Shuttle moving status -#define SHUTTLE_IDLE 0 -#define SHUTTLE_WARMUP 1 -#define SHUTTLE_INTRANSIT 2 - -//Ferry shuttle processing status -#define IDLE_STATE 0 -#define WAIT_LAUNCH 1 -#define WAIT_ARRIVE 2 -#define WAIT_FINISH 3 - -//computer3 error codes, move lower in the file when it passes dev -Sayu - #define PROG_CRASH 1 // Generic crash - #define MISSING_PERIPHERAL 2 // Missing hardware - #define BUSTED_ASS_COMPUTER 4 // Self-perpetuating error. BAC will continue to crash forever. - #define MISSING_PROGRAM 8 // Some files try to automatically launch a program. This is that failing. - #define FILE_DRM 16 // Some files want to not be copied/moved. This is them complaining that you tried. - #define NETWORK_FAILURE 32 - -//Some on_mob_life() procs check for alien races. -#define IS_DIONA 1 -#define IS_VOX 2 -#define IS_SKRELL 3 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + +#define DEBUG + +#define PI 3.1415 + +#define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol) +#define ONE_ATMOSPHERE 101.325 //kPa + +#define CELL_VOLUME 2500 //liters in a cell +#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC + +#define O2STANDARD 0.21 +#define N2STANDARD 0.79 + +#define MOLES_O2STANDARD MOLES_CELLSTANDARD*O2STANDARD // O2 standard value (21%) +#define MOLES_N2STANDARD MOLES_CELLSTANDARD*N2STANDARD // N2 standard value (79%) + +#define MOLES_PHORON_VISIBLE 0.7 //Moles in a standard cell after which phoron is visible +#define MIN_TOXIN_DAMAGE 1 //This and MAX_TOXIN_DAMAGE are for when a mob breathes poisonous air +#define MAX_TOXIN_DAMAGE 10 //This and MIN_TOXIN_DAMAGE are for when a mob breathes poisonous air + +#define BREATH_VOLUME 0.5 //liters in a normal breath +#define BREATH_MOLES (ONE_ATMOSPHERE * BREATH_VOLUME /(T20C*R_IDEAL_GAS_EQUATION)) +#define BREATH_PERCENTAGE BREATH_VOLUME/CELL_VOLUME + //Amount of air to take a from a tile +#define HUMAN_NEEDED_OXYGEN MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16 + //Amount of air needed before pass out/suffocation commences + +// Pressure limits. +#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant) +#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE) +#define WARNING_LOW_PRESSURE 50 //This is when the gray low pressure icon is displayed. (it is 2.5 * HAZARD_LOW_PRESSURE) +#define HAZARD_LOW_PRESSURE 20 //This is when the black ultra-low pressure icon is displayed. (This one is set as a constant) + +#define TEMPERATURE_DAMAGE_COEFFICIENT 1.5 //This is used in handle_temperature_damage() for humans, and in reagents that affect body temperature. Temperature damage is multiplied by this amount. +#define BODYTEMP_AUTORECOVERY_DIVISOR 12 //This is the divisor which handles how much of the temperature difference between the current body temperature and 310.15K (optimal temperature) humans auto-regenerate each tick. The higher the number, the slower the recovery. This is applied each tick, so long as the mob is alive. +#define BODYTEMP_AUTORECOVERY_MINIMUM 1 //Minimum amount of kelvin moved toward 310.15K per tick. So long as abs(310.15 - bodytemp) is more than 50. +#define BODYTEMP_COLD_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is lower than their body temperature. Make it lower to lose bodytemp faster. +#define BODYTEMP_HEAT_DIVISOR 6 //Similar to the BODYTEMP_AUTORECOVERY_DIVISOR, but this is the divisor which is applied at the stage that follows autorecovery. This is the divisor which comes into play when the human's loc temperature is higher than their body temperature. Make it lower to gain bodytemp faster. +#define BODYTEMP_COOLING_MAX -30 //The maximum number of degrees that your body can cool in 1 tick, when in a cold area. +#define BODYTEMP_HEATING_MAX 30 //The maximum number of degrees that your body can heat up in 1 tick, when in a hot area. + +#define BODYTEMP_HEAT_DAMAGE_LIMIT 360.15 // The limit the human body can take before it starts taking damage from heat. +#define BODYTEMP_COLD_DAMAGE_LIMIT 260.15 // The limit the human body can take before it starts taking damage from coldness. + +#define SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-helmet quality headwear. MUST NOT BE 0. +#define SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //what min_cold_protection_temperature is set to for space-suit quality jumpsuits or suits. MUST NOT BE 0. +#define SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE 5000 //These need better heat protect, but not as good heat protect as firesuits. +#define FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE 30000 //what max_heat_protection_temperature is set to for firesuit quality headwear. MUST NOT BE 0. +#define FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE 30000 //for fire helmet quality items (red and white hardhats) +#define HELMET_MIN_COLD_PROTECTION_TEMPERATURE 160 //For normal helmets +#define HELMET_MAX_HEAT_PROTECTION_TEMPERATURE 600 //For normal helmets +#define ARMOR_MIN_COLD_PROTECTION_TEMPERATURE 160 //For armor +#define ARMOR_MAX_HEAT_PROTECTION_TEMPERATURE 600 //For armor + +#define GLOVES_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For some gloves (black and) +#define GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For some gloves +#define SHOE_MIN_COLD_PROTECTION_TEMPERATURE 2.0 //For gloves +#define SHOE_MAX_HEAT_PROTECTION_TEMPERATURE 1500 //For gloves + + +#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE +#define MAX_HIGH_PRESSURE_DAMAGE 4 //This used to be 20... I got this much random rage for some retarded decision by polymorph?! Polymorph now lies in a pool of blood with a katana jammed in his spleen. ~Errorage --PS: The katana did less than 20 damage to him :( +#define LOW_PRESSURE_DAMAGE 2 //The amounb of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). + +#define PRESSURE_SUIT_REDUCTION_COEFFICIENT 0.8 //This is how much (percentual) a suit with the flag STOPSPRESSUREDMAGE reduces pressure. +#define PRESSURE_HEAD_REDUCTION_COEFFICIENT 0.4 //This is how much (percentual) a helmet/hat with the flag STOPSPRESSUREDMAGE reduces pressure. + +// Doors! +#define DOOR_CRUSH_DAMAGE 10 + +// Factor of how fast mob nutrition decreases +#define HUNGER_FACTOR 0.05 + +// How many units of reagent are consumed per tick, by default. +#define REAGENTS_METABOLISM 0.2 + +// By defining the effect multiplier this way, it'll exactly adjust +// all effects according to how they originally were with the 0.4 metabolism +#define REAGENTS_EFFECT_MULTIPLIER REAGENTS_METABOLISM / 0.4 + + +#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 + //Minimum ratio of air that must move to/from a tile to suspend group processing +#define MINIMUM_AIR_TO_SUSPEND MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND + //Minimum amount of air that has to move before a group processing can be suspended + +#define MINIMUM_MOLES_DELTA_TO_MOVE MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND //Either this must be active +#define MINIMUM_TEMPERATURE_TO_MOVE T20C+100 //or this (or both, obviously) + +#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012 +#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 + //Minimum temperature difference before group processing is suspended +#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 + //Minimum temperature difference before the gas temperatures are just set to be equal + +#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10 +#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200 + +#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4 +#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0 +#define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0 +#define SPACE_HEAT_TRANSFER_COEFFICIENT 0.2 //a hack to partly simulate radiative heat +#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4 +#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now + //Must be between 0 and 1. Values closer to 1 equalize temperature faster + //Should not exceed 0.4 else strange heat flow occur + +/* +#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C +#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C +#define FIRE_SPREAD_RADIOSITY_SCALE 0.85 +#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile +#define FIRE_PHORON_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt phoron into the tile +#define FIRE_GROWTH_RATE 40000 //For small fires + +#define WATER_BOIL_TEMP 393 */ + +// Fire Damage +#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C +#define CARBON_LIFEFORM_FIRE_DAMAGE 4 + +//Phoron fire properties +#define PHORON_MINIMUM_BURN_TEMPERATURE 100+T0C +#define PHORON_FLASHPOINT 246+T0C +#define PHORON_UPPER_TEMPERATURE 1370+T0C +#define PHORON_MINIMUM_OXYGEN_NEEDED 2 +#define PHORON_MINIMUM_OXYGEN_PHORON_RATIO 20 +#define PHORON_OXYGEN_FULLBURN 10 + +#define T0C 273.15 // 0degC +#define T20C 293.15 // 20degC +#define TCMB 2.7 // -270.3degC + +//Used to be used by FEA +//var/turf/space/Space_Tile = locate(/turf/space) // A space tile to reference when atmos wants to remove excess heat. + +#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) // Tank starts leaking +#define TANK_RUPTURE_PRESSURE (40.*ONE_ATMOSPHERE) // Tank spills all contents into atmosphere + +#define TANK_FRAGMENT_PRESSURE (50.*ONE_ATMOSPHERE) // Boom 3x3 base explosion +#define TANK_FRAGMENT_SCALE (10.*ONE_ATMOSPHERE) // +1 for each SCALE kPa aboe threshold + // was 2 atm + +//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage +var/MAX_EXPLOSION_RANGE = 14 +//#define MAX_EXPLOSION_RANGE 14 // Defaults to 12 (was 8) -- TLE + +#define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone. + +#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien. + +#define NORMPIPERATE 30 //pipe-insulation rate divisor +#define HEATPIPERATE 8 //heat-exch pipe insulation + +#define FLOWFRAC 0.99 // fraction of gas transfered per process + +#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up + + +//ITEM INVENTORY SLOT BITMASKS +#define SLOT_OCLOTHING 1 +#define SLOT_ICLOTHING 2 +#define SLOT_GLOVES 4 +#define SLOT_EYES 8 +#define SLOT_EARS 16 +#define SLOT_MASK 32 +#define SLOT_HEAD 64 +#define SLOT_FEET 128 +#define SLOT_ID 256 +#define SLOT_BELT 512 +#define SLOT_BACK 1024 +#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets. +#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets. +#define SLOT_TWOEARS 8192 +#define SLOT_LEGS = 16384 + +//FLAGS BITMASK +#define STOPSPRESSUREDMAGE 1 //This flag is used on the flags variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere + //To successfully stop you taking all pressure damage you must have both a suit and head item with this flag. +#define TABLEPASS 2 // can pass by a table or rack + +#define MASKINTERNALS 8 // mask allows internals +//#define SUITSPACE 8 // suit protects against space + +#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) +#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. +#define NOSHIELD 32 // weapon not affected by shield +#define CONDUCT 64 // conducts electricity (metal etc.) +#define FPRINT 256 // takes a fingerprint +#define ON_BORDER 512 // item has priority to check when entering or leaving +#define NOBLUDGEON 4 // when an item has this it produces no "X has been hit by Y with Z" message with the default handler +#define NOBLOODY 2048 // used to items if they don't want to get a blood overlay + +#define GLASSESCOVERSEYES 1024 +#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags +#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes +#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head +#define HEADCOVERSMOUTH 2048 + +#define THICKMATERIAL 1024 //From /tg: prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with NOSLIP for shoes) +#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc + +#define OPENCONTAINER 4096 // is an open container for chemistry purposes + +#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with ONESIZEFITSALL) +#define ONESIZEFITSALL 8192 +#define PHORONGUARD 16384 //Does not get contaminated by phoron. + +#define NOREACT 16384 //Reagents dont' react inside this container. + +#define BLOCKHEADHAIR 4 // temporarily removes the user's hair overlay. Leaves facial hair. +#define BLOCKHAIR 32768 // temporarily removes the user's hair, facial and otherwise. + +//flags for pass_flags +#define PASSTABLE 1 +#define PASSGLASS 2 +#define PASSGRILLE 4 +#define PASSBLOB 8 + +//turf-only flags +#define NOJAUNT 1 + + +//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. +#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDETAIL 16 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEMASK 1 //APPLIES ONLY TO HELMETS/MASKS!! +#define HIDEEARS 2 //APPLIES ONLY TO HELMETS/MASKS!! (ears means headsets and such) +#define HIDEEYES 4 //APPLIES ONLY TO HELMETS/MASKS!! (eyes means glasses) +#define HIDEFACE 8 //APPLIES ONLY TO HELMETS/MASKS!! Dictates whether we appear as unknown. + +//slots +#define slot_back 1 +#define slot_wear_mask 2 +#define slot_handcuffed 3 +#define slot_l_hand 4 +#define slot_r_hand 5 +#define slot_belt 6 +#define slot_wear_id 7 +#define slot_l_ear 8 +#define slot_glasses 9 +#define slot_gloves 10 +#define slot_head 11 +#define slot_shoes 12 +#define slot_wear_suit 13 +#define slot_w_uniform 14 +#define slot_l_store 15 +#define slot_r_store 16 +#define slot_s_store 17 +#define slot_in_backpack 18 +#define slot_legcuffed 19 +#define slot_r_ear 20 +#define slot_legs 21 + +//Cant seem to find a mob bitflags area other than the powers one + +// bitflags for clothing parts +#define HEAD 1 +#define UPPER_TORSO 2 +#define LOWER_TORSO 4 +#define LEG_LEFT 8 +#define LEG_RIGHT 16 +#define LEGS 24 +#define FOOT_LEFT 32 +#define FOOT_RIGHT 64 +#define FEET 96 +#define ARM_LEFT 128 +#define ARM_RIGHT 256 +#define ARMS 384 +#define HAND_LEFT 512 +#define HAND_RIGHT 1024 +#define HANDS 1536 +#define FULL_BODY 2047 + +// bitflags for the percentual amount of protection a piece of clothing which covers the body part offers. +// Used with human/proc/get_heat_protection() and human/proc/get_cold_protection() +// The values here should add up to 1. +// Hands and feet have 2.5%, arms and legs 7.5%, each of the torso parts has 15% and the head has 30% +#define THERMAL_PROTECTION_HEAD 0.3 +#define THERMAL_PROTECTION_UPPER_TORSO 0.15 +#define THERMAL_PROTECTION_LOWER_TORSO 0.15 +#define THERMAL_PROTECTION_LEG_LEFT 0.075 +#define THERMAL_PROTECTION_LEG_RIGHT 0.075 +#define THERMAL_PROTECTION_FOOT_LEFT 0.025 +#define THERMAL_PROTECTION_FOOT_RIGHT 0.025 +#define THERMAL_PROTECTION_ARM_LEFT 0.075 +#define THERMAL_PROTECTION_ARM_RIGHT 0.075 +#define THERMAL_PROTECTION_HAND_LEFT 0.025 +#define THERMAL_PROTECTION_HAND_RIGHT 0.025 + + +//bitflags for mutations + // Extra powers: +#define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM (1<<11) // supersonic screaming (25%) +#define EXPLOSIVE (1<<12) // exploding on-demand (15%) +#define REGENERATION (1<<13) // superhuman regeneration (30%) +#define REPROCESSOR (1<<14) // eat anything (50%) +#define SHAPESHIFTING (1<<15) // take on the appearance of anything (40%) +#define PHASING (1<<16) // ability to phase through walls (40%) +#define SHIELD (1<<17) // shielding from all projectile attacks (30%) +#define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) + + +// String identifiers for associative list lookup + +// mob/var/list/mutations + +#define STRUCDNASIZE 27 +#define UNIDNASIZE 13 + + // Generic mutations: +#define TK 1 +#define COLD_RESISTANCE 2 +#define XRAY 3 +#define HULK 4 +#define CLUMSY 5 +#define FAT 6 +#define HUSK 7 +#define NOCLONE 8 + + + // Extra powers: +#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes +#define HEAL 10 // healing people with hands +#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM 12 // supersonic screaming (25%) +#define EXPLOSIVE 13 // exploding on-demand (15%) +#define REGENERATION 14 // superhuman regeneration (30%) +#define REPROCESSOR 15 // eat anything (50%) +#define SHAPESHIFTING 16 // take on the appearance of anything (40%) +#define PHASING 17 // ability to phase through walls (40%) +#define SHIELD 18 // shielding from all projectile attacks (30%) +#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY 20 // ability to shoot electric attacks (15%) + + //2spooky +#define SKELETON 29 +#define PLANT 30 + +// Other Mutations: +#define mNobreath 100 // no need to breathe +#define mRemote 101 // remote viewing +#define mRegen 102 // health regen +#define mRun 103 // no slowdown +#define mRemotetalk 104 // remote talking +#define mMorph 105 // changing appearance +#define mBlend 106 // nothing (seriously nothing) +#define mHallucination 107 // hallucinations +#define mFingerprints 108 // no fingerprints +#define mShock 109 // insulated hands +#define mSmallsize 110 // table climbing + +//disabilities +#define NEARSIGHTED 1 +#define EPILEPSY 2 +#define COUGHING 4 +#define TOURETTES 8 +#define NERVOUS 16 + +//sdisabilities +#define BLIND 1 +#define MUTE 2 +#define DEAF 4 + +//mob/var/stat things +#define CONSCIOUS 0 +#define UNCONSCIOUS 1 +#define DEAD 2 + +// channel numbers for power +#define EQUIP 1 +#define LIGHT 2 +#define ENVIRON 3 +#define TOTAL 4 //for total power used only + +// bitflags for machine stat variable +#define BROKEN 1 +#define NOPOWER 2 +#define POWEROFF 4 // tbd +#define MAINT 8 // under maintaince +#define EMPED 16 // temporary broken by EMP pulse + +//bitflags for door switches. +#define OPEN 1 +#define IDSCAN 2 +#define BOLTS 4 +#define SHOCK 8 +#define SAFE 16 + +#define ENGINE_EJECT_Z 3 + +//metal, glass, rod stacks +#define MAX_STACK_AMOUNT_METAL 50 +#define MAX_STACK_AMOUNT_GLASS 50 +#define MAX_STACK_AMOUNT_RODS 60 + +#define GAS_O2 (1 << 0) +#define GAS_N2 (1 << 1) +#define GAS_PL (1 << 2) +#define GAS_CO2 (1 << 3) +#define GAS_N2O (1 << 4) + + +var/list/accessable_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60) +//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there. +//(Exceptions: extended, sandbox and nuke) -Errorage +//Was list("3" = 30, "4" = 70). +//Spacing should be a reliable method of getting rid of a body -- Urist. +//Go away Urist, I'm restoring this to the longer list. ~Errorage + +#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE)))) + + +var/list/global_mutations = list() // list of hidden mutation things + +//Bluh shields + + +//Damage things //TODO: merge these down to reduce on defines +//Way to waste perfectly good damagetype names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc... +#define BRUTE "brute" +#define BURN "fire" +#define TOX "tox" +#define OXY "oxy" +#define CLONE "clone" +#define HALLOSS "halloss" + +#define STUN "stun" +#define WEAKEN "weaken" +#define PARALYZE "paralize" +#define IRRADIATE "irradiate" +#define AGONY "agony" // Added in PAIN! +#define STUTTER "stutter" +#define EYE_BLUR "eye_blur" +#define DROWSY "drowsy" + +//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches +#define BRUTELOSS 1 +#define FIRELOSS 2 +#define TOXLOSS 4 +#define OXYLOSS 8 + +//Bitflags defining which status effects could be or are inflicted on a mob +#define CANSTUN 1 +#define CANWEAKEN 2 +#define CANPARALYSE 4 +#define CANPUSH 8 +#define LEAPING 16 +#define PASSEMOTES 32 //Mob has a cortical borer or holders inside of it that need to see emotes. +#define GODMODE 4096 +#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath +#define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system +#define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy. + +var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg') + +//Grab levels +#define GRAB_PASSIVE 1 +#define GRAB_AGGRESSIVE 2 +#define GRAB_NECK 3 +#define GRAB_UPGRADING 4 +#define GRAB_KILL 5 + +//Security levels +#define SEC_LEVEL_GREEN 0 +#define SEC_LEVEL_BLUE 1 +#define SEC_LEVEL_RED 2 +#define SEC_LEVEL_DELTA 3 + +#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level + +var/list/liftable_structures = list(\ + + /obj/machinery/autolathe, \ + /obj/machinery/constructable_frame, \ + /obj/machinery/hydroponics, \ + /obj/machinery/computer, \ + /obj/machinery/optable, \ + /obj/structure/dispenser, \ + /obj/machinery/gibber, \ + /obj/machinery/microwave, \ + /obj/machinery/vending, \ + /obj/machinery/seed_extractor, \ + /obj/machinery/space_heater, \ + /obj/machinery/recharge_station, \ + /obj/machinery/flasher, \ + /obj/structure/stool, \ + /obj/structure/closet, \ + /obj/machinery/photocopier, \ + /obj/structure/filingcabinet, \ + /obj/structure/reagent_dispensers, \ + /obj/machinery/portable_atmospherics/canister) + +//A set of constants used to determine which type of mute an admin wishes to apply: +//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1) +//Therefore there needs to be a gap between the flags for the automute flags +#define MUTE_IC 1 +#define MUTE_OOC 2 +#define MUTE_PRAY 4 +#define MUTE_ADMINHELP 8 +#define MUTE_DEADCHAT 16 +#define MUTE_ALL 31 + +//Number of identical messages required to get the spam-prevention automute thing to trigger warnings and automutes +#define SPAM_TRIGGER_WARNING 5 +#define SPAM_TRIGGER_AUTOMUTE 10 + +//Some constants for DB_Ban +#define BANTYPE_PERMA 1 +#define BANTYPE_TEMP 2 +#define BANTYPE_JOB_PERMA 3 +#define BANTYPE_JOB_TEMP 4 +#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban. + +#define SEE_INVISIBLE_MINIMUM 5 + +#define SEE_INVISIBLE_OBSERVER_NOLIGHTING 15 + +#define INVISIBILITY_LIGHTING 20 + +#define SEE_INVISIBLE_LIVING 25 + +#define SEE_INVISIBLE_LEVEL_ONE 35 //Used by some stuff in code. It's really poorly organized. +#define INVISIBILITY_LEVEL_ONE 35 //Used by some stuff in code. It's really poorly organized. + +#define SEE_INVISIBLE_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized. +#define INVISIBILITY_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized. + +#define INVISIBILITY_OBSERVER 60 +#define SEE_INVISIBLE_OBSERVER 60 + +#define INVISIBILITY_MAXIMUM 100 + +//Object specific defines +#define CANDLE_LUM 3 //For how bright candles are + + +//Some mob defines below +#define AI_CAMERA_LUMINOSITY 6 + +#define BORGMESON 1 +#define BORGTHERM 2 +#define BORGXRAY 4 + +//some arbitrary defines to be used by self-pruning global lists. (see master_controller) +#define PROCESS_KILL 26 //Used to trigger removal from a processing list + + +#define HOSTILE_STANCE_IDLE 1 +#define HOSTILE_STANCE_ALERT 2 +#define HOSTILE_STANCE_ATTACK 3 +#define HOSTILE_STANCE_ATTACKING 4 +#define HOSTILE_STANCE_TIRED 5 + +#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued. + +//Damage things + +#define CUT "cut" +#define BRUISE "bruise" +#define BRUTE "brute" +#define BURN "fire" +#define TOX "tox" +#define OXY "oxy" +#define CLONE "clone" +#define HALLOSS "halloss" + +#define STUN "stun" +#define WEAKEN "weaken" +#define PARALYZE "paralize" +#define IRRADIATE "irradiate" +#define STUTTER "stutter" +#define SLUR "slur" +#define EYE_BLUR "eye_blur" +#define DROWSY "drowsy" + +///////////////////ORGAN DEFINES/////////////////// + +#define ORGAN_CUT_AWAY 1 +#define ORGAN_GAUZED 2 +#define ORGAN_ATTACHABLE 4 +#define ORGAN_BLEEDING 8 +#define ORGAN_BROKEN 32 +#define ORGAN_DESTROYED 64 +#define ORGAN_ROBOT 128 +#define ORGAN_SPLINTED 256 +#define SALVED 512 +#define ORGAN_DEAD 1024 +#define ORGAN_MUTATED 2048 + +#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued. + + + +//Please don't edit these values without speaking to Errorage first ~Carn +//Admin Permissions +#define R_BUILDMODE 1 +#define R_ADMIN 2 +#define R_BAN 4 +#define R_FUN 8 +#define R_SERVER 16 +#define R_DEBUG 32 +#define R_POSSESS 64 +#define R_PERMISSIONS 128 +#define R_STEALTH 256 +#define R_REJUVINATE 512 +#define R_VAREDIT 1024 +#define R_SOUNDS 2048 +#define R_SPAWN 4096 +#define R_MOD 8192 +#define R_MENTOR 16384 + +#define R_MAXPERMISSION 16384 //This holds the maximum value for a permission. It is used in iteration, so keep it updated. + +#define R_HOST 65535 + +//Preference toggles +#define SOUND_ADMINHELP 1 +#define SOUND_MIDI 2 +#define SOUND_AMBIENCE 4 +#define SOUND_LOBBY 8 +#define CHAT_OOC 16 +#define CHAT_DEAD 32 +#define CHAT_GHOSTEARS 64 +#define CHAT_GHOSTSIGHT 128 +#define CHAT_PRAYER 256 +#define CHAT_RADIO 512 +#define CHAT_ATTACKLOGS 1024 +#define CHAT_DEBUGLOGS 2048 +#define CHAT_LOOC 4096 +#define CHAT_GHOSTRADIO 8192 + + +#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS|CHAT_LOOC) + +#define BE_TRAITOR 1 +#define BE_OPERATIVE 2 +#define BE_CHANGELING 4 +#define BE_WIZARD 8 +#define BE_MALF 16 +#define BE_REV 32 +#define BE_ALIEN 64 +#define BE_PAI 128 +#define BE_CULTIST 256 +#define BE_MONKEY 512 +#define BE_NINJA 1024 +#define BE_RAIDER 2048 +#define BE_PLANT 4096 +#define BE_MUTINEER 8192 + +var/list/be_special_flags = list( + "Traitor" = BE_TRAITOR, + "Operative" = BE_OPERATIVE, + "Changeling" = BE_CHANGELING, + "Wizard" = BE_WIZARD, + "Malf AI" = BE_MALF, + "Revolutionary" = BE_REV, + "Xenomorph" = BE_ALIEN, + "pAI" = BE_PAI, + "Cultist" = BE_CULTIST, + "Monkey" = BE_MONKEY, + "Ninja" = BE_NINJA, + "Raider" = BE_RAIDER, + "Diona" = BE_PLANT, + "Mutineer" = BE_MUTINEER + ) + +#define AGE_MIN 17 //youngest a character can be +#define AGE_MAX 85 //oldest a character can be + +//Languages! +#define LANGUAGE_HUMAN 1 +#define LANGUAGE_ALIEN 2 +#define LANGUAGE_DOG 4 +#define LANGUAGE_CAT 8 +#define LANGUAGE_BINARY 16 +#define LANGUAGE_OTHER 32768 + +#define LANGUAGE_UNIVERSAL 65535 + +#define LEFT 1 +#define RIGHT 2 + +// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans. +#define HEALTH_HUD 1 // a simple line rounding the mob's number health +#define STATUS_HUD 2 // alive, dead, diseased, etc. +#define ID_HUD 3 // the job asigned to your ID +#define WANTED_HUD 4 // wanted, released, parroled, security status +#define IMPLOYAL_HUD 5 // loyality implant +#define IMPCHEM_HUD 6 // chemical implant +#define IMPTRACK_HUD 7 // tracking implant +#define SPECIALROLE_HUD 8 // AntagHUD image +#define STATUS_HUD_OOC 9 // STATUS_HUD without virus db check for someone being ill. + +//Pulse levels, very simplified +#define PULSE_NONE 0 //so !M.pulse checks would be possible +#define PULSE_SLOW 1 //<60 bpm +#define PULSE_NORM 2 //60-90 bpm +#define PULSE_FAST 3 //90-120 bpm +#define PULSE_2FAST 4 //>120 bpm +#define PULSE_THREADY 5 //occurs during hypovolemic shock +//feel free to add shit to lists below +var/list/tachycardics = list("coffee", "inaprovaline", "hyperzine", "nitroglycerin", "thirteenloko", "nicotine") //increase heart rate +var/list/bradycardics = list("neurotoxin", "cryoxadone", "clonexadone", "space_drugs", "stoxin") //decrease heart rate +var/list/heartstopper = list("potassium_phorochloride", "zombie_powder") //this stops the heart +var/list/cheartstopper = list("potassium_chloride") //this stops the heart when overdose is met -- c = conditional + +//proc/get_pulse methods +#define GETPULSE_HAND 0 //less accurate (hand) +#define GETPULSE_TOOL 1 //more accurate (med scanner, sleeper, etc) + +var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accessed by preexisting terminals. AIs and new terminals can't use them. + "thunder", + "ERT", + "NUKE" + ) + +//Species flags. +#define NO_BLOOD 1 +#define NO_BREATHE 2 +#define NO_SCAN 4 +#define NO_PAIN 8 + +#define HAS_SKIN_TONE 16 +#define HAS_SKIN_COLOR 32 +#define HAS_LIPS 64 +#define HAS_UNDERWEAR 128 +#define HAS_TAIL 256 + +#define IS_SLOW 512 +#define IS_PLANT 1024 +#define IS_WHITELISTED 2048 + +#define RAD_ABSORB 4096 +#define REQUIRE_LIGHT 8192 + +#define IS_SYNTHETIC 16384 + +//Language flags. +#define WHITELISTED 1 // Language is available if the speaker is whitelisted. +#define RESTRICTED 2 // Language can only be accquired by spawning or an admin. +#define NONVERBAL 4 // Language has a significant non-verbal component. Speech is garbled without line-of-sight +#define SIGNLANG 8 // Language is completely non-verbal. Speech is displayed through emotes for those who can understand. + +//Flags for zone sleeping +#define ZONE_ACTIVE 1 +#define ZONE_SLEEPING 0 + +//some colors +#define COLOR_RED "#FF0000" +#define COLOR_GREEN "#00FF00" +#define COLOR_BLUE "#0000FF" +#define COLOR_CYAN "#00FFFF" +#define COLOR_PINK "#FF00FF" +#define COLOR_YELLOW "#FFFF00" +#define COLOR_ORANGE "#FF9900" +#define COLOR_WHITE "#FFFFFF" + + + +/* + Germs and infections +*/ + +#define GERM_LEVEL_AMBIENT 110 //maximum germ level you can reach by standing still +#define GERM_LEVEL_MOVE_CAP 200 //maximum germ level you can reach by running around + +#define INFECTION_LEVEL_ONE 100 +#define INFECTION_LEVEL_TWO 500 +#define INFECTION_LEVEL_THREE 1000 + + +/* + Shuttles +*/ + +// these define the time taken for the shuttle to get to SS13 +// and the time before it leaves again +#define SHUTTLE_PREPTIME 300 // 5 minutes = 300 seconds - after this time, the shuttle departs centcom and cannot be recalled +#define SHUTTLE_LEAVETIME 180 // 3 minutes = 180 seconds - the duration for which the shuttle will wait at the station after arriving +#define SHUTTLE_TRANSIT_DURATION 300 // 5 minutes = 300 seconds - how long it takes for the shuttle to get to the station +#define SHUTTLE_TRANSIT_DURATION_RETURN 120 // 2 minutes = 120 seconds - for some reason it takes less time to come back, go figure. + +//Shuttle moving status +#define SHUTTLE_IDLE 0 +#define SHUTTLE_WARMUP 1 +#define SHUTTLE_INTRANSIT 2 + +//Ferry shuttle processing status +#define IDLE_STATE 0 +#define WAIT_LAUNCH 1 +#define WAIT_ARRIVE 2 +#define WAIT_FINISH 3 + +//computer3 error codes, move lower in the file when it passes dev -Sayu + #define PROG_CRASH 1 // Generic crash + #define MISSING_PERIPHERAL 2 // Missing hardware + #define BUSTED_ASS_COMPUTER 4 // Self-perpetuating error. BAC will continue to crash forever. + #define MISSING_PROGRAM 8 // Some files try to automatically launch a program. This is that failing. + #define FILE_DRM 16 // Some files want to not be copied/moved. This is them complaining that you tried. + #define NETWORK_FAILURE 32 + +//Some on_mob_life() procs check for alien races. +#define IS_DIONA 1 +#define IS_VOX 2 +#define IS_SKRELL 3 #define IS_UNATHI 4 \ No newline at end of file diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index d808a70381..fcbe24ca1b 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -1088,7 +1088,7 @@ "auV" = (/obj/structure/table/reinforced,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{icon_state = "grimy"},/area/hydroponics/garden) "auW" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) "auX" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/crew_quarters/kitchen) -"auY" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/landmark/start{name = "Botanist"},/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics/garden) +"auY" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/effect/landmark/start{name = "Gardener"},/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics/garden) "auZ" = (/obj/machinery/light{dir = 4; icon_state = "tube1"},/turf/simulated/floor,/area/hallway/primary/central) "ava" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/cable{d2 = 8; icon_state = "0-8"},/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced,/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/hallway/primary/port) "avb" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 2; d2 = 8; icon_state = "2-8"},/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor{icon_state = "vault"; dir = 5},/area/hallway/primary/port) @@ -1127,7 +1127,7 @@ "avI" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/stool/bed/chair/comfy/brown{icon_state = "comfychair_brown"; dir = 4},/obj/machinery/power/apc{dir = 1; name = "north bump"; pixel_x = 0; pixel_y = 24},/turf/simulated/floor/carpet,/area/crew_quarters/bar) "avJ" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/wall,/area/crew_quarters/bar) "avK" = (/obj/structure/table,/obj/machinery/microwave{pixel_x = -3; pixel_y = 6},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "cafeteria"; dir = 2},/area/crew_quarters/kitchen) -"avL" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/effect/landmark/start{name = "Botanist"},/turf/simulated/floor{dir = 9; icon_state = "green"},/area/hydroponics/garden) +"avL" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/effect/landmark/start{name = "Gardener"},/turf/simulated/floor{dir = 9; icon_state = "green"},/area/hydroponics/garden) "avM" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/cable{d2 = 2; icon_state = "0-2"; pixel_y = 0},/obj/structure/cable{d2 = 2; icon_state = "0-2"; pixel_y = 0},/obj/machinery/door/firedoor/border_only{dir = 2},/turf/simulated/floor/plating,/area/hallway/primary/port) "avN" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor{icon_state = "vault"; dir = 5},/area/hallway/primary/port) "avO" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor/plating,/area/maintenance/fpmaint) @@ -2227,7 +2227,7 @@ "aQQ" = (/obj/machinery/door/morgue{dir = 2; name = "Confession Booth"},/turf/simulated/floor{icon_state = "dark"},/area/chapel/main) "aQR" = (/obj/machinery/light/small,/obj/item/device/radio/intercom{broadcasting = 1; frequency = 1480; name = "Confessional Intercom"; pixel_x = 25},/obj/structure/stool/bed/chair{dir = 1},/turf/simulated/floor{icon_state = "dark"},/area/chapel/main) "aQS" = (/obj/structure/cable{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 6},/turf/simulated/floor/plating,/area/maintenance/fsmaint2) -"aQT" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/effect/landmark/start{name = "Botanist"},/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics/garden) +"aQT" = (/obj/structure/stool{pixel_y = 8},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/effect/landmark/start{name = "Gardener"},/turf/simulated/floor{icon_state = "green"; dir = 8},/area/hydroponics/garden) "aQU" = (/obj/structure/closet/emcloset,/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/hallway/secondary/exit) "aQV" = (/obj/structure/closet/emcloset,/turf/simulated/floor{dir = 5; icon_state = "warning"},/area/hallway/secondary/exit) "aQW" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only{dir = 2},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/hallway/secondary/exit) @@ -3189,7 +3189,7 @@ "bjq" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/turf/simulated/floor,/area/hallway/primary/aft) "bjr" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/turf/simulated/floor/plating,/area/maintenance/port) "bjs" = (/obj/structure/grille,/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/port) -"bjt" = (/obj/item/device/radio/intercom{broadcasting = 0; listening = 1; name = "Station Intercom (General)"; pixel_y = 20},/turf/simulated/floor/wood,/area/crew_quarters/captain) +"bjt" = (/obj/machinery/computer/arcade,/turf/simulated/floor/wood,/area/crew_quarters/captain) "bju" = (/obj/machinery/meter,/obj/machinery/atmospherics/pipe/manifold/hidden/supply{dir = 8},/turf/simulated/floor/plating{icon_state = "warnplate"; dir = 9},/area/maintenance/asmaint2) "bjv" = (/obj/structure/disposalpipe/sortjunction/flipped{dir = 8; sortType = "Janitor Closet"; name = "Janitor Closet"},/turf/simulated/floor,/area/hallway/primary/central) "bjw" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/disposalpipe/sortjunction{dir = 8; icon_state = "pipe-j1s"; sortType = "HoP Office"; name = "HoP Office"},/turf/simulated/floor/plating,/area/maintenance/aft) @@ -5943,7 +5943,7 @@ "cko" = (/obj/machinery/atmospherics/binary/pump{dir = 4; icon_state = "intact_off"; name = "Air to Mix"; on = 0},/turf/simulated/floor,/area/atmos) "ckp" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 5},/turf/simulated/floor,/area/atmos) "ckq" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/turf/simulated/floor,/area/engine/atmos_monitoring) -"ckr" = (/obj/structure/stool/bed/chair/comfy/brown{dir = 4},/obj/effect/landmark/start{name = "Captain"},/obj/machinery/door_control{desc = "A remote control-switch for shutters."; id = "captaindoor"; name = "Door Control"; pixel_x = -15; pixel_y = 38},/turf/simulated/floor/wood,/area/crew_quarters/captain) +"ckr" = (/obj/structure/stool/bed/chair/comfy/brown{dir = 4},/obj/effect/landmark/start{name = "Captain"},/obj/machinery/door_control{desc = "A remote control-switch for the office door."; id = "captaindoor"; name = "Door Control"; normaldoorcontrol = 1; pixel_x = -15; pixel_y = 30; req_access_txt = "20"},/turf/simulated/floor/wood,/area/crew_quarters/captain) "cks" = (/obj/machinery/door/firedoor/border_only{dir = 8; name = "Firelock West"},/obj/machinery/door/airlock/research{name = "Mech Bay"; req_access_txt = "29"; req_one_access_txt = "0"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor,/area/assembly/chargebay) "ckt" = (/turf/simulated/floor{dir = 1; icon_state = "blue"},/area/medical/morgue) "cku" = (/obj/structure/stool/bed/chair/office/dark{dir = 8},/obj/effect/landmark/start{name = "Atmospheric Technician"},/turf/simulated/floor,/area/engine/atmos_monitoring)