mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-27 18:42:44 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts: code/_helpers/unsorted.dm code/modules/clothing/glasses/glasses.dm code/modules/mob/living/carbon/human/life.dm code/setup.dm
This commit is contained in:
@@ -176,7 +176,7 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_EYES
|
||||
var/vision_flags = 0
|
||||
var/darkness_view = 0//Base human is 2
|
||||
var/invisa_view = 0
|
||||
var/see_invisible = -1
|
||||
sprite_sheets = list("Vox" = 'icons/mob/species/vox/eyes.dmi')
|
||||
|
||||
/obj/item/clothing/glasses/update_clothing_icon()
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//slot_flags = SLOT_EYES
|
||||
//var/vision_flags = 0
|
||||
//var/darkness_view = 0//Base human is 2
|
||||
//var/invisa_view = 0
|
||||
var/prescription = 0
|
||||
var/toggleable = 0
|
||||
var/off_state = "degoggles"
|
||||
@@ -75,6 +74,8 @@
|
||||
origin_tech = list(TECH_MAGNET = 2)
|
||||
darkness_view = 7
|
||||
toggleable = 1
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
icon_action_button = "action_nvg"
|
||||
off_state = "denight"
|
||||
|
||||
/obj/item/clothing/glasses/night/New()
|
||||
@@ -220,7 +221,6 @@
|
||||
origin_tech = list(TECH_MAGNET = 3)
|
||||
toggleable = 1
|
||||
vision_flags = SEE_MOBS
|
||||
invisa_view = 2
|
||||
|
||||
emp_act(severity)
|
||||
if(istype(src.loc, /mob/living/carbon/human))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
icon_state = "jensenshades"
|
||||
item_state = "jensenshades"
|
||||
vision_flags = SEE_MOBS
|
||||
invisa_view = 2
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
|
||||
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
|
||||
process_sec_hud(M, 1)
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
|
||||
T.affecting_lights += src
|
||||
effect_turf += T
|
||||
END_FOR_DVIEW
|
||||
|
||||
/datum/light_source/proc/remove_lum()
|
||||
applied = 0
|
||||
@@ -201,11 +202,11 @@
|
||||
var/list/view[0]
|
||||
FOR_DVIEW(var/turf/T, light_range, source_turf, INVISIBILITY_LIGHTING)
|
||||
view += T //Filter out turfs.
|
||||
END_FOR_DVIEW
|
||||
|
||||
//This is the part where we calculate new turfs (if any)
|
||||
var/list/new_turfs = view - effect_turf //This will result with all the tiles that are added.
|
||||
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)
|
||||
LUM_FALLOFF(., T, source_turf)
|
||||
. *= light_power
|
||||
|
||||
@@ -46,21 +46,13 @@
|
||||
T.reconsider_lights()
|
||||
return ..()
|
||||
|
||||
/atom/movable/Move()
|
||||
var/turf/old_loc = loc
|
||||
/atom/Entered(atom/movable/obj, atom/prev_loc)
|
||||
. = ..()
|
||||
|
||||
if(loc != old_loc)
|
||||
for(var/datum/light_source/L in light_sources)
|
||||
if(obj && prev_loc != src)
|
||||
for(var/datum/light_source/L in obj.light_sources)
|
||||
L.source_atom.update_light()
|
||||
|
||||
var/turf/new_loc = loc
|
||||
if(istype(old_loc) && opacity)
|
||||
old_loc.reconsider_lights()
|
||||
|
||||
if(istype(new_loc) && opacity)
|
||||
new_loc.reconsider_lights()
|
||||
|
||||
/atom/proc/set_opacity(new_opacity)
|
||||
var/old_opacity = opacity
|
||||
opacity = new_opacity
|
||||
|
||||
@@ -98,3 +98,5 @@
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
T.lighting_overlay = null
|
||||
|
||||
..()
|
||||
|
||||
@@ -16,3 +16,13 @@
|
||||
if(A.lighting_use_dynamic)
|
||||
var/atom/movable/lighting_overlay/O = PoolOrNew(/atom/movable/lighting_overlay, src)
|
||||
lighting_overlay = O
|
||||
|
||||
/turf/Entered(atom/movable/obj)
|
||||
. = ..()
|
||||
if(obj && obj.opacity)
|
||||
reconsider_lights()
|
||||
|
||||
/turf/Exited(atom/movable/obj)
|
||||
. = ..()
|
||||
if(obj && obj.opacity)
|
||||
reconsider_lights()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
metaltag = "plasteel"
|
||||
requires = list(
|
||||
"platinum" = 1,
|
||||
"coal" = 2,
|
||||
"carbon" = 2,
|
||||
"hematite" = 2
|
||||
)
|
||||
product_mod = 0.3
|
||||
@@ -21,7 +21,7 @@
|
||||
/datum/alloy/steel
|
||||
metaltag = DEFAULT_WALL_MATERIAL
|
||||
requires = list(
|
||||
"coal" = 1,
|
||||
"carbon" = 1,
|
||||
"hematite" = 1
|
||||
)
|
||||
product = /obj/item/stack/material/steel
|
||||
@@ -112,16 +112,17 @@
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/list/alloy_data[0]
|
||||
var/static/list/alloy_data
|
||||
var/active = 0
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
|
||||
..()
|
||||
|
||||
//TODO: Ore and alloy global storage datum.
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
// initialize static alloy_data list
|
||||
if(!alloy_data)
|
||||
alloy_data = list()
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
|
||||
@@ -1397,6 +1397,8 @@
|
||||
sight |= G.vision_flags
|
||||
if(!druggy && !seer)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
if(G.see_invisible >= 0)
|
||||
see_invisible = G.see_invisible
|
||||
if(istype(G,/obj/item/clothing/glasses/night) && !seer)
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
/* HUD shit goes here, as long as it doesn't modify sight flags */
|
||||
|
||||
@@ -39,20 +39,23 @@
|
||||
laws.delete_law(law)
|
||||
log_and_message_admins("has deleted a law belonging to [src]: [law.law]")
|
||||
|
||||
/mob/living/silicon/proc/clear_inherent_laws()
|
||||
/mob/living/silicon/proc/clear_inherent_laws(var/silent = 0)
|
||||
laws_sanity_check()
|
||||
laws.clear_inherent_laws()
|
||||
log_and_message_admins("cleared the inherent laws of [src]")
|
||||
if(!silent)
|
||||
log_and_message_admins("cleared the inherent laws of [src]")
|
||||
|
||||
/mob/living/silicon/proc/clear_ion_laws()
|
||||
/mob/living/silicon/proc/clear_ion_laws(var/silent = 0)
|
||||
laws_sanity_check()
|
||||
laws.clear_ion_laws()
|
||||
log_and_message_admins("cleared the ion laws of [src]")
|
||||
if(!silent)
|
||||
log_and_message_admins("cleared the ion laws of [src]")
|
||||
|
||||
/mob/living/silicon/proc/clear_supplied_laws()
|
||||
/mob/living/silicon/proc/clear_supplied_laws(var/silent = 0)
|
||||
laws_sanity_check()
|
||||
laws.clear_supplied_laws()
|
||||
log_and_message_admins("cleared the supplied laws of [src]")
|
||||
if(!silent)
|
||||
log_and_message_admins("cleared the supplied laws of [src]")
|
||||
|
||||
/mob/living/silicon/proc/statelaws(var/datum/ai_laws/laws)
|
||||
var/prefix = ""
|
||||
|
||||
@@ -213,9 +213,9 @@
|
||||
death()
|
||||
|
||||
/mob/living/silicon/robot/drone/proc/full_law_reset()
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
clear_ion_laws()
|
||||
clear_supplied_laws(1)
|
||||
clear_inherent_laws(1)
|
||||
clear_ion_laws(1)
|
||||
laws = new law_type
|
||||
|
||||
//Reboot procs.
|
||||
|
||||
@@ -36,9 +36,8 @@
|
||||
var/list/stages
|
||||
// internal wounds can only be fixed through surgery
|
||||
var/internal = 0
|
||||
// maximum stage at which bleeding should still happen, counted from the right rather than the left of the list
|
||||
// 1 means all stages except the last should bleed
|
||||
var/max_bleeding_stage = 1
|
||||
// maximum stage at which bleeding should still happen. Beyond this stage bleeding is prevented.
|
||||
var/max_bleeding_stage = 0
|
||||
// one of CUT, BRUISE, BURN
|
||||
var/damage_type = CUT
|
||||
// whether this wound needs a bandage/salve to heal at all
|
||||
@@ -64,8 +63,6 @@
|
||||
|
||||
src.damage = damage
|
||||
|
||||
max_bleeding_stage = src.desc_list.len - max_bleeding_stage
|
||||
|
||||
// initialize with the appropriate stage
|
||||
src.init_stage(damage)
|
||||
|
||||
@@ -248,7 +245,9 @@
|
||||
/** CUTS **/
|
||||
/datum/wound/cut/small
|
||||
// link wound descriptions to amounts of damage
|
||||
max_bleeding_stage = 2
|
||||
// Minor cuts have max_bleeding_stage set to the stage that bears the wound type's name.
|
||||
// The major cut types have the max_bleeding_stage set to the clot stage (which is accordingly given the "blood soaked" descriptor).
|
||||
max_bleeding_stage = 3
|
||||
stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
@@ -263,25 +262,25 @@
|
||||
damage_type = CUT
|
||||
|
||||
/datum/wound/cut/gaping
|
||||
max_bleeding_stage = 2
|
||||
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, "small straight scar" = 0)
|
||||
max_bleeding_stage = 3
|
||||
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "blood soaked clot" = 15, "small angry scar" = 5, "small straight scar" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
/datum/wound/cut/gaping_big
|
||||
max_bleeding_stage = 2
|
||||
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
|
||||
max_bleeding_stage = 3
|
||||
stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large blood soaked clot" = 25, "large angry scar" = 10, "large straight scar" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
datum/wound/cut/massive
|
||||
max_bleeding_stage = 2
|
||||
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
max_bleeding_stage = 3
|
||||
stages = list("massive wound" = 70, "massive healing wound" = 50, "massive blood soaked clot" = 25, "massive angry scar" = 10, "massive jagged scar" = 0)
|
||||
damage_type = CUT
|
||||
|
||||
/** BRUISES **/
|
||||
/datum/wound/bruise
|
||||
stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,\
|
||||
stages = list("monumental bruise" = 80, "huge bruise" = 50, "large bruise" = 30,
|
||||
"moderate bruise" = 20, "small bruise" = 10, "tiny bruise" = 5)
|
||||
max_bleeding_stage = 3
|
||||
max_bleeding_stage = 3 //only large bruise and above can bleed.
|
||||
autoheal_cutoff = 30
|
||||
damage_type = BRUISE
|
||||
|
||||
@@ -311,7 +310,7 @@ datum/wound/cut/massive
|
||||
internal = 1
|
||||
stages = list("severed artery" = 30, "cut artery" = 20, "damaged artery" = 10, "bruised artery" = 5)
|
||||
autoheal_cutoff = 5
|
||||
max_bleeding_stage = 0 //all stages bleed. It's called internal bleeding after all.
|
||||
max_bleeding_stage = 4 //all stages bleed. It's called internal bleeding after all.
|
||||
|
||||
/** EXTERNAL ORGAN LOSS **/
|
||||
/datum/wound/lost_limb
|
||||
@@ -323,7 +322,7 @@ datum/wound/cut/massive
|
||||
switch(losstype)
|
||||
if(DROPLIMB_EDGE, DROPLIMB_BLUNT)
|
||||
damage_type = CUT
|
||||
max_bleeding_stage = 3
|
||||
max_bleeding_stage = 3 //clotted stump and above can bleed.
|
||||
stages = list(
|
||||
"ripped stump" = damage_amt*1.3,
|
||||
"bloody stump" = damage_amt,
|
||||
@@ -332,7 +331,6 @@ datum/wound/cut/massive
|
||||
)
|
||||
if(DROPLIMB_BURN)
|
||||
damage_type = BURN
|
||||
max_bleeding_stage = 1
|
||||
stages = list(
|
||||
"ripped charred stump" = damage_amt*1.3,
|
||||
"charred stump" = damage_amt,
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
///// Z-Level stuff
|
||||
if(ptype<6 || ptype>8 && !(ptype==11 || ptype==12))
|
||||
if(!(ptype in list(6, 7, 8, 11, 12, 13, 14)))
|
||||
///// Z-Level stuff
|
||||
icon_state = "con[base_state]"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user