Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/_helpers/unsorted.dm
	code/game/jobs/access.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/update_icons.dm
	code/modules/organs/organ.dm
	code/modules/reagents/Chemistry-Holder.dm
	code/setup.dm
This commit is contained in:
PsiOmegaDelta
2015-07-27 10:20:20 +02:00
49 changed files with 1875 additions and 1816 deletions
+1 -1
View File
@@ -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)
@@ -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)
+31 -22
View File
@@ -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
+1 -2
View File
@@ -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()
+1
View File
@@ -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()
+1
View File
@@ -15,6 +15,7 @@
var/acceleration = 1
var/owner_follows_eye = 0
see_in_dark = 7
status_flags = GODMODE
invisibility = INVISIBILITY_EYE
+1
View File
@@ -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
@@ -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)
@@ -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
+3 -1
View File
@@ -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)
..()*/
..()*/
+4 -1
View File
@@ -1225,6 +1225,7 @@
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)
@@ -1237,7 +1238,8 @@
else
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
var/tmp/glasses_processed = 0
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)
if(!rig.helmet || (head && rig.helmet == head))
@@ -1250,6 +1252,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))
@@ -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)
@@ -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)
@@ -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"
@@ -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
@@ -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
@@ -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."
..()
..()
-1
View File
@@ -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.
+7 -4
View File
@@ -38,18 +38,19 @@
src << "<span class='notice'><b>APU GENERATOR FAILURE! (System Damaged)</b></span>"
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.
@@ -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
@@ -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(
@@ -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"
@@ -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
@@ -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"
@@ -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
@@ -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"
@@ -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
@@ -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"
-1
View File
@@ -2,7 +2,6 @@
density = 1
layer = 4.0
animate_movement = 2
see_in_dark = 0
// flags = NOREACT
var/datum/mind/mind
-9
View File
@@ -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
+2
View File
@@ -116,6 +116,8 @@ 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)
germ_level += rand(2,6)
if(germ_level >= INFECTION_LEVEL_TWO)
germ_level += rand(2,6)
+4 -4
View File
@@ -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
+1
View File
@@ -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."