mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-10 17:42:15 +00:00
* refactor: Movement cross/uncross implementation.
* wrong var name
* fix unit tests dropping PDAs into nowhere
* Add documentation.
* remove unused constants
* say which procs are off limits
* fix simpleanimal z change runtime
* helps not to leave merge conflicts
* kill me
* fix typecast
* fix projectile/table collision
* treadmills don't cause MC to crash anymore
* connect_loc is appropriate here
* fix windoors and teleporters
* fix bonfires and clarify docs
* fix proximity sensors
Tested with sensors in crates, sensors in modsuits
Tested new proximity component with firing projectiles at singularity
Tested new proximity component with portable flashes
Tested new proximity component with facehuggers
* lint
* fix: polarized access helper false positives
* Revert "fix: polarized access helper false positives"
This reverts commit 9814f98cf6.
* hopefully the right change for mindflayer steam
* Changes following cameras
* fix glass table collision
* appears to fix doorspam
* fix ore bags not picking up ore
* fix signatures of /Exited
* remove debug log
* remove duplicate signal registrar
* fix emptying bags into locations
* I don't trust these nested Move calls
* use connect_loc for upgraded resonator fields
* use moveToNullspace
* fix spiderweb crossing
* fix pass checking for windows from a tile off
* fix bluespace closet/transparency issues
* fix mechs not interacting with doors and probably other things
* fix debug
* fix telepete
* add some docs
* stop trying to shoehorn prox monitor into cards
* I should make sure things build
* kill override signal warning
* undef signal
* not many prox monitors survive going off like this
* small fixes to storage
* make moving wormholes respect signals
* use correct signals for pulse demon
* fix pulse heart too
* fix smoke signals
* may have fucked singulo projectile swerve
* fix singulo projectile arcing
* remove duplicate define
* just look at it
* hopefully last cleanups of incorrect signal usage
* fix squeaking
* may god have mercy on my soul
* Apply suggestions from code review
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
* lewc review
* Apply suggestions from code review
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
* burza review
* fix bad args for grenade assemblies
* Update code/__DEFINES/is_helpers.dm
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
---------
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: DGamerL <daan.lyklema@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
126 lines
4.4 KiB
Plaintext
126 lines
4.4 KiB
Plaintext
#define ALWAYS_IN_GRAVITY 2
|
|
|
|
/obj/effect/decal/cleanable
|
|
///when Initialized() its icon_state will be chosen from this list
|
|
var/list/random_icon_states = list()
|
|
///0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
|
var/bloodiness = 0
|
|
///when another of the same type is made on the same tile will they merge --- YES=TRUE; NO=FLASE
|
|
var/mergeable_decal = TRUE
|
|
///prevents Ambient Occlusion effects around it ; Set to GAME_PLANE in Initialize() if on a wall
|
|
plane = FLOOR_PLANE
|
|
///for blood n vomit in zero G --- IN GRAVITY=TRUE; NO GRAVITY=FALSE
|
|
var/gravity_check = TRUE
|
|
hud_possible = list(JANI_HUD)
|
|
|
|
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
|
if(mergeable_decal)
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/cleaning_act(mob/user, atom/cleaner, cleanspeed = 5 SECONDS, text_verb = "scrub out", text_description = " with [cleaner].")
|
|
if(issimulatedturf(loc))
|
|
var/turf/simulated/T = get_turf(src)
|
|
T.cleaning_act(user, cleaner, cleanspeed = cleanspeed, text_verb = text_verb, text_description = text_description, text_targetname = name) //Strings are deliberately "A = A" to avoid overrides
|
|
return
|
|
else
|
|
..()
|
|
|
|
//Add "bloodiness" of this blood's type, to the human's shoes
|
|
//This is on /cleanable because fuck this ancient mess
|
|
/obj/effect/decal/cleanable/blood/proc/on_atom_entered(datum/source, atom/movable/entered)
|
|
if(!ishuman(entered))
|
|
return
|
|
|
|
if(!gravity_check && ishuman(entered))
|
|
bloodyify_human(entered)
|
|
|
|
if(!off_floor)
|
|
var/mob/living/carbon/human/H = entered
|
|
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
|
|
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
|
|
var/hasfeet = TRUE
|
|
if(IS_HORIZONTAL(H) && !H.buckled) //Make people bloody if they're lying down and move into blood
|
|
if(bloodiness > 0 && length(blood_DNA))
|
|
H.add_blood(H.blood_DNA, basecolor)
|
|
if(!l_foot && !r_foot)
|
|
hasfeet = FALSE
|
|
if(H.shoes && blood_state && bloodiness)
|
|
var/obj/item/clothing/shoes/S = H.shoes
|
|
var/add_blood = 0
|
|
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
|
add_blood = BLOOD_GAIN_PER_STEP
|
|
else
|
|
add_blood = bloodiness
|
|
bloodiness -= add_blood
|
|
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS, S.bloody_shoes[blood_state] + add_blood)
|
|
S.bloody_shoes[BLOOD_BASE_ALPHA] = BLOODY_FOOTPRINT_BASE_ALPHA * (alpha/255)
|
|
if(blood_DNA && length(blood_DNA))
|
|
S.add_blood(H.blood_DNA, basecolor)
|
|
S.blood_state = blood_state
|
|
S.blood_color = basecolor
|
|
update_icon()
|
|
H.update_inv_shoes()
|
|
else if(hasfeet && blood_state && bloodiness)//Or feet
|
|
var/add_blood = 0
|
|
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
|
add_blood = BLOOD_GAIN_PER_STEP
|
|
else
|
|
add_blood = bloodiness
|
|
bloodiness -= add_blood
|
|
H.bloody_feet[blood_state] = min(MAX_SHOE_BLOODINESS, H.bloody_feet[blood_state] + add_blood)
|
|
H.bloody_feet[BLOOD_BASE_ALPHA] = BLOODY_FOOTPRINT_BASE_ALPHA * (alpha/255)
|
|
if(!H.feet_blood_DNA)
|
|
H.feet_blood_DNA = list()
|
|
H.blood_state = blood_state
|
|
H.feet_blood_DNA |= blood_DNA.Copy()
|
|
H.feet_blood_color = basecolor
|
|
update_icon()
|
|
H.update_inv_shoes()
|
|
|
|
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
|
return FALSE
|
|
|
|
/obj/effect/decal/cleanable/is_cleanable()
|
|
return TRUE
|
|
|
|
/obj/effect/decal/cleanable/Initialize(mapload)
|
|
. = ..()
|
|
prepare_huds()
|
|
if(should_merge_decal(loc))
|
|
return INITIALIZE_HINT_QDEL
|
|
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
|
|
jani_hud.add_to_hud(src)
|
|
jani_hud_set_sign()
|
|
if(random_icon_states && length(src.random_icon_states) > 0)
|
|
src.icon_state = pick(src.random_icon_states)
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH(src)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
if(iswallturf(loc) && plane == FLOOR_PLANE)
|
|
plane = GAME_PLANE // so they can be seen above walls
|
|
|
|
/obj/effect/decal/cleanable/Destroy()
|
|
if(smoothing_flags)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
var/datum/atom_hud/data/janitor/jani_hud = GLOB.huds[DATA_HUD_JANITOR]
|
|
jani_hud.remove_from_hud(src)
|
|
return ..()
|
|
|
|
/obj/effect/decal/cleanable/proc/should_merge_decal(turf/T)
|
|
if(!T)
|
|
T = loc
|
|
if(isturf(T))
|
|
for(var/obj/effect/decal/cleanable/C in T)
|
|
if(C != src && C.type == type && !QDELETED(C))
|
|
if(C.gravity_check && replace_decal(C))
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/effect/decal/cleanable/proc/check_gravity(turf/T)
|
|
if(isnull(T))
|
|
T = get_turf(src)
|
|
if(gravity_check != ALWAYS_IN_GRAVITY)
|
|
gravity_check = has_gravity(src, T)
|
|
|
|
#undef ALWAYS_IN_GRAVITY
|