From d389466c8a8c20cb82de49112169d8f5df7b4069 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sat, 5 Jul 2014 21:28:11 +0100 Subject: [PATCH 01/21] Fix Change UI verb --- code/modules/client/preferences_toggles.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 From 68ad7c7373e3b8ae143eb227e5e263374f949307 Mon Sep 17 00:00:00 2001 From: Walter0o Date: Sun, 6 Jul 2014 03:32:21 +0200 Subject: [PATCH 02/21] fixes another heist mode breaking bug vox can never win their inviolate_crew objective due to not having cortical stacks put in them on setup. i took this code from one_click_antag's create_vox_raider() and edited it slightly. i was thinking about merging the two procs into one but i will leave that for you to decide. --- code/game/gamemodes/heist/heist.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 From fb4d19d8ee00e4e2fa74c6b265268cf3b2a9155d Mon Sep 17 00:00:00 2001 From: ZekeSulastin Date: Sat, 5 Jul 2014 23:37:12 -0400 Subject: [PATCH 03/21] Replaces hardcoded UI length with constant --- code/game/dna/dna_modifier.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 3e19f0bfc1..37b274af96 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -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 From b376f117b8f84cce480973b99e286308a35badad Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 02:33:10 -0400 Subject: [PATCH 04/21] Makes infections cure faster --- code/modules/organs/organ_external.dm | 87 ++++++++++++++++----------- code/modules/organs/organ_internal.dm | 16 +++-- 2 files changed, 64 insertions(+), 39 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 3040b0bddc..47e5beb3a7 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -362,7 +362,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i 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 for(var/datum/wound/W in wounds) //Open wounds can become infected if (owner.germ_level > W.germ_level && W.infection_check()) @@ -372,48 +372,67 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i 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 germ_level++ + + //** Handle antibiotics and curing infections + handle_antibiotics() - 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. + //** Handle the effects of infections + handle_germ_effects() - 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++ +/datum/organ/external/proc/handle_antibiotics() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + + if (antibiotics < 5) return + + if (germ_level < INFECTION_LEVEL_TWO) + //If the infection has not reached level two then spaceacillin cures the infection instantly + germ_level = 0 + else + //If it's a serious infection then it will take a bit of time. At INFECTION_LEVEL_THREE it should take around four minutes. + germ_level -= 2 + - if(prob(round(germ_level/10))) +/datum/organ/external/proc/handle_germ_effects() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + + 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 (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 - for (var/datum/organ/internal/I in internal_organs) - if (I.germ_level < germ_level) - I.germ_level++ + if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < 10) //having 10 units in your system will prevent infections from spreading + //spread the infection + for (var/datum/organ/internal/I in internal_organs) + if (I.germ_level < germ_level) + I.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++ + 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++ - 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() diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index d5e1b19b6c..befba6904b 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -41,21 +41,27 @@ germ_level = 0 return + //** Handle antibiotics and curing infections var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - if (germ_level > 0 && antibiotics > 5) - if (prob(4*antibiotics)) germ_level-- - if (antibiotics > 30) germ_level-- + if (antibiotics > 5) + if (germ_level < INFECTION_LEVEL_ONE) + germ_level = 0 //cure instantly + else + germ_level -= 2 + //** Handle the effects of infections 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 + //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(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) )) + //spread germs + if (antibiotics < 10 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) parent.germ_level++ if (prob(5)) //about once every 20 seconds From f1f9641bb5aa1ecc45fcce6f656a6403778a06bc Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 02:34:49 -0400 Subject: [PATCH 05/21] Fixes dionaea getting infections --- code/modules/organs/organ_external.dm | 2 +- code/modules/organs/organ_internal.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 47e5beb3a7..2b22ed815c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -357,7 +357,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i */ /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 diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index befba6904b..fa250e16d6 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -37,7 +37,7 @@ 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 From 9e56140dd447e2e7b9e25fe8a5e1b90fe73066e7 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sun, 6 Jul 2014 10:57:40 +0200 Subject: [PATCH 06/21] Fixes #5512 - Renames the Botanist spawn point to Gardener --- maps/tgstation2.dmm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index d808a70381..c19552c918 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) From 267fe5543048e5e2573b46dbade3074a88f3ad98 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 11:04:12 -0400 Subject: [PATCH 07/21] Adjusts the curing of infections --- code/modules/organs/organ.dm | 19 ++++++++++++ code/modules/organs/organ_external.dm | 18 ++--------- code/modules/organs/organ_internal.dm | 43 +++++++++++++-------------- 3 files changed, 42 insertions(+), 38 deletions(-) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index b5761df24c..9d62b0cf2c 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -17,6 +17,25 @@ /datum/organ/proc/get_icon() return icon('icons/mob/human.dmi',"blank") +//Germs +/datum/organ/proc/get_cure_threshold() + //before reaching level three, the amount of spaceacillin required to cure infections scales between 5 and 30 units + var/germ_scale = max((germ_level - INFECTION_LEVEL_ONE)/(INFECTION_LEVEL_THREE - INFECTION_LEVEL_ONE), 0) + return min(5 + germ_scale*25, 30) + +/datum/organ/proc/handle_antibiotics() + var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + + if (antibiotics <= get_cure_threshold()) + 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 2b22ed815c..55700396d3 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -379,21 +379,9 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i //** Handle the effects of infections handle_germ_effects() -/datum/organ/external/proc/handle_antibiotics() - var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") - - if (antibiotics < 5) return - - if (germ_level < INFECTION_LEVEL_TWO) - //If the infection has not reached level two then spaceacillin cures the infection instantly - germ_level = 0 - else - //If it's a serious infection then it will take a bit of time. At INFECTION_LEVEL_THREE it should take around four minutes. - germ_level -= 2 - - /datum/organ/external/proc/handle_germ_effects() var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") + var/cure_threshold = get_cure_threshold() if(germ_level >= INFECTION_LEVEL_ONE) //having an infection raises your body temperature @@ -403,13 +391,13 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i owner.bodytemperature++ if(prob(round(germ_level/10))) - if (antibiotics < 5) + if (antibiotics < cure_threshold) germ_level++ if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections owner.adjustToxLoss(1) - if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < 10) //having 10 units in your system will prevent infections from spreading + if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < cure_threshold - 5) //should start at around 8 units of spaceacillin //spread the infection for (var/datum/organ/internal/I in internal_organs) if (I.germ_level < germ_level) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index fa250e16d6..e43e219943 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -41,31 +41,28 @@ germ_level = 0 return - //** Handle antibiotics and curing infections - 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 (antibiotics > 5) - if (germ_level < INFECTION_LEVEL_ONE) - germ_level = 0 //cure instantly - else - germ_level -= 2 - - //** Handle the effects of infections - 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(prob(1)) - take_damage(1,silent=0) - - if (germ_level >= INFECTION_LEVEL_TWO) - var/datum/organ/external/parent = owner.get_organ(parent_organ) - //spread germs - if (antibiotics < 10 && 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) + //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(prob(1)) + take_damage(1,silent=0) + + if (germ_level >= INFECTION_LEVEL_TWO) + var/datum/organ/external/parent = owner.get_organ(parent_organ) + //spread germs + if (antibiotics < get_cure_threshold() - 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) + parent.germ_level++ + + if (prob(5)) //about once every 20 seconds + take_damage(1,silent=prob(30)) /datum/organ/internal/proc/take_damage(amount, var/silent=0) From 5948ed591ef7c00fa5ff0ec507b74492e4cde88c Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 11:19:19 -0400 Subject: [PATCH 08/21] Reduces amount of toxin damage dealt by infections Reduces the toxin damage dealt by non-necrotic infections by a factor of 1.5. Also increases the germ_level required to reach necrosis. --- code/modules/organs/organ_external.dm | 2 +- code/modules/organs/organ_internal.dm | 4 +- code/setup.dm | 1626 ++++++++++++------------- 3 files changed, 816 insertions(+), 816 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 55700396d3..14db38e74b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -394,7 +394,7 @@ player's body, though, antitox and spaceacillin are easy enough to get I doubt i if (antibiotics < cure_threshold) germ_level++ - if (prob(5)) //adjust this to tweak how fast people take toxin damage from infections + if (prob(3)) //adjust this to tweak how fast people take toxin damage from infections owner.adjustToxLoss(1) if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < cure_threshold - 5) //should start at around 8 units of spaceacillin diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index e43e219943..0dddd6f5f1 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -53,7 +53,7 @@ if(antibiotics < 5 && prob(round(germ_level/6))) germ_level++ if(prob(1)) - take_damage(1,silent=0) + take_damage(1,silent=prob(60)) if (germ_level >= INFECTION_LEVEL_TWO) var/datum/organ/external/parent = owner.get_organ(parent_organ) @@ -61,7 +61,7 @@ if (antibiotics < get_cure_threshold() - 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) parent.germ_level++ - if (prob(5)) //about once every 20 seconds + if (prob(3)) //about once every 30 seconds take_damage(1,silent=prob(30)) diff --git a/code/setup.dm b/code/setup.dm index be0ecd1bfb..7e55158a21 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 1500 + + +/* + 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 From c6e1dc461a161d88d16ebaeea850f7acca039d00 Mon Sep 17 00:00:00 2001 From: ZekeSulastin Date: Sun, 6 Jul 2014 13:02:57 -0400 Subject: [PATCH 09/21] Makes DNA modifier look at dna.real_name instead of name --- code/game/dna/dna_modifier.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 37b274af96..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) @@ -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 From aeb587f90be4cf2c8315739023293348c8a4af9a Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 13:02:58 -0400 Subject: [PATCH 10/21] Allows necrosis to be fixed with peridaxon and surgery --- code/modules/surgery/headreattach.dm | 15 ++-- code/modules/surgery/other.dm | 118 +++++++++++++++++++++++++++ code/modules/surgery/surgery.dm | 3 +- 3 files changed, 126 insertions(+), 10 deletions(-) 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 From 30dc2519e90a6bf08c6da7264bfba8547cb62646 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 13:22:52 -0400 Subject: [PATCH 11/21] Makes bleeding logic a little clearer --- code/modules/organs/organ_external.dm | 3 +-- code/modules/organs/wound.dm | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 14db38e74b..446a5adeaa 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -352,8 +352,7 @@ 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() diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index e2763d4697..3f4073d3f1 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -183,10 +183,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 From cb0437eccab127e4b64d8fb1ffe10cc82e640530 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 15:37:05 -0400 Subject: [PATCH 12/21] Fixes reagent_containers not being usable for surgery --- code/modules/reagents/reagent_containers.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. From f3951c702c3d7154cf31e6616488e543561ba908 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 15:40:24 -0400 Subject: [PATCH 13/21] Spaceacillin now prevents wounds from transferring germs --- code/modules/organs/organ_external.dm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 446a5adeaa..e9044b8a01 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -362,15 +362,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs //** Syncing germ levels with external wounds - 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 - germ_level++ + handle_germ_sync() //** Handle antibiotics and curing infections handle_antibiotics() @@ -378,6 +370,17 @@ Note that amputating the affected organ does in fact remove the infection from t //** 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++ + + //Infected wounds raise the organ's germ level + if (W.germ_level > germ_level && antibiotics < 5) //Badly infected wounds raise internal germ levels + germ_level++ + /datum/organ/external/proc/handle_germ_effects() var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") var/cure_threshold = get_cure_threshold() From cdd27aec4a90c770d8d7067c4f7d8910f82fc92d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 15:44:59 -0400 Subject: [PATCH 14/21] Infected wounds show up more readily on the health scanner --- code/modules/organs/organ_external.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index e9044b8a01..5d5c66b602 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -735,7 +735,7 @@ Note that amputating the affected organ does in fact remove the infection from t /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 From 6f2fff4a5e5241712bed635ea8c178bfde56e83b Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 15:45:44 -0400 Subject: [PATCH 15/21] Increases the time it takes for germ_level to rise to ambient --- code/modules/mob/living/carbon/carbon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 88f3618e9fd3ba77f2b9078412a3c12df7e66a16 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 6 Jul 2014 15:53:41 -0400 Subject: [PATCH 16/21] Required spaceacillin levels no longer scale The amount of spaceacillin required to stop infections is now a flat 5 units, instead of scaling with germ_level. --- code/modules/organs/organ.dm | 5 +++-- code/modules/organs/organ_external.dm | 2 +- code/modules/organs/organ_internal.dm | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 9d62b0cf2c..5bb5f53067 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -20,8 +20,9 @@ //Germs /datum/organ/proc/get_cure_threshold() //before reaching level three, the amount of spaceacillin required to cure infections scales between 5 and 30 units - var/germ_scale = max((germ_level - INFECTION_LEVEL_ONE)/(INFECTION_LEVEL_THREE - INFECTION_LEVEL_ONE), 0) - return min(5 + germ_scale*25, 30) + //var/germ_scale = max((germ_level - INFECTION_LEVEL_ONE)/(INFECTION_LEVEL_THREE - INFECTION_LEVEL_ONE), 0) + //return min(5 + germ_scale*25, 30) + return 5 //Based on Hubble's suggestion /datum/organ/proc/handle_antibiotics() var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 5d5c66b602..3c999fc870 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -399,7 +399,7 @@ Note that amputating the affected organ does in fact remove the infection from t if (prob(3)) //adjust this to tweak how fast people take toxin damage from infections owner.adjustToxLoss(1) - if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < cure_threshold - 5) //should start at around 8 units of spaceacillin + if(germ_level >= INFECTION_LEVEL_TWO && antibiotics < cure_threshold) //spread the infection for (var/datum/organ/internal/I in internal_organs) if (I.germ_level < germ_level) diff --git a/code/modules/organs/organ_internal.dm b/code/modules/organs/organ_internal.dm index 0dddd6f5f1..4753d7dc8f 100644 --- a/code/modules/organs/organ_internal.dm +++ b/code/modules/organs/organ_internal.dm @@ -58,7 +58,7 @@ if (germ_level >= INFECTION_LEVEL_TWO) var/datum/organ/external/parent = owner.get_organ(parent_organ) //spread germs - if (antibiotics < get_cure_threshold() - 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) )) + if (antibiotics < get_cure_threshold() && 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 From 05f2642ea9830529ff18d99978881a6ceb74b302 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Mon, 7 Jul 2014 14:30:46 +0200 Subject: [PATCH 17/21] Fixes #4737, allowing the captain to open his office door from the comfort of his chair. Makes the door control in the captain's office look for tagged doors instead of shutters. Adjusts the pixel shift of the door control so the captain doesn't have to lean over his own desk to push it. Makes the button require captain's access to use. --- maps/tgstation2.dmm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index d808a70381..41054dfe90 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -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) From 36cf4bd41eebc01ad35e99f6cfa2a4b316e2df25 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 7 Jul 2014 21:37:28 -0500 Subject: [PATCH 18/21] Mentors will no longer see highlighed names in ahelps / msay for players with special roles (Antags, etc.). --- code/modules/admin/admin.dm | 8 ++++---- code/modules/admin/verbs/adminhelp.dm | 7 +++++-- code/modules/admin/verbs/adminsay.dm | 4 +++- 3 files changed, 12 insertions(+), 7 deletions(-) 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]" From 6568533d0daa405ff18769928464d32f02fe53d7 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Tue, 8 Jul 2014 04:48:21 +0200 Subject: [PATCH 19/21] Fixes canmove updating wrongly on movable chairs --- code/modules/mob/mob.dm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e18b44a2bd..11f3b4ae47 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 @@ -805,6 +809,9 @@ note dizziness decrements automatically in the mob's Life() proc. set hidden = 1 if(!canface()) return 0 dir = EAST + if(buckled && buckled.movable) + buckled.dir = EAST + buckled.handle_rotation() client.move_delay += movement_delay() return 1 @@ -813,6 +820,9 @@ note dizziness decrements automatically in the mob's Life() proc. set hidden = 1 if(!canface()) return 0 dir = WEST + if(buckled && buckled.movable) + buckled.dir = WEST + buckled.handle_rotation() client.move_delay += movement_delay() return 1 @@ -821,6 +831,9 @@ note dizziness decrements automatically in the mob's Life() proc. set hidden = 1 if(!canface()) return 0 dir = NORTH + if(buckled && buckled.movable) + buckled.dir = NORTH + buckled.handle_rotation() client.move_delay += movement_delay() return 1 @@ -829,6 +842,9 @@ note dizziness decrements automatically in the mob's Life() proc. set hidden = 1 if(!canface()) return 0 dir = SOUTH + if(buckled && buckled.movable) + buckled.dir = SOUTH + buckled.handle_rotation() client.move_delay += movement_delay() return 1 From 4ac685afd94d09112967063313646408021d528d Mon Sep 17 00:00:00 2001 From: mwerezak Date: Mon, 7 Jul 2014 23:18:12 -0400 Subject: [PATCH 20/21] Removes duplicate defines, updates comments --- code/game/machinery/embedded_controller/docking_program.dm | 4 ++-- code/modules/supermatter/supermatter.dm | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/embedded_controller/docking_program.dm b/code/game/machinery/embedded_controller/docking_program.dm index 59a74cc037..032676f037 100644 --- a/code/game/machinery/embedded_controller/docking_program.dm +++ b/code/game/machinery/embedded_controller/docking_program.dm @@ -68,8 +68,8 @@ 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 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 From a6e6a8939ff3e9a213477a3e309373327d7a3d4e Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Tue, 8 Jul 2014 07:39:49 +0200 Subject: [PATCH 21/21] Cleans code up for easier editing --- code/modules/mob/mob.dm | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 11f3b4ae47..37b69afdaa 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -805,48 +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 = EAST + 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 - if(buckled && buckled.movable) - buckled.dir = WEST - buckled.handle_rotation() - client.move_delay += movement_delay() - return 1 + return facedir(WEST) /mob/verb/northface() set hidden = 1 - if(!canface()) return 0 - dir = NORTH - if(buckled && buckled.movable) - buckled.dir = NORTH - buckled.handle_rotation() - client.move_delay += movement_delay() - return 1 + return facedir(NORTH) /mob/verb/southface() set hidden = 1 - if(!canface()) return 0 - dir = SOUTH - if(buckled && buckled.movable) - buckled.dir = SOUTH - buckled.handle_rotation() - 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