mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 14:47:50 +01:00
Merge branch 'master' into Kbraidtweaks
This commit is contained in:
@@ -20,7 +20,10 @@
|
||||
var/light_intensity = null // Ditto. Not implemented yet.
|
||||
var/mob_overlay_state = null // Icon_state for an overlay to apply to a (human) mob while this exists. This is actually implemented.
|
||||
var/client_color = null // If set, the client will have the world be shown in this color, from their perspective.
|
||||
var/wire_colors_replace = null // If set, the client will have wires replaced by the given replacement list. For colorblindness.
|
||||
var/wire_colors_replace = null // If set, the client will have wires replaced by the given replacement list. For colorblindness. //VOREStation Add
|
||||
var/list/filter_parameters = null // If set, will add a filter to the holder with the parameters in this var. Must be a list.
|
||||
var/filter_priority = 1 // Used to make filters be applied in a specific order, if that is important.
|
||||
var/filter_instance = null // Instance of a filter created with the `filter_parameters` list. This exists to make `animate()` calls easier. Don't set manually.
|
||||
|
||||
// Now for all the different effects.
|
||||
// Percentage modifiers are expressed as a multipler. (e.g. +25% damage should be written as 1.25)
|
||||
@@ -83,6 +86,8 @@
|
||||
holder.update_transform()
|
||||
if(client_color)
|
||||
holder.update_client_color()
|
||||
if(LAZYLEN(filter_parameters))
|
||||
holder.remove_filter(REF(src))
|
||||
qdel(src)
|
||||
|
||||
// Override this for special effects when it gets added to the mob.
|
||||
@@ -151,6 +156,9 @@
|
||||
update_transform()
|
||||
if(mod.client_color)
|
||||
update_client_color()
|
||||
if(LAZYLEN(mod.filter_parameters))
|
||||
add_filter(REF(mod), mod.filter_priority, mod.filter_parameters)
|
||||
mod.filter_instance = get_filter(REF(mod))
|
||||
|
||||
return mod
|
||||
|
||||
|
||||
@@ -388,3 +388,13 @@ the artifact triggers the rage.
|
||||
if(holder.stat != DEAD)
|
||||
holder.visible_message("<span class='alien'>\The [holder] collapses, the life draining from their body.</span>")
|
||||
holder.death()
|
||||
|
||||
/datum/modifier/outline_test
|
||||
name = "Outline Test"
|
||||
desc = "This only exists to prove filter effects work and gives an example of how to animate() the resulting filter object."
|
||||
|
||||
filter_parameters = list(type = "outline", size = 1, color = "#FFFFFF", flags = OUTLINE_SHARP)
|
||||
|
||||
/datum/modifier/outline_test/tick()
|
||||
animate(filter_instance, size = 3, time = 0.25 SECONDS)
|
||||
animate(size = 1, 0.25 SECONDS)
|
||||
@@ -68,9 +68,9 @@
|
||||
if(health <= 0)
|
||||
death()
|
||||
return
|
||||
weakened = 0
|
||||
stunned = 0
|
||||
paralysis = 0
|
||||
SetWeakened(0)
|
||||
SetStunned(0)
|
||||
SetParalysis(0)
|
||||
|
||||
if(on && !client && !busy)
|
||||
spawn(0)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
adjustHalLoss(-3)
|
||||
if (mind)
|
||||
if(mind.active && client != null)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
AdjustSleeping(-1)
|
||||
blinded = 1
|
||||
set_stat(UNCONSCIOUS)
|
||||
else if(resting)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/mob/living/carbon/brain/Login()
|
||||
..()
|
||||
sleeping = 0
|
||||
SetSleeping(0)
|
||||
@@ -136,7 +136,7 @@
|
||||
to_chat(src, "<span class='danger'>Oh god, everything's spinning!</span>")
|
||||
Confuse(max(0,confuse_dur))
|
||||
if(species.emp_sensitivity & EMP_WEAKEN)
|
||||
if(weaken_dur >= 1)
|
||||
if(weaken_dur >= 1)
|
||||
to_chat(src, "<span class='danger'>Your limbs go slack!</span>")
|
||||
Weaken(max(0,weaken_dur))
|
||||
//physical damage block, deals (minor-4) 5-15, 10-20, 15-25, 20-30 (extreme-1) of *each* type
|
||||
@@ -287,7 +287,7 @@
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [T.him] up!</span>", \
|
||||
"<span class='notice'>You shake [src], but [T.he] [T.does] not respond... Maybe [T.he] [T.has] S.S.D?</span>")
|
||||
else if(lying || src.sleeping)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
AdjustSleeping(-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
if(H) H.in_stasis = 0 //VOREStation Add - Just In Case
|
||||
@@ -403,7 +403,7 @@
|
||||
to_chat(usr, "<font color='red'>You are already sleeping</font>")
|
||||
return
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.sleeping = 20 //Short nap
|
||||
usr.AdjustSleeping(20)
|
||||
|
||||
/mob/living/carbon/Bump(atom/A)
|
||||
if(now_pushing)
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
message = "faints."
|
||||
if(sleeping)
|
||||
return //Can't faint while asleep
|
||||
sleeping += 10 //Short-short nap
|
||||
Sleeping(10)
|
||||
m_type = 1
|
||||
|
||||
if("cough", "coughs")
|
||||
|
||||
@@ -1676,8 +1676,8 @@
|
||||
if(species?.flags & NO_BLOOD)
|
||||
bloodtrail = 0
|
||||
else
|
||||
var/blood_volume = round((vessel.get_reagent_amount("blood")/species.blood_volume)*100)
|
||||
if(blood_volume < BLOOD_VOLUME_SURVIVE)
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
if(blood_volume < species?.blood_volume*species?.blood_level_fatal)
|
||||
bloodtrail = 0 //Most of it's gone already, just leave it be
|
||||
else
|
||||
vessel.remove_reagent("blood", 1)
|
||||
@@ -1687,6 +1687,26 @@
|
||||
T.add_blood(src)
|
||||
. = ..()
|
||||
|
||||
// Tries to turn off item-based things that let you see through walls, like mesons.
|
||||
// Certain stuff like genetic xray vision is allowed to be kept on.
|
||||
/mob/living/carbon/human/disable_spoiler_vision()
|
||||
// Glasses.
|
||||
if(istype(glasses, /obj/item/clothing/glasses))
|
||||
var/obj/item/clothing/glasses/goggles = glasses
|
||||
if(goggles.active && (goggles.vision_flags & (SEE_TURFS|SEE_OBJS)))
|
||||
goggles.toggle_active(src)
|
||||
to_chat(src, span("warning", "Your [goggles.name] have suddenly turned off!"))
|
||||
|
||||
// RIGs.
|
||||
var/obj/item/weapon/rig/rig = get_rig()
|
||||
if(istype(rig) && rig.visor?.active && rig.visor.vision?.glasses)
|
||||
var/obj/item/clothing/glasses/rig_goggles = rig.visor.vision.glasses
|
||||
if(rig_goggles.vision_flags & (SEE_TURFS|SEE_OBJS))
|
||||
rig.visor.deactivate()
|
||||
to_chat(src, span("warning", "\The [rig]'s visor has shuddenly deactivated!"))
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/reduce_cuff_time()
|
||||
if(istype(gloves, /obj/item/clothing/gloves/gauntlets/rig))
|
||||
return 2
|
||||
|
||||
@@ -1103,7 +1103,7 @@
|
||||
drowsyness = max(0, drowsyness - 1)
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if (prob(5))
|
||||
sleeping += 1
|
||||
Sleeping(1)
|
||||
Paralyse(5)
|
||||
|
||||
// If you're dirty, your gloves will become dirty, too.
|
||||
@@ -1258,7 +1258,14 @@
|
||||
if(blinded)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
|
||||
|
||||
else
|
||||
clear_fullscreens()
|
||||
clear_alert("blind")
|
||||
|
||||
if(blinded)
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
|
||||
else if(!machine)
|
||||
clear_fullscreens()
|
||||
clear_alert("blind")
|
||||
@@ -1321,6 +1328,11 @@
|
||||
sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : see_invisible_default
|
||||
|
||||
// Do this early so certain stuff gets turned off before vision is assigned.
|
||||
var/area/A = get_area(src)
|
||||
if(A?.no_spoilers)
|
||||
disable_spoiler_vision()
|
||||
|
||||
if(XRAY in mutations)
|
||||
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
see_in_dark = 8
|
||||
@@ -1591,7 +1603,7 @@
|
||||
if(Pump)
|
||||
temp += Pump.standard_pulse_level - PULSE_NORM
|
||||
|
||||
if(round(vessel.get_reagent_amount("blood")) <= BLOOD_VOLUME_BAD) //how much blood do we have
|
||||
if(round(vessel.get_reagent_amount("blood")) <= species.blood_volume*species.blood_level_danger) //how much blood do we have
|
||||
temp = temp + 3 //not enough :(
|
||||
|
||||
if(status_flags & FAKEDEATH)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/datum/species/vox
|
||||
default_language = LANGUAGE_GALCOM
|
||||
secondary_langs = list(LANGUAGE_VOX)
|
||||
speech_sounds = list() // Remove obnoxious noises on every single 'say'. Should really only be a thing for event-exclusive species like benos.
|
||||
@@ -43,6 +43,10 @@
|
||||
var/short_sighted // Permanent weldervision.
|
||||
var/blood_volume = 560 // Initial blood volume.
|
||||
var/bloodloss_rate = 1 // Multiplier for how fast a species bleeds out. Higher = Faster
|
||||
var/blood_level_safe = 0.85 //"Safe" blood level; above this, you're OK
|
||||
var/blood_level_warning = 0.75 //"Warning" blood level; above this, you're a bit woozy and will have low-level oxydamage (no more than 20, or 15 with inap)
|
||||
var/blood_level_danger = 0.6 //"Danger" blood level; above this, you'll rapidly take up to 50 oxyloss, and it will then steadily accumulate at a lower rate
|
||||
var/blood_level_fatal = 0.4 //"Fatal" blood level; below this, you take extremely high oxydamage
|
||||
var/hunger_factor = 0.05 // Multiplier for hunger.
|
||||
var/active_regen_mult = 1 // Multiplier for 'Regenerate' power speed, in human_powers.dm
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
|
||||
//Set up a mob
|
||||
H.species = new_copy
|
||||
H.maxHealth = new_copy.total_health
|
||||
H.hunger_rate = new_copy.hunger_factor
|
||||
|
||||
if(new_copy.holder_type)
|
||||
H.holder_type = new_copy.holder_type
|
||||
|
||||
@@ -298,6 +298,12 @@
|
||||
return
|
||||
..()
|
||||
|
||||
var/global/list/disallowed_protean_accessories = list(
|
||||
/obj/item/clothing/accessory/holster,
|
||||
/obj/item/clothing/accessory/storage,
|
||||
/obj/item/clothing/accessory/armor
|
||||
)
|
||||
|
||||
// Helpers - Unsafe, WILL perform change.
|
||||
/mob/living/carbon/human/proc/nano_intoblob()
|
||||
var/panel_was_up = FALSE
|
||||
@@ -343,7 +349,8 @@
|
||||
var/obj/item/clothing/uniform = w_uniform
|
||||
if(LAZYLEN(uniform.accessories))
|
||||
for(var/obj/item/clothing/accessory/A in uniform.accessories)
|
||||
uniform.remove_accessory(null,A) //First param is user, but adds fingerprints and messages
|
||||
if(is_type_in_list(A, disallowed_protean_accessories))
|
||||
uniform.remove_accessory(null,A) //First param is user, but adds fingerprints and messages
|
||||
|
||||
//Size update
|
||||
blob.transform = matrix()*size_multiplier
|
||||
|
||||
@@ -68,16 +68,16 @@
|
||||
/* YW Commented out will be moved to Positive/Negative for map balance
|
||||
/datum/trait/coldadapt
|
||||
name = "Cold-Adapted"
|
||||
desc = "You are able to withstand much colder temperatures than other species, and can even be comfortable in extremely cold environments. You are also more vulnerable to hot environments as a consequence of these adaptations."
|
||||
desc = "You are able to withstand much colder temperatures than other species, and can even be comfortable in extremely cold environments. You are also more vulnerable to hot environments, and have a lower body temperature as a consequence of these adaptations."
|
||||
cost = 0
|
||||
var_changes = list("cold_level_1" = 200, "cold_level_2" = 150, "cold_level_3" = 90, "breath_cold_level_1" = 180, "breath_cold_level_2" = 100, "breath_cold_level_3" = 60, "cold_discomfort_level" = 210, "heat_level_1" = 305, "heat_level_2" = 360, "heat_level_3" = 700, "breath_heat_level_1" = 345, "breath_heat_level_2" = 380, "breath_heat_level_3" = 780, "heat_discomfort_level" = 295)
|
||||
var_changes = list("cold_level_1" = 200, "cold_level_2" = 150, "cold_level_3" = 90, "breath_cold_level_1" = 180, "breath_cold_level_2" = 100, "breath_cold_level_3" = 60, "cold_discomfort_level" = 210, "heat_level_1" = 305, "heat_level_2" = 360, "heat_level_3" = 700, "breath_heat_level_1" = 345, "breath_heat_level_2" = 380, "breath_heat_level_3" = 780, "heat_discomfort_level" = 295, "body_temperature" = 290)
|
||||
excludes = list(/datum/trait/hotadapt)
|
||||
|
||||
/datum/trait/hotadapt
|
||||
name = "Heat-Adapted"
|
||||
desc = "You are able to withstand much hotter temperatures than other species, and can even be comfortable in extremely hot environments. You are also more vulnerable to cold environments as a consequence of these adaptations."
|
||||
desc = "You are able to withstand much hotter temperatures than other species, and can even be comfortable in extremely hot environments. You are also more vulnerable to cold environments, and have a higher body temperature as a consequence of these adaptations."
|
||||
cost = 0
|
||||
var_changes = list("heat_level_1" = 420, "heat_level_2" = 460, "heat_level_3" = 1100, "breath_heat_level_1" = 440, "breath_heat_level_2" = 510, "breath_heat_level_3" = 1500, "heat_discomfort_level" = 390, "cold_level_1" = 280, "cold_level_2" = 220, "cold_level_3" = 140, "breath_cold_level_1" = 260, "breath_cold_level_2" = 240, "breath_cold_level_3" = 120, "cold_discomfort_level" = 280)
|
||||
var_changes = list("heat_level_1" = 420, "heat_level_2" = 460, "heat_level_3" = 1100, "breath_heat_level_1" = 440, "breath_heat_level_2" = 510, "breath_heat_level_3" = 1500, "heat_discomfort_level" = 390, "cold_level_1" = 280, "cold_level_2" = 220, "cold_level_3" = 140, "breath_cold_level_1" = 260, "breath_cold_level_2" = 240, "breath_cold_level_3" = 120, "cold_discomfort_level" = 280, "body_temperature" = 330)
|
||||
excludes = list(/datum/trait/coldadapt)
|
||||
YW change end */
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@
|
||||
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
|
||||
|
||||
// Handle re-running ambience to mobs if they've remained in an area.
|
||||
handle_ambience()
|
||||
|
||||
//stuff in the stomach
|
||||
//handle_stomach() //VOREStation Code
|
||||
|
||||
@@ -89,6 +92,12 @@
|
||||
/mob/living/proc/handle_stomach()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_ambience() // If you're in an ambient area and have not moved out of it for x time, we're going to play ambience again to you, to help break up the silence.
|
||||
if(world.time >= (lastareachange + 30 SECONDS)) // Every 30 seconds, we're going to run a 35% chance to play ambience.
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
A.play_ambience(src)
|
||||
|
||||
/mob/living/proc/update_pulling()
|
||||
if(pulling)
|
||||
if(incapacitated())
|
||||
@@ -126,7 +135,7 @@
|
||||
|
||||
/mob/living/proc/handle_weakened()
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
AdjustWeakened(-1)
|
||||
throw_alert("weakened", /obj/screen/alert/weakened)
|
||||
else
|
||||
clear_alert("weakened")
|
||||
@@ -181,7 +190,7 @@
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
else
|
||||
clear_alert("blind")
|
||||
|
||||
|
||||
if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
|
||||
|
||||
@@ -491,6 +491,15 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(stunned > 0)
|
||||
add_status_indicator("stunned")
|
||||
|
||||
/mob/living/SetStunned(amount)
|
||||
..()
|
||||
if(stunned <= 0)
|
||||
remove_status_indicator("stunned")
|
||||
else
|
||||
add_status_indicator("stunned")
|
||||
|
||||
/mob/living/AdjustStunned(amount)
|
||||
if(amount > 0)
|
||||
@@ -498,12 +507,25 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(stunned <= 0)
|
||||
remove_status_indicator("stunned")
|
||||
else
|
||||
add_status_indicator("stunned")
|
||||
|
||||
/mob/living/Weaken(amount)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(weakened > 0)
|
||||
add_status_indicator("weakened")
|
||||
|
||||
/mob/living/SetWeakened(amount)
|
||||
..()
|
||||
if(weakened <= 0)
|
||||
remove_status_indicator("weakened")
|
||||
else
|
||||
add_status_indicator("weakened")
|
||||
|
||||
/mob/living/AdjustWeakened(amount)
|
||||
if(amount > 0)
|
||||
@@ -511,12 +533,25 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(weakened <= 0)
|
||||
remove_status_indicator("weakened")
|
||||
else
|
||||
add_status_indicator("weakened")
|
||||
|
||||
/mob/living/Paralyse(amount)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(paralysis > 0)
|
||||
add_status_indicator("paralysis")
|
||||
|
||||
/mob/living/SetParalysis(amount)
|
||||
..()
|
||||
if(paralysis <= 0)
|
||||
remove_status_indicator("paralysis")
|
||||
else
|
||||
add_status_indicator("paralysis")
|
||||
|
||||
/mob/living/AdjustParalysis(amount)
|
||||
if(amount > 0)
|
||||
@@ -524,12 +559,25 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(paralysis <= 0)
|
||||
remove_status_indicator("paralysis")
|
||||
else
|
||||
add_status_indicator("paralysis")
|
||||
|
||||
/mob/living/Sleeping(amount)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(sleeping > 0)
|
||||
add_status_indicator("sleeping")
|
||||
|
||||
/mob/living/SetSleeping(amount)
|
||||
..()
|
||||
if(sleeping <= 0)
|
||||
remove_status_indicator("sleeping")
|
||||
else
|
||||
add_status_indicator("sleeping")
|
||||
|
||||
/mob/living/AdjustSleeping(amount)
|
||||
if(amount > 0)
|
||||
@@ -537,12 +585,25 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(sleeping <= 0)
|
||||
remove_status_indicator("sleeping")
|
||||
else
|
||||
add_status_indicator("sleeping")
|
||||
|
||||
/mob/living/Confuse(amount)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(confused > 0)
|
||||
add_status_indicator("confused")
|
||||
|
||||
/mob/living/SetConfused(amount)
|
||||
..()
|
||||
if(confused <= 0)
|
||||
remove_status_indicator("confused")
|
||||
else
|
||||
add_status_indicator("confused")
|
||||
|
||||
/mob/living/AdjustConfused(amount)
|
||||
if(amount > 0)
|
||||
@@ -550,12 +611,25 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(confused <= 0)
|
||||
remove_status_indicator("confused")
|
||||
else
|
||||
add_status_indicator("confused")
|
||||
|
||||
/mob/living/Blind(amount)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(eye_blind > 0)
|
||||
add_status_indicator("blinded")
|
||||
|
||||
/mob/living/SetBlinded(amount)
|
||||
..()
|
||||
if(eye_blind <= 0)
|
||||
remove_status_indicator("blinded")
|
||||
else
|
||||
add_status_indicator("blinded")
|
||||
|
||||
/mob/living/AdjustBlinded(amount)
|
||||
if(amount > 0)
|
||||
@@ -563,6 +637,10 @@ default behaviour is:
|
||||
if(!isnull(M.disable_duration_percent))
|
||||
amount = round(amount * M.disable_duration_percent)
|
||||
..(amount)
|
||||
if(eye_blind <= 0)
|
||||
remove_status_indicator("blinded")
|
||||
else
|
||||
add_status_indicator("blinded")
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
@@ -827,10 +905,10 @@ default behaviour is:
|
||||
|
||||
if(pulling) // we were pulling a thing and didn't lose it during our move.
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
|
||||
|
||||
if(pulling.anchored || !isturf(pulling.loc))
|
||||
stop_pulling()
|
||||
|
||||
|
||||
else if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
|
||||
// If it is too far away or across z-levels from old location, stop pulling.
|
||||
if(get_dist(pulling.loc, oldloc) > 1 || pulling.loc.z != oldloc?.z)
|
||||
@@ -846,7 +924,7 @@ default behaviour is:
|
||||
stop_pulling()
|
||||
|
||||
if(!isturf(loc))
|
||||
return
|
||||
return
|
||||
else if(lastarea?.has_gravity == 0)
|
||||
inertial_drift()
|
||||
//VOREStation Edit Start
|
||||
@@ -863,7 +941,7 @@ default behaviour is:
|
||||
if(Process_Spacemove(1))
|
||||
inertia_dir = 0
|
||||
return
|
||||
|
||||
|
||||
var/locthen = loc
|
||||
spawn(5)
|
||||
if(!anchored && !pulledby && loc == locthen)
|
||||
@@ -1145,22 +1223,29 @@ default behaviour is:
|
||||
/mob/living/proc/is_sentient()
|
||||
return TRUE
|
||||
|
||||
/mob/living/get_icon_scale_x()
|
||||
. = ..()
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.icon_scale_x_percent))
|
||||
. *= M.icon_scale_x_percent
|
||||
|
||||
/mob/living/get_icon_scale_y()
|
||||
. = ..()
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.icon_scale_y_percent))
|
||||
. *= M.icon_scale_y_percent
|
||||
|
||||
/mob/living/update_transform()
|
||||
// First, get the correct size.
|
||||
var/desired_scale_x = size_multiplier //VOREStation edit
|
||||
var/desired_scale_y = size_multiplier //VOREStation edit
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.icon_scale_x_percent))
|
||||
desired_scale_x *= M.icon_scale_x_percent
|
||||
if(!isnull(M.icon_scale_y_percent))
|
||||
desired_scale_y *= M.icon_scale_y_percent
|
||||
|
||||
// Now for the regular stuff.
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(desired_scale_x, desired_scale_y)
|
||||
M.Translate(0, (vis_height/2)*(desired_scale_y-1)) //VOREStation edit
|
||||
src.transform = M //VOREStation edit
|
||||
handle_status_indicators()
|
||||
|
||||
// This handles setting the client's color variable, which makes everything look a specific color.
|
||||
// This proc is here so it can be called without needing to check if the client exists, or if the client relogs.
|
||||
@@ -1350,3 +1435,8 @@ default behaviour is:
|
||||
clear_alert("weightless")
|
||||
else
|
||||
throw_alert("weightless", /obj/screen/alert/weightless)
|
||||
|
||||
// Tries to turn off things that let you see through walls, like mesons.
|
||||
// Each mob does vision a bit differently so this is just for inheritence and also so overrided procs can make the vision apply instantly if they call `..()`.
|
||||
/mob/living/proc/disable_spoiler_vision()
|
||||
handle_vision()
|
||||
@@ -1,3 +1,3 @@
|
||||
/mob/living/silicon/Login()
|
||||
sleeping = 0
|
||||
SetSleeping(0)
|
||||
..()
|
||||
@@ -11,7 +11,7 @@ GLOBAL_LIST_EMPTY(robot_custom_icons)
|
||||
GLOB.robot_custom_icons = list()
|
||||
for(var/line in lines)
|
||||
//split entry into ckey and real_name
|
||||
var/list/split_idx = splittext(line, "-") //this works if ckeys and borg names cannot contain dashes, and splittext starts from the beginning ~Mech
|
||||
var/list/split_idx = splittext(line, "|") //this was set to a - before, even though a good 30% of the borgs I see have a - in their name, set it to | instead
|
||||
if(!split_idx || !split_idx.len)
|
||||
continue //bad entry
|
||||
|
||||
@@ -32,3 +32,9 @@ GLOBAL_LIST_EMPTY(robot_custom_icons)
|
||||
icon = CUSTOM_ITEM_SYNTH
|
||||
if(icon_state == "robot")
|
||||
icon_state = "[ckey]-[sprite_name]-Standard" //Compliant with robot.dm line 236 ~Mech
|
||||
// To summarize, if you want to add a whitelisted borg sprite, you have to
|
||||
// 1. Add ckey and character name to config/custom_sprites, separated by a |
|
||||
// 2. Add your custom sprite to custom_synthetic.dmi under icon/mob/custom_synthetic.dmi
|
||||
// 3. Name the sprite, and all of its components, as ckey-charname-module
|
||||
// Note that, due to the last couple lines of code, your sprite may appear invisible until you select a module.
|
||||
// You can fix this by adding a 'standard' configuration, or you could probably just ignore it if you're lazy.
|
||||
@@ -213,6 +213,7 @@
|
||||
user.visible_message("[user] begins to lap up water from [target.name].", "<span class='notice'>You begin to lap up water from [target.name].</span>")
|
||||
if(do_after (user, 50))
|
||||
water.add_charge(50)
|
||||
to_chat(src, "You refill some of your water reserves.")
|
||||
else if(water.energy < 5)
|
||||
to_chat(user, "<span class='notice'>Your mouth feels dry. You should drink up some water .</span>")
|
||||
return
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
var/digest_brute = 2
|
||||
var/digest_burn = 3
|
||||
var/recycles = FALSE
|
||||
var/medsensor = TRUE //Does belly sprite come with patient ok/dead light?
|
||||
|
||||
/obj/item/device/dogborg/sleeper/New()
|
||||
..()
|
||||
@@ -426,21 +427,25 @@
|
||||
|
||||
//Well, we HAD one, what happened to them?
|
||||
if(patient in contents)
|
||||
if(patient_laststat != patient.stat)
|
||||
if(cleaning)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else if(patient.stat & DEAD)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = FALSE
|
||||
hound.sleeper_g = TRUE
|
||||
patient_laststat = patient.stat
|
||||
//Update icon
|
||||
hound.updateicon()
|
||||
if(medsensor)
|
||||
if(patient_laststat != patient.stat)
|
||||
if(cleaning)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else if(patient.stat & DEAD)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = FALSE
|
||||
hound.sleeper_g = TRUE
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = TRUE
|
||||
patient_laststat = patient.stat
|
||||
//Update icon
|
||||
hound.updateicon()
|
||||
//Return original patient
|
||||
return(patient)
|
||||
|
||||
@@ -448,17 +453,21 @@
|
||||
else
|
||||
for(var/mob/living/carbon/human/C in contents)
|
||||
patient = C
|
||||
if(cleaning)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else if(patient.stat & DEAD)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
if(medsensor)
|
||||
if(cleaning)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else if(patient.stat & DEAD)
|
||||
hound.sleeper_r = TRUE
|
||||
hound.sleeper_g = FALSE
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = FALSE
|
||||
hound.sleeper_g = TRUE
|
||||
patient_laststat = patient.stat
|
||||
else
|
||||
hound.sleeper_r = FALSE
|
||||
hound.sleeper_g = TRUE
|
||||
hound.sleeper_r = TRUE
|
||||
patient_laststat = patient.stat
|
||||
//Update icon and return new patient
|
||||
hound.updateicon()
|
||||
@@ -659,6 +668,7 @@
|
||||
desc = "Equipment for a K9 unit. A mounted portable-brig that holds criminals."
|
||||
icon_state = "sleeperb"
|
||||
injection_chems = null //So they don't have all the same chems as the medihound!
|
||||
medsensor = FALSE
|
||||
|
||||
/obj/item/device/dogborg/sleeper/compactor //Janihound gut.
|
||||
name = "Garbage Processor"
|
||||
@@ -668,6 +678,7 @@
|
||||
compactor = TRUE
|
||||
recycles = TRUE
|
||||
max_item_count = 25
|
||||
medsensor = FALSE
|
||||
|
||||
/obj/item/device/dogborg/sleeper/compactor/analyzer //sci-borg gut.
|
||||
name = "Digestive Analyzer"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// SetStunned(min(stunned, 30))
|
||||
SetParalysis(min(paralysis, 30))
|
||||
// SetWeakened(min(weakened, 20))
|
||||
sleeping = 0
|
||||
SetSleeping(0)
|
||||
adjustBruteLoss(0)
|
||||
adjustToxLoss(0)
|
||||
adjustOxyLoss(0)
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
if(src.sleeping)
|
||||
Paralyse(3)
|
||||
src.sleeping--
|
||||
AdjustSleeping(-1)
|
||||
|
||||
//if(src.resting) // VOREStation edit. Our borgos would rather not.
|
||||
// Weaken(5)
|
||||
@@ -153,7 +153,13 @@
|
||||
/mob/living/silicon/robot/handle_regular_hud_updates()
|
||||
var/fullbright = FALSE
|
||||
var/seemeson = FALSE
|
||||
if (src.stat == 2 || (XRAY in mutations) || (src.sight_mode & BORGXRAY))
|
||||
|
||||
var/area/A = get_area(src)
|
||||
if(A?.no_spoilers)
|
||||
disable_spoiler_vision()
|
||||
|
||||
|
||||
if (src.stat == DEAD || (XRAY in mutations) || (src.sight_mode & BORGXRAY))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
@@ -187,13 +193,14 @@
|
||||
src.sight &= ~SEE_OBJS
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_NOLIGHTING
|
||||
else if (src.stat != 2)
|
||||
else if (src.stat != DEAD)
|
||||
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
|
||||
|
||||
plane_holder.set_vis(VIS_FULLBRIGHT,fullbright)
|
||||
plane_holder.set_vis(VIS_MESONS,seemeson)
|
||||
..()
|
||||
|
||||
@@ -1142,3 +1142,19 @@
|
||||
if(module_active && istype(module_active,/obj/item/weapon/gripper))
|
||||
var/obj/item/weapon/gripper/G = module_active
|
||||
G.drop_item_nm()
|
||||
|
||||
/mob/living/silicon/robot/disable_spoiler_vision()
|
||||
if(sight_mode & (BORGMESON|BORGMATERIAL|BORGXRAY)) // Whyyyyyyyy have seperate defines.
|
||||
var/i = 0
|
||||
// Borg inventory code is very . . interesting and as such, unequiping a specific item requires jumping through some (for) loops.
|
||||
var/current_selection_index = get_selected_module() // Will be 0 if nothing is selected.
|
||||
for(var/thing in list(module_state_1, module_state_2, module_state_3))
|
||||
i++
|
||||
if(istype(thing, /obj/item/borg/sight))
|
||||
var/obj/item/borg/sight/S = thing
|
||||
if(S.sight_mode & (BORGMESON|BORGMATERIAL|BORGXRAY))
|
||||
select_module(i)
|
||||
uneq_active()
|
||||
|
||||
if(current_selection_index) // Select what the player had before if possible.
|
||||
select_module(current_selection_index)
|
||||
@@ -167,7 +167,8 @@
|
||||
"K9 hound" = "k9",
|
||||
"K9 Alternative" = "k92",
|
||||
"Secborg model V-2" = "secborg",
|
||||
"Borgi" = "borgi-sec"
|
||||
"Borgi" = "borgi-sec",
|
||||
"Otieborg" = "oties"
|
||||
)
|
||||
channels = list("Security" = 1)
|
||||
networks = list(NETWORK_SECURITY)
|
||||
@@ -261,7 +262,7 @@
|
||||
|
||||
var/datum/matter_synth/medicine = new /datum/matter_synth/medicine(2000)
|
||||
synths += medicine
|
||||
|
||||
|
||||
var/obj/item/stack/medical/advanced/clotting/C = new (src)
|
||||
C.uses_charge = 1
|
||||
C.charge_costs = list(1000)
|
||||
@@ -376,8 +377,8 @@
|
||||
name = "Custodial Hound module"
|
||||
sprites = list(
|
||||
"Custodial Hound" = "scrubpup",
|
||||
"Custodial Doggo" = "J9",
|
||||
"Borgi" = "borgi-jani"
|
||||
"Borgi" = "borgi-jani",
|
||||
"Otieborg" = "otiej"
|
||||
)
|
||||
channels = list("Service" = 1)
|
||||
pto_type = PTO_CIVILIAN
|
||||
|
||||
@@ -115,25 +115,7 @@
|
||||
|
||||
/mob/living/silicon/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
return 0//The only effect that can hit them atm is flashes and they still directly edit so this works for now
|
||||
/*
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
stunned = max(stunned,(effect/(blocked+1)))
|
||||
if(WEAKEN)
|
||||
weakened = max(weakened,(effect/(blocked+1)))
|
||||
if(PARALYZE)
|
||||
paralysis = max(paralysis,(effect/(blocked+1)))
|
||||
if(IRRADIATE)
|
||||
radiation += min((effect - (effect*getarmor(null, "rad"))), 0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
stuttering = max(stuttering,(effect/(blocked+1)))
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect/(blocked+1)))
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect/(blocked+1)))
|
||||
updatehealth()
|
||||
return 1*/
|
||||
|
||||
|
||||
/proc/islinked(var/mob/living/silicon/robot/bot, var/mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
if(do_after(src, reload_time))
|
||||
if(reload_sound)
|
||||
playsound(src, reload_sound, 50, 1)
|
||||
playsound(src, reload_sound, 70, 1)
|
||||
reload_count = 0
|
||||
. = TRUE
|
||||
else
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/needs_reload = FALSE // If TRUE, mob needs to reload occasionally
|
||||
var/reload_max = 1 // How many shots the mob gets before it has to reload, will not be used if needs_reload is FALSE
|
||||
var/reload_count = 0 // A counter to keep track of how many shots the mob has fired so far. Reloads when it hits reload_max.
|
||||
var/reload_time = 1 SECONDS // How long it takes for a mob to reload. This is to buy a player a bit of time to run or fight.
|
||||
var/reload_time = 4 SECONDS // How long it takes for a mob to reload. This is to buy a player a bit of time to run or fight.
|
||||
var/reload_sound = 'sound/weapons/flipblade.ogg' // What sound gets played when the mob successfully reloads. Defaults to the same sound as reloading guns. Can be null.
|
||||
|
||||
//Mob melee settings
|
||||
|
||||
@@ -31,6 +31,17 @@
|
||||
/turf/simulated/floor/water
|
||||
)
|
||||
|
||||
var/randomize_location = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/Initialize()
|
||||
..()
|
||||
|
||||
if(!default_pixel_x && randomize_location)
|
||||
default_pixel_x = rand(-12, 12)
|
||||
|
||||
if(!default_pixel_y && randomize_location)
|
||||
default_pixel_y = rand(-6, 10)
|
||||
|
||||
// Makes the AI unable to willingly go on land.
|
||||
/mob/living/simple_mob/animal/passive/fish/IMove(newloc)
|
||||
if(is_type_in_list(newloc, suitable_turf_types))
|
||||
@@ -39,6 +50,11 @@
|
||||
|
||||
// Take damage if we are not in water
|
||||
/mob/living/simple_mob/animal/passive/fish/handle_breathing()
|
||||
if(istype(loc, /obj/item/glass_jar/fish))
|
||||
var/obj/item/glass_jar/fish/F = loc
|
||||
if(F.filled)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && !is_type_in_list(T, suitable_turf_types))
|
||||
if(prob(50))
|
||||
@@ -178,8 +194,8 @@
|
||||
dorsal_image.color = dorsal_color
|
||||
belly_image.color = belly_color
|
||||
|
||||
overlays += dorsal_image
|
||||
overlays += belly_image
|
||||
add_overlay(dorsal_image)
|
||||
add_overlay(belly_image)
|
||||
|
||||
/datum/category_item/catalogue/fauna/rockfish
|
||||
name = "Sivian Fauna - Rock Puffer"
|
||||
@@ -234,6 +250,7 @@
|
||||
/mob/living/simple_mob/animal/passive/fish/rockfish/Initialize()
|
||||
..()
|
||||
head_color = rgb(rand(min_red,max_red), rand(min_green,max_green), rand(min_blue,max_blue))
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_mob/animal/passive/fish/rockfish/update_icon()
|
||||
overlays.Cut()
|
||||
@@ -245,7 +262,7 @@
|
||||
|
||||
head_image.color = head_color
|
||||
|
||||
overlays += head_image
|
||||
add_overlay(head_image)
|
||||
|
||||
/datum/category_item/catalogue/fauna/solarfish
|
||||
name = "Sivian Fauna - Solar Fin"
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
|
||||
pixel_x = -16
|
||||
old_x = -16
|
||||
icon_expected_width = 64
|
||||
icon_expected_height = 64
|
||||
meat_amount = 5
|
||||
|
||||
/mob/living/simple_mob/animal/space/alien/queen
|
||||
@@ -95,6 +97,8 @@
|
||||
|
||||
pixel_x = -16
|
||||
old_x = -16
|
||||
icon_expected_width = 64
|
||||
icon_expected_height = 64
|
||||
|
||||
/mob/living/simple_mob/animal/space/alien/queen/empress/mother
|
||||
name = "alien mother"
|
||||
@@ -111,6 +115,8 @@
|
||||
|
||||
pixel_x = -32
|
||||
old_x = -32
|
||||
icon_expected_width = 96
|
||||
icon_expected_height = 96
|
||||
|
||||
/mob/living/simple_mob/animal/space/alien/death()
|
||||
..()
|
||||
|
||||
@@ -87,6 +87,8 @@
|
||||
|
||||
pixel_x = -16
|
||||
default_pixel_x = -16
|
||||
icon_expected_width = 64
|
||||
icon_expected_height = 32
|
||||
|
||||
meat_amount = 3
|
||||
|
||||
@@ -108,6 +110,8 @@
|
||||
|
||||
pixel_y = -16
|
||||
default_pixel_y = -16
|
||||
icon_expected_width = 64
|
||||
icon_expected_height = 64
|
||||
|
||||
meat_amount = 10
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"rad" = 100)
|
||||
|
||||
/mob/living/simple_mob/construct/juggernaut/Life()
|
||||
weakened = 0
|
||||
SetWeakened(0)
|
||||
..()
|
||||
|
||||
/mob/living/simple_mob/construct/juggernaut/bullet_act(var/obj/item/projectile/P)
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#define STATUS_INDICATOR_Y_OFFSET 2 // Offset from the edge of the icon sprite, so 32 pixels plus whatever number is here.
|
||||
#define STATUS_INDICATOR_ICON_X_SIZE 16 // Don't need to care about the Y size due to the origin being on the bottom side.
|
||||
#define STATUS_INDICATOR_ICON_MARGIN 2 // The space between two status indicators.
|
||||
|
||||
// 'Status indicators' are icons that display over a mob's head, that visually indicate that the mob is suffering
|
||||
// from some kind of effect, such as being stunned, blinded, confused, asleep, etc.
|
||||
// The icons are managed automatically by the mob itself, so that their positions will shift if another indicator is added,
|
||||
// and it will try to always be above the mob sprite, even for larger sprites like xenos.
|
||||
|
||||
/mob/living
|
||||
var/list/status_indicators = null // Will become a list as needed.
|
||||
|
||||
// Adds an icon_state, or image overlay, to the list of indicators to be managed automatically.
|
||||
// Also initializes the list if one doesn't exist.
|
||||
/mob/living/proc/add_status_indicator(image/thing)
|
||||
if(get_status_indicator(thing)) // No duplicates, please.
|
||||
return
|
||||
|
||||
if(!istype(thing, /image))
|
||||
thing = image(icon = 'icons/mob/status_indicators.dmi', icon_state = thing)
|
||||
|
||||
LAZYADD(status_indicators, thing)
|
||||
handle_status_indicators()
|
||||
|
||||
// Similar to above but removes it instead, and nulls the list if it becomes empty as a result.
|
||||
/mob/living/proc/remove_status_indicator(image/thing)
|
||||
thing = get_status_indicator(thing)
|
||||
|
||||
cut_overlay(thing)
|
||||
LAZYREMOVE(status_indicators, thing)
|
||||
handle_status_indicators()
|
||||
|
||||
/mob/living/proc/get_status_indicator(image/thing)
|
||||
if(!istype(thing, /image))
|
||||
for(var/image/I in status_indicators)
|
||||
if(I.icon_state == thing)
|
||||
return I
|
||||
return LAZYACCESS(status_indicators, LAZYFIND(status_indicators, thing))
|
||||
|
||||
// Refreshes the indicators over a mob's head. Should only be called when adding or removing a status indicator with the above procs,
|
||||
// or when the mob changes size visually for some reason.
|
||||
/mob/living/proc/handle_status_indicators()
|
||||
// First, get rid of all the overlays.
|
||||
for(var/thing in status_indicators)
|
||||
cut_overlay(thing)
|
||||
|
||||
if(!LAZYLEN(status_indicators))
|
||||
return
|
||||
|
||||
if(stat == DEAD)
|
||||
return
|
||||
|
||||
// Now put them back on in the right spot.
|
||||
var/our_sprite_x = icon_expected_width * get_icon_scale_x()
|
||||
var/our_sprite_y = icon_expected_height * get_icon_scale_y()
|
||||
|
||||
var/x_offset = our_sprite_x // Add your own offset here later if you want.
|
||||
var/y_offset = our_sprite_y + STATUS_INDICATOR_Y_OFFSET
|
||||
|
||||
// Calculates how 'long' the row of indicators and the margin between them should be.
|
||||
// The goal is to have the center of that row be horizontally aligned with the sprite's center.
|
||||
var/expected_status_indicator_length = (STATUS_INDICATOR_ICON_X_SIZE * status_indicators.len) + (STATUS_INDICATOR_ICON_MARGIN * max(status_indicators.len - 1, 0))
|
||||
var/current_x_position = (x_offset / 2) - (expected_status_indicator_length / 2)
|
||||
|
||||
// In /mob/living's `update_transform()`, the sprite is horizontally shifted when scaled up, so that the center of the sprite doesn't move to the right.
|
||||
// Because of that, this adjustment needs to happen with the future indicator row as well, or it will look bad.
|
||||
current_x_position -= (icon_expected_width / 2) * (get_icon_scale_y() - 1)
|
||||
|
||||
// Now the indicator row can actually be built.
|
||||
for(var/thing in status_indicators)
|
||||
var/image/I = thing
|
||||
|
||||
// This is a semi-HUD element, in a similar manner as medHUDs, in that they're 'above' everything else in the world,
|
||||
// but don't pierce obfuscation layers such as blindness or darkness, unlike actual HUD elements like inventory slots.
|
||||
I.plane = PLANE_STATUS
|
||||
I.layer = HUD_LAYER
|
||||
I.appearance_flags = PIXEL_SCALE|TILE_BOUND|NO_CLIENT_COLOR|RESET_COLOR|RESET_ALPHA|RESET_TRANSFORM|KEEP_APART
|
||||
I.pixel_y = y_offset
|
||||
I.pixel_x = current_x_position
|
||||
add_overlay(I)
|
||||
// Adding the margin space every time saves a conditional check on the last iteration,
|
||||
// and it won't cause any issues since no more icons will be added, and the var is not used for anything else.
|
||||
current_x_position += STATUS_INDICATOR_ICON_X_SIZE + STATUS_INDICATOR_ICON_MARGIN
|
||||
|
||||
|
||||
#undef STATUS_INDICATOR_Y_OFFSET
|
||||
#undef STATUS_INDICATOR_ICON_X_SIZE
|
||||
#undef STATUS_INDICATOR_ICON_MARGIN
|
||||
@@ -66,6 +66,10 @@
|
||||
plane_holder.set_ao(VIS_OBJS, ao_enabled)
|
||||
plane_holder.set_ao(VIS_MOBS, ao_enabled)
|
||||
|
||||
// Status indicators
|
||||
var/status_enabled = client.is_preference_enabled(/datum/client_preference/status_indicators)
|
||||
plane_holder.set_vis(VIS_STATUS, status_enabled)
|
||||
|
||||
//set macro to normal incase it was overriden (like cyborg currently does)
|
||||
client.set_hotkeys_macro("macro", "hotkeymode")
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@
|
||||
var/status_flags = CANSTUN|CANWEAKEN|CANPARALYSE|CANPUSH //bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
|
||||
|
||||
var/area/lastarea = null
|
||||
var/lastareachange = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
return result
|
||||
|
||||
// Can't control ourselves when drifting
|
||||
if(isspace(loc) || my_mob.lastarea?.has_gravity == 0)
|
||||
if((isspace(loc) || my_mob.lastarea?.has_gravity == 0) && !my_mob.in_enclosed_vehicle) //If(In space or last area had no gravity) or(you in vehicle)
|
||||
if(!my_mob.Process_Spacemove(0))
|
||||
return 0
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
// It's just us and another person
|
||||
if(grablist.len == 1)
|
||||
var/mob/M = grablist[1]
|
||||
if(!my_mob.Adjacent(M)) //Oh no, we moved away
|
||||
if(M && !my_mob.Adjacent(M)) //Oh no, we moved away
|
||||
M.Move(pre_move_loc, get_dir(M, pre_move_loc), total_delay) //Have them step towards where we were
|
||||
|
||||
// It's a grab chain
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
my_mob = this_guy
|
||||
|
||||
//It'd be nice to lazy init these but some of them are important to just EXIST. Like without ghost planemaster, you can see ghosts. Go figure.
|
||||
//Note, if you're adding a new plane master, please update code\modules\tgui\modules\camera.dm.
|
||||
|
||||
// 'Utility' planes
|
||||
plane_masters[VIS_FULLBRIGHT] = new /obj/screen/plane_master/fullbright //Lighting system (lighting_overlay objects)
|
||||
@@ -29,6 +30,8 @@
|
||||
plane_masters[VIS_CH_SPECIAL] = new /obj/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff
|
||||
plane_masters[VIS_CH_STATUS_OOC]= new /obj/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD
|
||||
|
||||
plane_masters[VIS_STATUS] = new /obj/screen/plane_master{plane = PLANE_STATUS} //Status indicators that show over mob heads.
|
||||
|
||||
plane_masters[VIS_ADMIN1] = new /obj/screen/plane_master{plane = PLANE_ADMIN1} //For admin use
|
||||
plane_masters[VIS_ADMIN2] = new /obj/screen/plane_master{plane = PLANE_ADMIN2} //For admin use
|
||||
plane_masters[VIS_ADMIN3] = new /obj/screen/plane_master{plane = PLANE_ADMIN3} //For admin use
|
||||
|
||||
Reference in New Issue
Block a user