diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index d26db30a194..501c49ae556 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -295,7 +295,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) //if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out if(zone) //be less restrictive with canister and tank reactions - if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier)) + if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*zone.contents.len)) return 0 diff --git a/code/__defines/lighting.dm b/code/__defines/lighting.dm new file mode 100644 index 00000000000..048cd644d5e --- /dev/null +++ b/code/__defines/lighting.dm @@ -0,0 +1,4 @@ +#define FOR_DVIEW(type, range, center, invis_flags) \ + dview_mob.loc = center; \ + dview_mob.see_invisible = invis_flags; \ + for(type in view(range, dview_mob)) diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 76bce19e1fb..e4e406d219a 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -83,4 +83,14 @@ #define MIN_SUPPLIED_LAW_NUMBER 15 -#define MAX_SUPPLIED_LAW_NUMBER 50 \ No newline at end of file +#define MAX_SUPPLIED_LAW_NUMBER 50 + +//default item on-mob icons +#define INV_HEAD_DEF_ICON 'icons/mob/head.dmi' +#define INV_BACK_DEF_ICON 'icons/mob/back.dmi' +#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi' +#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi' +#define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi' +#define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi' +#define INV_SUIT_DEF_ICON 'icons/mob/ties.dmi' +#define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi' diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 62d67ab18e4..dd4039bbe86 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1289,27 +1289,29 @@ var/list/WALLITEMS = list( colour += temp_col return colour +var/mob/dview/dview_mob = new + //Version of view() which ignores darkness, because BYOND doesn't have it. /proc/dview(var/range = world.view, var/center, var/invis_flags = 0) if(!center) return - var/global/mob/dview/DV - if(!DV) - DV = new + dview_mob.loc = center - DV.loc = center + dview_mob.see_invisible = invis_flags - DV.see_in_dark = range - DV.see_invisible = invis_flags - - . = view(range, DV) - DV.loc = null + . = view(range, dview_mob) + dview_mob.loc = null /mob/dview invisibility = 101 density = 0 + anchored = 1 + simulated = 0 + + see_in_dark = 1e6 + /atom/proc/get_light_and_color(var/atom/origin) if(origin) color = origin.color diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 3ccae72f451..66548fded58 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -122,6 +122,8 @@ var/list/gamemode_cache = list() var/organ_health_multiplier = 1 var/organ_regeneration_multiplier = 1 + var/organs_decay + var/default_brain_health = 400 //Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt, //so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun. @@ -709,6 +711,12 @@ var/list/gamemode_cache = list() config.organ_regeneration_multiplier = value / 100 if("organ_damage_spillover_multiplier") config.organ_damage_spillover_multiplier = value / 100 + if("organs_can_decay") + config.organs_decay = 1 + if("default_brain_health") + config.default_brain_health = text2num(value) + if(!config.default_brain_health || config.default_brain_health < 1) + config.default_brain_health = initial(config.default_brain_health) if("bones_can_break") config.bones_can_break = value if("limbs_can_break") diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index 54f59204fb2..613f06dfcf8 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -188,9 +188,9 @@ datum/controller/vote if(mode) if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder) return 0 - if(current_votes[ckey]) - choices[choices[current_votes[ckey]]]-- - if(vote && 1<=vote && vote<=choices.len) + if(vote && vote >= 1 && vote <= choices.len) + if(current_votes[ckey]) + choices[choices[current_votes[ckey]]]-- voted += usr.ckey choices[choices[vote]]++ //check this current_votes[ckey] = vote diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 82f1cbce7f3..f644391bf78 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -326,7 +326,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is //AI laws for(var/mob/living/silicon/ai/M in living_mob_list) - if(M.stat != 2 && M.has_power) + if(M.stat != 2 && M.see_in_dark != 0) var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS") var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS") var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN") diff --git a/code/game/jobs/access_datum.dm b/code/game/jobs/access_datum.dm index 3aca20b7603..9cf27f6dbcd 100644 --- a/code/game/jobs/access_datum.dm +++ b/code/game/jobs/access_datum.dm @@ -305,17 +305,8 @@ desc = "Cargo Office" region = ACCESS_REGION_SUPPLY -/var/const/access_mint = 51 -/datum/access/mint - id = access_mint - desc = "Mint" - region = ACCESS_REGION_SUPPLY - -/var/const/access_mint_vault = 52 -/datum/access/mint_vault - id = access_mint_vault - desc = "Mint Vault" - access_type = ACCESS_TYPE_NONE +// /var/const/free_access_id = 51 +// /var/const/free_access_id = 52 /var/const/access_heads_vault = 53 /datum/access/heads_vault diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index 98c7a4dd986..f390303452f 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -10,7 +10,7 @@ selection_color = "#dddddd" access = list() //See /datum/job/assistant/get_access() minimal_access = list() //See /datum/job/assistant/get_access() - alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Security Cadet","Visitor") + alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Visitor") /datum/job/assistant/equip(var/mob/living/carbon/human/H) if(!H) return 0 diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 7d847533530..26f5c020201 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -97,8 +97,8 @@ spawn_positions = 1 supervisors = "the head of personnel" selection_color = "#dddddd" - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) - minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) + minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) equip(var/mob/living/carbon/human/H) @@ -124,7 +124,7 @@ spawn_positions = 2 supervisors = "the quartermaster and the head of personnel" selection_color = "#dddddd" - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting) @@ -149,8 +149,8 @@ spawn_positions = 3 supervisors = "the quartermaster and the head of personnel" selection_color = "#dddddd" - access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) - minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting) + access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) + minimal_access = list(access_mining, access_mining_station, access_mailsorting) alt_titles = list("Drill Technician","Prospector") equip(var/mob/living/carbon/human/H) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 36a6e76e553..5ba75ab41a9 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -59,7 +59,7 @@ ..() wires = new(src) botcard = new(src) - botcard.access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) + botcard.access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station) cell = new(src) cell.charge = 2000 cell.maxcharge = 2000 diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 3fd4fae3e89..71b7de64c02 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -45,6 +45,7 @@ if (!(XRAY in user.mutations)) user.mutations.Add(XRAY) user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) + user.see_in_dark = 8 user.see_invisible = SEE_INVISIBLE_LEVEL_TWO if (!(COLD_RESISTANCE in user.mutations)) @@ -66,4 +67,4 @@ show_objectives(user.mind) user << "You have a very bad feeling about this." - return + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index cb1fff4599d..5f8403246f9 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -40,7 +40,7 @@ AI MODULES if (comp.current.stat == 2 || comp.current.control_disabled == 1) usr << "Upload failed. No signal is being detected from the AI." - else if (!comp.current.has_power) + else if (comp.current.see_in_dark == 0) usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power." else src.transmitInstructions(comp.current, usr) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 447178ecb30..00bc01eda19 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1097,7 +1097,7 @@ proc/admin_notice(var/message, var/rights) else new chosen(usr.loc) - log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])") + log_and_message_admins("spawned [chosen] at ([usr.x],[usr.y],[usr.z])") feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index a25d2de0438..9a9a2b44b7f 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -358,7 +358,7 @@ dat += "NA" - dat += {"[(M.client ? "[M.client]" : "No client")] + dat += {"[M.key ? (M.client ? M.key : "[M.key] (DC)") : "No key"] X PM "} diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 1bbec850921..90d81c2e96c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1651,18 +1651,7 @@ var/mob/M = O M.real_name = obj_name - if (number == 1) - log_admin("[key_name(usr)] created a [english_list(paths)]") - for(var/path in paths) - if(ispath(path, /mob)) - message_admins("[key_name_admin(usr)] created a [english_list(paths)]", 1) - break - else - log_admin("[key_name(usr)] created [number]ea [english_list(paths)]") - for(var/path in paths) - if(ispath(path, /mob)) - message_admins("[key_name_admin(usr)] created [number]ea [english_list(paths)]", 1) - break + log_and_message_admins("created [number] [english_list(paths)]") return else if(href_list["secretsfun"]) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e1ce028c13c..55349977310 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -468,7 +468,7 @@ Traitors and the like can also be revived with the previous role mostly intact. for(var/mob/living/silicon/ai/M in mob_list) if (M.stat == 2) usr << "Upload failed. No signal is being detected from the AI." - else if (!M.has_power) + else if (M.see_in_dark == 0) usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power." else M.add_ion_law(input) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index feef7d06b1a..395c9939f57 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -9,30 +9,31 @@ var/slot = "decor" var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to var/image/inv_overlay = null //overlay used when attached to clothing. - var/image/inv_overlay_mob = null + var/image/mob_overlay = null var/overlay_state = null /obj/item/clothing/accessory/proc/get_inv_overlay() if(!inv_overlay) + if(!mob_overlay) + get_mob_overlay() + var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]" if(icon_override) if("[tmp_icon_state]_tie" in icon_states(icon_override)) tmp_icon_state = "[tmp_icon_state]_tie" - inv_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]") - else - inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]") + inv_overlay = image(icon = mob_overlay.icon, icon_state = tmp_icon_state, dir = SOUTH) return inv_overlay -/obj/item/clothing/accessory/proc/get_inv_mob_overlay() - if(!inv_overlay_mob) +/obj/item/clothing/accessory/proc/get_mob_overlay() + if(!mob_overlay) var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]" if(icon_override) if("[tmp_icon_state]_mob" in icon_states(icon_override)) tmp_icon_state = "[tmp_icon_state]_mob" - inv_overlay_mob = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]") + mob_overlay = image("icon" = icon_override, "icon_state" = "[tmp_icon_state]") else - inv_overlay_mob = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[tmp_icon_state]") - return inv_overlay_mob + mob_overlay = image("icon" = INV_ACCESSORIES_DEF_ICON, "icon_state" = "[tmp_icon_state]") + return mob_overlay //when user attached an accessory to S /obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob) diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index a54b2f0f848..1ee235fa6f6 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -127,32 +127,35 @@ lum_g = 1 lum_b = 1 -/datum/light_source/proc/falloff(atom/movable/lighting_overlay/O) - #if LIGHTING_FALLOFF == 1 // circular - . = (O.x - source_turf.x)**2 + (O.y - source_turf.y)**2 + LIGHTING_HEIGHT - - #if LIGHTING_LAMBERTIAN == 1 - . = CLAMP01((1 - CLAMP01(sqrt(.) / light_range)) * (1 / (sqrt(. + 1)))) - #else - . = 1 - CLAMP01(sqrt(.) / light_range) - #endif - - #elif LIGHTING_FALLOFF == 2 // square - . = abs(O.x - source_turf.x) + abs(O.y - source_turf.y) + LIGHTING_HEIGHT - - #if LIGHTING_LAMBERTIAN == 1 - . = CLAMP01((1 - CLAMP01(. / light_range)) * (1 / (sqrt(.)**2 + ))) - #else - . = 1 - CLAMP01(. / light_range) - #endif +#if LIGHTING_FALLOFF == 1 //circular + #define LUM_DISTANCE(swapvar, O, T) swapvar = (O.x - T.x)**2 + (O.y - T.y)**2 + LIGHTING_HEIGHT + #if LIGHTING_LAMBERTIAN == 1 + #define LUM_ATTENUATION(swapvar) swapvar = CLAMP01((1 - CLAMP01(sqrt(swapvar) / light_range)) * (1 / sqrt(swapvar + 1))) + #else + #define LUM_ATTENUATION(swapvar) swapvar = 1 - CLAMP01(sqrt(swapvar) / light_range) #endif +#elif LIGHTING_FALLOFF == 2 //square + #define LUM_DISTANCE(swapvar, O, T) swapvar = abs(O.x - T.x) + abs(O.y - T.y) + LIGHTING_HEIGHT + #if LIGHTING_LAMBERTIAN == 1 + #define LUM_ATTENUATION(swapvar) swapvar = CLAMP01((1 - CLAMP01(swapvar / light_range)) * (1 / sqrt(swapvar**2 + 1))) + #else + #define LUM_ATTENUATION(swapvar) swapvar = CLAMP01(swapvar / light_range) + #endif +#endif + +#define LUM_FALLOFF(swapvar, O, T) \ + LUM_DISTANCE(swapvar, O, T); \ + LUM_ATTENUATION(swapvar); /datum/light_source/proc/apply_lum() applied = 1 if(istype(source_turf)) - for(var/turf/T in dview(light_range, source_turf, INVISIBILITY_LIGHTING)) + FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING) if(T.lighting_overlay) - var/strength = light_power * falloff(T.lighting_overlay) + var/strength + LUM_FALLOFF(strength, T, source_turf) + strength *= light_power + if(!strength) //Don't add turfs that aren't affected to the affected turfs. continue @@ -196,7 +199,7 @@ //Stupid dumb copy pasta because BYOND and speed. /datum/light_source/proc/smart_vis_update() var/list/view[0] - for(var/turf/T in dview(light_range, source_turf, INVISIBILITY_LIGHTING)) + FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING) view += T //Filter out turfs. //This is the part where we calculate new turfs (if any) @@ -204,7 +207,9 @@ for(var/turf/T in new_turfs) //Big huge copy paste from apply_lum() incoming because screw unreadable defines and screw proc call overhead. if(T.lighting_overlay) - . = light_power * falloff(T.lighting_overlay) + LUM_FALLOFF(., T, source_turf) + . *= light_power + if(!.) //Don't add turfs that aren't affected to the affected turfs. continue @@ -240,3 +245,7 @@ effect_turf.Cut(idx, idx + 1) effect_str.Cut(idx, idx + 1) + +#undef LUM_FALLOFF +#undef LUM_DISTANCE +#undef LUM_ATTENUATION diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 71afbc893db..ed71989e500 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -34,6 +34,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images /mob/dead/observer/New(mob/body) sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF see_invisible = SEE_INVISIBLE_OBSERVER + see_in_dark = 100 verbs += /mob/dead/observer/proc/dead_tele stat = DEAD @@ -634,12 +635,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/proc/updateghostsight() if (!seedarkness) see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING - see_in_dark = 100 else see_invisible = SEE_INVISIBLE_OBSERVER if (!ghostvision) see_invisible = SEE_INVISIBLE_LIVING; - see_in_dark = 0 updateghostimages() /proc/updateallghostimages() diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 3d605a061aa..014c27df1b2 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -70,6 +70,7 @@ blind.layer = 0 sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO drop_r_hand() diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index e77084553de..fb2b04a4348 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -15,6 +15,7 @@ var/acceleration = 1 var/owner_follows_eye = 0 + see_in_dark = 7 status_flags = GODMODE invisibility = INVISIBILITY_EYE diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index 959e6ed379b..8bbf517e60e 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -4,6 +4,7 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_spore_temp" pass_flags = PASSBLOB + see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO var/ghost_name = "Unknown" var/creating_blob = 0 diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 1043cf0bfac..429e82b3d00 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -95,11 +95,13 @@ sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS + see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO else if (stat != 2) sight &= ~SEE_TURFS sight &= ~SEE_MOBS sight &= ~SEE_OBJS + see_in_dark = 2 see_invisible = SEE_INVISIBLE_LIVING if (healths) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index da1e59f0dea..5c40906bfbc 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -23,6 +23,7 @@ /obj/item/organ/brain/New() ..() + health = config.default_brain_health spawn(5) if(brainmob && brainmob.client) brainmob.client.screen.len = null //clear the hud diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index a2098baa9fa..283bb595c60 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -199,11 +199,13 @@ sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS + see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO else if (stat != 2) sight &= ~SEE_TURFS sight &= ~SEE_MOBS sight &= ~SEE_OBJS + see_in_dark = 2 see_invisible = SEE_INVISIBLE_LIVING if (client) client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) @@ -252,4 +254,4 @@ emp_damage += rand(10,20) if(3) emp_damage += rand(0,10) - ..()*/ + ..()*/ diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 7f469f08d7c..a75a4b16300 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -41,7 +41,7 @@ This saves us from having to call add_fingerprint() any time something is put in /mob/living/carbon/human/proc/has_organ(name) var/obj/item/organ/external/O = organs_by_name[name] - return (O && !(O.status & ORGAN_DESTROYED) ) + return (O && !(O.status & ORGAN_DESTROYED) && !O.is_stump()) /mob/living/carbon/human/proc/has_organ_for_slot(slot) switch(slot) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 76a585c19f6..34668d0b66e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1197,7 +1197,7 @@ damageoverlay.overlays += I if( stat == DEAD ) - sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS) + sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS|SEE_SELF see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(healths) healths.icon_state = "health7" //DEAD healthmeter @@ -1208,23 +1208,13 @@ item.zoom() break - /* - if(locate(/obj/item/weapon/gun/energy/sniperrifle, contents)) - var/obj/item/weapon/gun/energy/sniperrifle/s = locate() in src - if(s.zoom) - s.zoom() - if(locate(/obj/item/device/binoculars, contents)) - var/obj/item/device/binoculars/b = locate() in src - if(b.zoom) - b.zoom() - */ - else sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING if(XRAY in mutations) sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(seer==1) @@ -1236,7 +1226,9 @@ seer = 0 else - sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) + sight = species.vision_flags + see_in_dark = species.darksight + see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING var/tmp/glasses_processed = 0 var/obj/item/weapon/rig/rig = back if(istype(rig) && rig.visor) @@ -1250,6 +1242,7 @@ process_glasses(glasses) if(XRAY in mutations) sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(!glasses_processed && (species.vision_flags > 0)) @@ -1275,6 +1268,8 @@ if(0 to 20) healths.icon_state = "health5" else healths.icon_state = "health6" + if(!seer) + see_invisible = SEE_INVISIBLE_LIVING if(nutrition_icon) switch(nutrition) if(450 to INFINITY) nutrition_icon.icon_state = "nutrition0" diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index cf2295a98c5..dd614bb55ba 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -8,6 +8,7 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/claws/strong, /datum/unarmed_attack/bite/sharp) light_dam = 2 + darksight = 8 has_organ = list() siemens_coefficient = 0 @@ -22,4 +23,4 @@ /datum/species/shadow/handle_death(var/mob/living/carbon/human/H) spawn(1) new /obj/effect/decal/cleanable/ash(H.loc) - qdel(H) + qdel(H) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 500fad9c86f..85d7f45c452 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -47,7 +47,7 @@ var/list/unarmed_attacks = null // For empty hand harm-intent attack var/brute_mod = 1 // Physical damage multiplier. var/burn_mod = 1 // Burn damage multiplier. - var/vision_flags = 0 // Same flags as glasses. + var/vision_flags = SEE_SELF // Same flags as glasses. // Death vars. var/meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human @@ -100,6 +100,7 @@ var/list/inherent_verbs // Species-specific verbs. var/has_fine_manipulation = 1 // Can use small items. var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation. + var/darksight = 2 // Native darksight distance. var/flags = 0 // Various specific features. var/slowdown = 0 // Passive movement speed malus (or boost, if negative) var/primitive_form // Lesser form, if any (ie. monkey for humans) diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index e5aada89d62..46a7e9f5f53 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -10,6 +10,7 @@ unarmed_types = list(/datum/unarmed_attack/slime_glomp) flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE siemens_coefficient = 3 + darksight = 3 blood_color = "#05FF9B" flesh_color = "#05FFFB" diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 3ddf983b76b..8e0402b91a8 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -22,6 +22,7 @@ tail_animation = 'icons/mob/species/unathi/tail.dmi' unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) primitive_form = "Stok" + darksight = 3 gluttonous = 1 blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \ @@ -72,6 +73,7 @@ tail = "tajtail" tail_animation = 'icons/mob/species/tajaran/tail.dmi' unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) + darksight = 8 slowdown = -1 brute_mod = 1.2 diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index ee24e3f6b7f..b48593796f4 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -42,7 +42,7 @@ breath_type = null poison_type = null - vision_flags = SEE_MOBS + vision_flags = SEE_SELF|SEE_MOBS has_organ = list( "heart" = /obj/item/organ/heart, diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 208a79c5c13..3bb42237a84 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -504,7 +504,7 @@ var/global/list/damage_icon_parts = list() var/obj/item/clothing/under/under = w_uniform if(under.accessories.len) for(var/obj/item/clothing/accessory/A in under.accessories) - standing.overlays |= A.get_inv_mob_overlay() + standing.overlays |= A.get_mob_overlay() overlays_standing[UNIFORM_LAYER] = standing else diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 4d084a7533a..86f8f2d6722 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -14,6 +14,7 @@ update_icon = 0 nutrition = 700 + see_in_dark = 8 update_slimes = 0 // canstun and canweaken don't affect slimes because they ignore stun and weakened variables @@ -401,4 +402,4 @@ /mob/living/carbon/slime/cannot_use_vents() if(Victim) return "You cannot ventcrawl while feeding." - ..() + ..() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 4b886801b12..2de218183ba 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -49,7 +49,6 @@ var/list/ai_verbs_default = list( var/list/network = list("Exodus") var/obj/machinery/camera/camera = null var/list/connected_robots = list() - var/has_power = 0 var/aiRestorePowerRoutine = 0 var/viewalerts = 0 var/icon/holo_icon//Default is assigned when AI is created. @@ -360,8 +359,7 @@ var/list/ai_verbs_default = list( /mob/living/silicon/ai/check_eye(var/mob/user as mob) if (!camera) - return null - user.reset_view(camera) + return -1 return 0 /mob/living/silicon/ai/restrained() diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 8db82ead313..d67eb277535 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -38,18 +38,19 @@ src << "APU GENERATOR FAILURE! (System Damaged)" stop_apu(1) - has_power = 1 + var/blind = 0 var/area/loc = null if (istype(T, /turf)) loc = T.loc if (istype(loc, /area)) if (!loc.power_equip && !istype(src.loc,/obj/item) && !APU_power) - has_power = 0 + blind = 1 - if (has_power) + if (!blind) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS + src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LIVING if (aiRestorePowerRoutine==2) @@ -79,10 +80,12 @@ //Blind the AI updateicon() src.blind.screen_loc = "1,1 to 15,15" - + if (src.blind.layer!=18) + src.blind.layer = 18 src.sight = src.sight&~SEE_TURFS src.sight = src.sight&~SEE_MOBS src.sight = src.sight&~SEE_OBJS + src.see_in_dark = 0 src.see_invisible = SEE_INVISIBLE_LIVING //Now to tell the AI why they're blind and dying slowly. diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 6deab260d90..ad06c58d6ea 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -120,7 +120,6 @@ /mob/living/silicon/pai/check_eye(var/mob/user as mob) if (!src.current) return -1 - user.reset_view(src.current) return 0 /mob/living/silicon/pai/blob_act() diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index c690931c8a7..c9d08b2b497 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -163,11 +163,13 @@ see_invisible = SEE_INVISIBLE_MINIMUM else if (src.sight_mode & BORGTHERM) src.sight |= SEE_MOBS + src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LEVEL_TWO else if (src.stat != 2) src.sight &= ~SEE_MOBS src.sight &= ~SEE_TURFS src.sight &= ~SEE_OBJS + src.see_in_dark = 8 // see_in_dark means you can FAINTLY see in the dark, humans have a range of 3 or so, tajaran have it at 8 src.see_invisible = SEE_INVISIBLE_LIVING // This is normal vision (25), setting it lower for normal vision means you don't "see" things like darkness since darkness // has a "invisible" value of 15 diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index 65bf148ae4d..7781a267449 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -150,6 +150,7 @@ attacktext = "slashed" speed = -1 environment_smash = 1 + see_in_dark = 7 attack_sound = 'sound/weapons/rapidslice.ogg' construct_spells = list(/spell/targeted/ethereal_jaunt/shift) @@ -227,6 +228,7 @@ attacktext = "violently stabbed" speed = -1 environment_smash = 1 + see_in_dark = 7 attack_sound = 'sound/weapons/pierce.ogg' construct_spells = list( diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 9c78b95522f..3197c6023cc 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -11,6 +11,7 @@ emote_see = list("shakes their head", "shivers") speak_chance = 1 turns_per_move = 5 + see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index e5a670d472e..322d08dc9ff 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -17,6 +17,7 @@ response_help = "pets" response_disarm = "bops" response_harm = "kicks" + see_in_dark = 5 mob_size = 8 var/obj/item/inventory_head diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index c6192503887..60ddd0638b9 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -11,6 +11,7 @@ emote_see = list("shakes its head", "stamps a foot", "glares around") speak_chance = 1 turns_per_move = 5 + see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 4 response_help = "pets" @@ -95,6 +96,7 @@ emote_see = list("shakes its head") speak_chance = 1 turns_per_move = 5 + see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 6 response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 64240876312..70f7282b8e3 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -13,6 +13,7 @@ small = 1 speak_chance = 1 turns_per_move = 5 + see_in_dark = 6 maxHealth = 5 health = 5 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index b673aee9f04..73de95acee7 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -12,6 +12,7 @@ emote_see = list("stares ferociously", "stomps") speak_chance = 1 turns_per_move = 5 + see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/bearmeat response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index a6da79247f2..bf4ea6b5728 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -15,6 +15,7 @@ emote_hear = list("chitters") speak_chance = 5 turns_per_move = 5 + see_in_dark = 10 meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat response_help = "pets" response_disarm = "gently pushes aside" @@ -212,4 +213,4 @@ #undef SPINNING_WEB #undef LAYING_EGGS #undef MOVING_TO_TARGET -#undef SPINNING_COCOON +#undef SPINNING_COCOON diff --git a/code/modules/mob/living/simple_animal/kobold.dm b/code/modules/mob/living/simple_animal/kobold.dm index f634bd70f1b..3e52a408747 100644 --- a/code/modules/mob/living/simple_animal/kobold.dm +++ b/code/modules/mob/living/simple_animal/kobold.dm @@ -12,6 +12,7 @@ emote_see = list("looks around suspiciously.", "scratches it's arm.","putters around a bit.") speak_chance = 15 turns_per_move = 5 + see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 934e89bc061..cee9e723a46 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -2,7 +2,6 @@ density = 1 layer = 4.0 animate_movement = 2 - see_in_dark = 0 // flags = NOREACT var/datum/mind/mind diff --git a/code/modules/mob/update_icons.dm b/code/modules/mob/update_icons.dm index 958808234fd..a6ae6dc4a09 100644 --- a/code/modules/mob/update_icons.dm +++ b/code/modules/mob/update_icons.dm @@ -1,15 +1,6 @@ //Most of these are defined at this level to reduce on checks elsewhere in the code. //Having them here also makes for a nice reference list of the various overlay-updating procs available -//default item on-mob icons -#define INV_HEAD_DEF_ICON 'icons/mob/head.dmi' -#define INV_BACK_DEF_ICON 'icons/mob/back.dmi' -#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi' -#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi' -#define INV_W_UNIFORM_DEF_ICON 'icons/mob/uniform.dmi' -#define INV_ACCESSORIES_DEF_ICON 'icons/mob/ties.dmi' -#define INV_SUIT_DEF_ICON 'icons/mob/suit.dmi' - /mob/proc/regenerate_icons() //TODO: phase this out completely if possible return diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 866e2198111..c3f84aa85c4 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -116,6 +116,9 @@ var/list/organ_cache = list() if(B && prob(40)) reagents.remove_reagent("blood",0.1) blood_splatter(src,B,1) + if(config.organs_decay) damage += rand(1,3) + if(damage >= max_damage) + damage = max_damage germ_level += rand(2,6) if(germ_level >= INFECTION_LEVEL_TWO) germ_level += rand(2,6) diff --git a/code/modules/organs/organ_stump.dm b/code/modules/organs/organ_stump.dm index 4f353e193cd..0ab0e145a0e 100644 --- a/code/modules/organs/organ_stump.dm +++ b/code/modules/organs/organ_stump.dm @@ -14,7 +14,7 @@ ..(holder, internal) if(istype(limb)) max_damage = limb.max_damage - if((limb.status & ORGAN_ROBOT) && (!parent || (parent.status & ORGAN_ROBOT))) + if((limb.status & ORGAN_ROBOT) && (!parent || (parent.status & ORGAN_ROBOT))) robotize() //if both limb and the parent are robotic, the stump is robotic too /obj/item/organ/external/stump/is_stump() @@ -23,3 +23,6 @@ /obj/item/organ/external/stump/removed() ..() qdel(src) + +/obj/item/organ/external/stump/is_usable() + return 0 \ No newline at end of file diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index a0611c68669..e15de319698 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -53,11 +53,10 @@ /obj/machinery/computer/helm/check_eye(var/mob/user as mob) if (!manual_control) - return null + return -1 if (!get_dist(user, src) > 1 || user.blinded || !linked ) - return null - user.reset_view(linked) - return 1 + return -1 + return 0 /obj/machinery/computer/helm/attack_hand(var/mob/user as mob) if(..()) @@ -67,6 +66,8 @@ if(!isAI(user)) user.set_machine(src) + if(linked) + user.reset_view(linked) ui_interact(user) diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 928f67f3efc..d012b1fed67 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -10,7 +10,7 @@ ..() maximum_volume = max my_atom = A - + //I dislike having these here but map-objects are initialised before world/New() is called. >_> if(!chemical_reagents_list) //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id @@ -257,7 +257,7 @@ if(!target || !istype(target)) return - amount = min(amount, total_volume, target.get_free_space() / multiplier) + amount = max(0, min(amount, total_volume, target.get_free_space() / multiplier)) if(!amount) return @@ -277,9 +277,9 @@ /* Holder-to-atom and similar procs */ -//The general proc for applying reagents to things. This proc assumes the reagents are being applied externally, +//The general proc for applying reagents to things. This proc assumes the reagents are being applied externally, //not directly injected into the contents. It first calls touch, then the appropriate trans_to_*() or splash_mob(). -//If for some reason touch effects are bypassed (e.g. injecting stuff directly into a reagent container or person), +//If for some reason touch effects are bypassed (e.g. injecting stuff directly into a reagent container or person), //call the appropriate trans_to_*() proc. /datum/reagents/proc/trans_to(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0) touch(target) //First, handle mere touch effects diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 7b4b7a001de..ae71bf82499 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -256,6 +256,7 @@ if (!(XRAY in H.mutations)) H.mutations.Add(XRAY) H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) + H.see_in_dark = 8 H.see_invisible = SEE_INVISIBLE_LEVEL_TWO H << "\blue The walls suddenly disappear." temp = "You have purchased a scrying orb, and gained x-ray vision." diff --git a/config/example/config.txt b/config/example/config.txt index 492b732f61e..587bea68290 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -361,7 +361,11 @@ STARLIGHT 0 ## Enable asteroid tunnel/cave generation. Will behave strangely if turned off with a map that expects it on. # GENERATE_ASTEROID - +## Uncomment to enable organ decay outside of a body or storage item. +#ORGANS_CAN_DECAY ## Uncomment to have the changelog file automatically open when a user connects and hasn't seen the latest changelog #AGGRESSIVE_CHANGELOG + +## Uncomment to override default brain health. +#DEFAULT_BRAIN_HEALTH 400 diff --git a/html/changelog.html b/html/changelog.html index ac603b1c368..d2bc033a607 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,13 @@ -->
+

27 July 2015

+

Kelenius updated:

+ +

14 July 2015

HarpyEagle updated: