Skip to content

Commit

Permalink
Update 10/27 (#19)
Browse files Browse the repository at this point in the history
* fixes reqs emergency doors (#4763)

# About the pull request

The southern emergency shutters weren't properly aligned and it was
bothering me so i wanted to fix it

# Explain why it's good for the game

map fixes are probably always good :)

# Changelog

:cl: Backsea
fix: Fixed the incorrectly placed shutters at req and that one light
near CIC
/:cl:

* Re-removes bridge coats (#4784)

# About the pull request
Partially reverts cmss13-devs/cmss13#4751


# Explain why it's good for the game
Same reasoning as cmss13-devs/cmss13#1193

I fucked up and shouldn't have let this be readded in the first place.
Sprite maintainers can close this PR if they disagree with the
re-removal.

:cl:
del: Re-removed CO/XO bridge coat
/:cl:

* Automatic changelog for PR #4763 [ci skip]

* Add Item & Footprints offsets (#4762)

# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

This:
* Adds transverse offsets to blood footprints
* Adds notable pixel offsets to a few items
* Adds a very slight pixel offset to all items
* Enables rotation for thrown flashlights
* Cause objects exiting a surface (rack/table) to regenerate offset
instead of being stuck at center
* Stops random offsets from overwriting mapped offsets

# Explain why it's good for the game
The goal is to have map visuals more organic when we have a lot of
objects on the ground - targeting in particular items you find readily
in dense areas such as Reqs or a FOB.

Consider this for example, the blood footprints are all aligned, in more
extreme situations (eg WO) it makes an actual "grid" which i personally
find very immersion breaking

![image](https://github.com/cmss13-devs/cmss13/assets/604624/83883e15-a9a0-4a2d-aa90-41c785e047b9)

Adding a slight offset helps counter that:

![image](https://github.com/cmss13-devs/cmss13/assets/604624/504d1baf-385c-4774-86f3-6331c4ac87ed)

# Changelog
:cl:
add: Bloody footprints are now slightly offset to break long visual
straight lines.
fix: Items do not align back to the center of turfs anymore when picked
from a surface (table or rack)
add: Some more items now have offsets on the map display, and they all
can be slightly offset.
/:cl:

---------

Co-authored-by: harryob <[email protected]>

* Automatic changelog for PR #4762 [ci skip]

* reset CAS direct camera on change to avoid duplicated signal handlers (#4755)

# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

Explicitely resets CAS direct guidance camera before setting a new one,
avoiding log being flooded by double signal registrations

```
runtime error: mob_resist overridden. Use override = TRUE to suppress this warning
proc name: stack trace (/proc/stack_trace)
  source file: code/__HELPERS/unsorted.dm,1893
  usr: Honk (/mob/living/carbon/human)
  src: null
  usr.loc: the floor (206,40,4) (/turf/open/shuttle/dropship)
```

* Automatic changelog for PR #4784 [ci skip]

* Adds ~50 tips (#4772)

# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

Adds 38-or-something more tips, with some information on JTAC and
Settings esp for new players.

# Explain why it's good for the game
Nobody seems to bother doing it and the tips get stale over time.


# Changelog
:cl:
add: Added about 50 new tips.
/:cl:

---------

Co-authored-by: ihatethisengine <[email protected]>
Co-authored-by: forest2001 <[email protected]>
Co-authored-by: Zonespace <[email protected]>

* Automatic changelog for PR #4772 [ci skip]

* Rewrite Xeno Acid processing (#4759)

# About the pull request

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

Rewrites scheduling of xeno acid to hopefully finally be done with
dangling references warnings with acid. Also generally improves the
awful code quality

# Explain why it's good for the game
Like, dude, some of these values were outright inversed.
acid_**strength**=2.5 is noted as "250% speed" when it multiplies the
sleep delays. Can't leave code in that state.

# Testing Photographs and Procedure
Summary testing, timing appear correct overall but I'm not entirely
certain it's perfect due to random delays and obtuse code


# Changelog
:cl:
code: Rewrote Xeno Acid ticking code.
fix: Weather updates won't cause turfs to acid melt more rapidly anymore
/:cl:

* Automatic changelog for PR #4759 [ci skip]

* Fixes custom ERT calling (#4783)

# About the pull request
Removes announce_dispatch_message variable as it was a defunct duplicate
of a different variable.
Adds and fixes the announcement settings for custom ERTs.

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: Fixes custom ERT calling broadcasting when it should not.
code: Removes unused vars from ERT procs.
code: Renames the announce var in ERT procs to be more indicative of
what it does.
add: Added a setting on custom ERTs for announcing beacon was received.
/:cl:

* Automatic changelog for PR #4783 [ci skip]

* Vanguard Prae Pierce Refactor + Bugfix (#4641)

# About the pull request

Refactors a bit of `praetorian_powers.dm`

Fixes #4612 

Previously the ability would check for `opacity` alone meaning that it
could be used through doors with windows in and attack people on the
other side. Now checks each turf in turn for any `obj` which has
`density` and `throwpass = 0`

Also changed the visible message as the description for this ability
says the Praetorian is using it's tail but the visible message says
claws.

# Explain why it's good for the game

# Testing Photographs and Procedure


<details>
<summary>Screenshots & Videos</summary>

![dreamseeker_2023-10-11_21-26-49](https://github.com/cmss13-devs/cmss13/assets/25027759/f0d2ae9a-d730-4c86-892f-c1e980e50209)

![dreamseeker_2023-10-11_21-27-31](https://github.com/cmss13-devs/cmss13/assets/25027759/a310dbd3-e9f9-4e07-92b0-872da9254ed4)

</details>


# Changelog
:cl:
refactor: Refactored praetorian pierce ability
fix: Praetorian vanguard can no longer pierce through windowed doors
/:cl:

---------

Co-authored-by: Lee B <[email protected]>

* Automatic changelog for PR #4641 [ci skip]

* Sprites changes for old donator kit (#4702)

# About the pull request

Added sprites for the Juggernaut Donator kit. 

# Explain why it's good for the game

Replaces the old donator set which was using the vanilla syndicate
hardsuit from SS13.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


(https://media.discordapp.net/attachments/1155292420343345182/1158740768677175396/jbTCHQLNCAANgNFAq26gCqW1JQoiUKTlCe6Fw6MLaXkbaVde0BxSxRAQAeyREQFokxREQARQEEypikNABCACiPOu7WoWAWzX9ot68lkQwKIQ02KFgBAQAitBQASwEkPqMYSAEBACXgREAF7EJC8EhIAQWAkCIoCVGFKPIQSEgBDwIiAC8CImeSEgBITAShAQAazEkHoMISAEhIAXARGAFzHJCwEhIARWgoAIYCWG1GMIASEgBLwIiAC8iEleCAgBIbASBP4POBL9vytFWmQAAAAASUVORK5CYII.png?ex=652e7c6f&is=651c076f&hm=12a12a220c0c86891b429785dacdfc940dde3ac22dddd9f346ecf3b05be15459&)

</details>


# Changelog
:cl:
add: Added donator item and sprites
/:cl:

---------

Co-authored-by: Zonespace <[email protected]>

* Automatic changelog for PR #4702 [ci skip]

* Automatic changelog compile [ci skip]

---------

Co-authored-by: Releasethesea <[email protected]>
Co-authored-by: Zonespace <[email protected]>
Co-authored-by: cm13-github <[email protected]>
Co-authored-by: fira <[email protected]>
Co-authored-by: harryob <[email protected]>
Co-authored-by: ihatethisengine <[email protected]>
Co-authored-by: forest2001 <[email protected]>
Co-authored-by: Birdtalon <[email protected]>
Co-authored-by: Lee B <[email protected]>
Co-authored-by: SASoperative <[email protected]>
Co-authored-by: Changelogs <[email protected]>
  • Loading branch information
12 people committed Oct 27, 2023
1 parent bbc6c92 commit 0d211f9
Show file tree
Hide file tree
Showing 57 changed files with 392 additions and 270 deletions.
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var/leaders = 0
spawn_max_amount = TRUE

/datum/emergency_call/cryo_squad/spawn_candidates(announce, override_spawn_loc, announce_dispatch_message)
/datum/emergency_call/cryo_squad/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/cryo_marines_heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

var/leaders = 0

/datum/emergency_call/cryo_squad_equipped/spawn_candidates(announce, override_spawn_loc, announce_dispatch_message)
/datum/emergency_call/cryo_squad_equipped/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
Expand Down
14 changes: 7 additions & 7 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
else
return chosen_call

/datum/game_mode/proc/get_specific_call(call_name, quiet_launch = FALSE, announce = TRUE, is_emergency = TRUE, info = "", announce_dispatch_message = TRUE)
/datum/game_mode/proc/get_specific_call(call_name, quiet_launch = FALSE, announce_incoming = TRUE, info = "")
for(var/datum/emergency_call/E in all_calls) //Loop through all potential candidates
if(E.name == call_name)
var/datum/emergency_call/em_call = new E.type()
em_call.objective_info = info
em_call.activate(quiet_launch, announce, is_emergency, announce_dispatch_message)
em_call.activate(quiet_launch, announce_incoming)
return
error("get_specific_call could not find emergency call '[call_name]'")
return
Expand Down Expand Up @@ -192,7 +192,7 @@
else
to_chat(src, SPAN_WARNING("You did not get enlisted in the response team. Better luck next time!"))

/datum/emergency_call/proc/activate(quiet_launch = FALSE, announce = TRUE, turf/override_spawn_loc, announce_dispatch_message = TRUE)
/datum/emergency_call/proc/activate(quiet_launch = FALSE, announce_incoming = TRUE, turf/override_spawn_loc)
set waitfor = 0
if(!SSticker.mode) //Something horribly wrong with the gamemode ticker
return
Expand All @@ -205,9 +205,9 @@
if(!quiet_launch)
marine_announcement("A distress beacon has been launched from the [MAIN_SHIP_NAME].", "Priority Alert", 'sound/AI/distressbeacon.ogg', logging = ARES_LOG_SECURITY)

addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/emergency_call, spawn_candidates), quiet_launch, announce, override_spawn_loc, announce_dispatch_message), 30 SECONDS)
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/emergency_call, spawn_candidates), quiet_launch, announce_incoming, override_spawn_loc), 30 SECONDS)

/datum/emergency_call/proc/spawn_candidates(quiet_launch = FALSE, announce = TRUE, override_spawn_loc, announce_dispatch_message = TRUE)
/datum/emergency_call/proc/spawn_candidates(quiet_launch = FALSE, announce_incoming = TRUE, override_spawn_loc)
if(SSticker.mode)
SSticker.mode.picked_calls -= src

Expand Down Expand Up @@ -248,7 +248,7 @@
if(I.current)
to_chat(I.current, SPAN_WARNING("You didn't get selected to join the distress team. Better luck next time!"))

if(announce)
if(announce_incoming)
marine_announcement(dispatch_message, "Distress Beacon", 'sound/AI/distressreceived.ogg', logging = ARES_LOG_SECURITY) //Announcement that the Distress Beacon has been answered, does not hint towards the chosen ERT

message_admins("Distress beacon: [src.name] finalized, setting up candidates.")
Expand Down Expand Up @@ -304,7 +304,7 @@
create_member(null, override_spawn_loc)

candidates = list()
if(arrival_message && announce)
if(arrival_message && announce_incoming)
marine_announcement(arrival_message, "Intercepted Tranmission:")

/datum/emergency_call/proc/add_candidate(mob/M)
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
continue

if(groundside_humans > (groundside_xenos * GROUNDSIDE_XENO_MULTIPLIER))
SSticker.mode.get_specific_call("Xenomorphs Groundside (Forsaken)", TRUE, FALSE, FALSE, announce_dispatch_message = FALSE)
SSticker.mode.get_specific_call("Xenomorphs Groundside (Forsaken)", TRUE, FALSE)

TIMER_COOLDOWN_START(src, COOLDOWN_HIJACK_GROUND_CHECK, 1 MINUTES)

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
announce_xeno_wave(wave)
if(xeno_wave == 7)
//Wave when Marines get reinforcements!
get_specific_call("Marine Reinforcements (Squad)", FALSE, TRUE, FALSE)
get_specific_call("Marine Reinforcements (Squad)", FALSE, TRUE)
xeno_wave = min(xeno_wave + 1, WO_MAX_WAVE)


Expand Down
11 changes: 9 additions & 2 deletions code/game/machinery/computer/dropship_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,21 @@
return

var/targ_id = text2num(href_list["cas_camera"])

var/datum/cas_signal/new_signal
for(var/datum/cas_signal/LT as anything in cas_group.cas_signals)
if(LT.target_id == targ_id && LT.valid_signal())
selected_cas_signal = LT
new_signal = LT
break

if(!selected_cas_signal)
if(!new_signal)
to_chat(usr, SPAN_WARNING("Target lost or obstructed."))
return

if(usr in selected_cas_signal?.linked_cam?.viewing_users) // Reset previous cam
remove_from_view(usr)

selected_cas_signal = new_signal
if(selected_cas_signal && selected_cas_signal.linked_cam)
selected_cas_signal.linked_cam.view_directly(usr)
else
Expand Down
149 changes: 85 additions & 64 deletions code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,44 +287,56 @@
opacity = FALSE
anchored = TRUE
unacidable = TRUE
/// Target the acid is melting
var/atom/acid_t
var/ticks = 0
var/acid_strength = 1 //100% speed, normal
var/barricade_damage = 40
/// Duration left to next acid stage
var/remaining = 0
/// Acid stages left to complete melting
var/ticks_left = 3
/// Factor of duration between acid progression
var/acid_delay = 1
/// How much fuel the acid drains from the flare every acid tick
var/flare_damage = 500
var/barricade_damage_ticks = 10 // tick is once per 5 seconds. This tells us how many times it will try damaging barricades
var/barricade_damage = 40
var/in_weather = FALSE

//Sentinel weakest acid
/obj/effect/xenomorph/acid/weak
name = "weak acid"
acid_strength = 2.5 //250% normal speed
acid_delay = 2.5 //250% delay (40% speed)
barricade_damage = 20
flare_damage = 150
icon_state = "acid_weak"

//Superacid
/obj/effect/xenomorph/acid/strong
name = "strong acid"
acid_strength = 0.4 //40% normal speed
acid_delay = 0.4 //40% delay (250% speed)
barricade_damage = 100
flare_damage = 1875
icon_state = "acid_strong"

/obj/effect/xenomorph/acid/New(loc, target)
..(loc)
/obj/effect/xenomorph/acid/Initialize(mapload, atom/target)
. = ..()
acid_t = target
var/strength_t = isturf(acid_t) ? 8:4 // Turf take twice as long to take down.
if(isturf(acid_t))
ticks_left = 7 // Turf take twice as long to take down.
else if(istype(acid_t, /obj/structure/barricade))
ticks_left = 9
handle_weather()
tick(strength_t)

RegisterSignal(SSdcs, COMSIG_GLOB_WEATHER_CHANGE, PROC_REF(handle_weather))
RegisterSignal(acid_t, COMSIG_PARENT_QDELETING, PROC_REF(cleanup))
START_PROCESSING(SSeffects, src)

/obj/effect/xenomorph/acid/Destroy()
acid_t = null
STOP_PROCESSING(SSeffects, src)
. = ..()

/obj/effect/xenomorph/acid/proc/cleanup()
SIGNAL_HANDLER
qdel(src)

/obj/effect/xenomorph/acid/proc/handle_weather()
SIGNAL_HANDLER

Expand All @@ -333,76 +345,85 @@
return

if(SSweather.is_weather_event && locate(acids_area) in SSweather.weather_areas)
acid_strength = acid_strength + (SSweather.weather_event_instance.fire_smothering_strength * 0.33) //smothering_strength is 1-10, acid strength is a multiplier
acid_delay = acid_delay + (SSweather.weather_event_instance.fire_smothering_strength * 0.33) //smothering_strength is 1-10, acid strength is a multiplier
in_weather = SSweather.weather_event_instance.fire_smothering_strength
else
acid_strength = initial(acid_strength)
acid_delay = initial(acid_delay)
in_weather = FALSE

/obj/effect/xenomorph/acid/proc/handle_barricade()
if(prob(in_weather))
visible_message(SPAN_XENOWARNING("Acid on \The [acid_t] subsides!"))
return NONE
var/obj/structure/barricade/cade = acid_t
if(istype(cade))
cade.take_acid_damage(barricade_damage)

/obj/effect/xenomorph/acid/proc/tick(strength_t)
set waitfor = 0
if(!acid_t || !acid_t.loc)
qdel(src)
cade.take_acid_damage(barricade_damage)
return (5 SECONDS)

/obj/effect/xenomorph/acid/proc/handle_flashlight()
var/obj/item/device/flashlight/flare/flare = acid_t
if(flare.fuel <= 0)
return NONE
flare.fuel -= flare_damage
return (rand(15, 25) SECONDS) * acid_delay

/obj/effect/xenomorph/acid/process(delta_time)
remaining -= delta_time * (1 SECONDS)
if(remaining > 0)
return
ticks_left -= 1

if(istype(acid_t,/obj/structure/barricade))
if(++ticks >= barricade_damage_ticks || prob(in_weather))
visible_message(SPAN_XENOWARNING("Acid on \The [acid_t] subsides!"))
qdel(src)
return
handle_barricade()
sleep(50)
.()
return
if(istype(acid_t, /obj/item/device/flashlight/flare))
var/obj/item/device/flashlight/flare/flare = acid_t
if(flare.fuel > 0) //Flares that have fuel in them lose fuel instead of melting
flare.fuel -= flare_damage
sleep(rand(150,250) * (acid_strength))
return .()

if(++ticks >= strength_t)
visible_message(SPAN_XENODANGER("[acid_t] collapses under its own weight into a puddle of goop and undigested debris!"))
playsound(src, "acid_hit", 25, TRUE)

if(istype(acid_t, /turf))
if(istype(acid_t, /turf/closed/wall))
var/turf/closed/wall/W = acid_t
new /obj/effect/acid_hole (W)
else
var/turf/T = acid_t
T.ScrapeAway()
else if (istype(acid_t, /obj/structure/girder))
var/obj/structure/girder/G = acid_t
G.dismantle()
else if(istype(acid_t, /obj/structure/window/framed))
var/obj/structure/window/framed/WF = acid_t
WF.deconstruct(disassembled = FALSE)
else if(istype(acid_t,/obj/item/explosive/plastic))
qdel(acid_t)
var/return_delay = NONE
if(istype(acid_t, /obj/structure/barricade))
return_delay = handle_barricade()
else if(istype(acid_t, /obj/item/device/flashlight/flare))
return_delay = handle_flashlight()
else
return_delay = (rand(20, 30) SECONDS) * acid_delay

else
if(acid_t.contents.len) //Hopefully won't auto-delete things inside melted stuff..
for(var/mob/M in acid_t.contents)
if(acid_t.loc) M.forceMove(acid_t.loc)
QDEL_NULL(acid_t)
if(!ticks_left)
finish_melting()
return PROCESS_KILL

if(!return_delay)
qdel(src)
return
return PROCESS_KILL

switch(strength_t - ticks)
remaining = return_delay

switch(ticks_left)
if(6) visible_message(SPAN_XENOWARNING("\The [acid_t] is barely holding up against the acid!"))
if(4) visible_message(SPAN_XENOWARNING("\The [acid_t]\s structure is being melted by the acid!"))
if(2) visible_message(SPAN_XENOWARNING("\The [acid_t] is struggling to withstand the acid!"))
if(0 to 1) visible_message(SPAN_XENOWARNING("\The [acid_t] begins to crumble under the acid!"))

sleep(rand(200,300) * (acid_strength))
.()
/obj/effect/xenomorph/acid/proc/finish_melting()
visible_message(SPAN_XENODANGER("[acid_t] collapses under its own weight into a puddle of goop and undigested debris!"))
playsound(src, "acid_hit", 25, TRUE)

if(istype(acid_t, /turf))
if(istype(acid_t, /turf/closed/wall))
var/turf/closed/wall/wall = acid_t
new /obj/effect/acid_hole(wall)
else
var/turf/turf = acid_t
turf.ScrapeAway()

else if (istype(acid_t, /obj/structure/girder))
var/obj/structure/girder/girder = acid_t
girder.dismantle()

else if(istype(acid_t, /obj/structure/window/framed))
var/obj/structure/window/framed/window = acid_t
window.deconstruct(disassembled = FALSE)

else if(istype(acid_t, /obj/structure/barricade))
pass() // Don't delete it, just damaj

else
for(var/mob/mob in acid_t)
mob.forceMove(loc)
qdel(acid_t)
qdel(src)

/obj/effect/xenomorph/boiler_bombard
name = "???"
Expand Down
25 changes: 18 additions & 7 deletions code/game/objects/effects/decals/cleanable/blood/tracks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,37 @@

var/list/overlay_images = list()

/// Amount of pixels to shift either way in an attempt to make the tracks more organic
var/transverse_amplitude = 3

/obj/effect/decal/cleanable/blood/tracks/Crossed()
return

/obj/effect/decal/cleanable/blood/tracks/can_place_cleanable()
return FALSE

/obj/effect/decal/cleanable/blood/tracks/proc/add_tracks(direction, tcolor, out)
var/image/I = image(icon = icon, icon_state = out ? going_state : coming_state, dir = direction)
var/mutable_appearance/MA = new(I)
var/image/image = image(icon = icon, icon_state = out ? going_state : coming_state, dir = direction)

var/mutable_appearance/MA = new(image)
MA.color = tcolor
MA.layer = layer
MA.appearance_flags |= RESET_COLOR
I.appearance = MA
image.appearance = MA

switch(direction)
if(NORTH, SOUTH)
image.pixel_x += rand(-transverse_amplitude, transverse_amplitude)
if(EAST, WEST)
image.pixel_y += rand(-transverse_amplitude, transverse_amplitude)

if(out)
LAZYSET(steps_out, "[direction]", I)
LAZYSET(steps_out, "[direction]", image)
else
LAZYSET(steps_in, "[direction]", I)
LAZYSET(steps_in, "[direction]", image)

overlay_images += I
cleanable_turf.overlays += I
overlay_images += image
cleanable_turf.overlays += image

/obj/effect/decal/cleanable/blood/tracks/clear_overlay()
if(length(overlay_images))
Expand Down
12 changes: 12 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@

var/list/inherent_traits

/// How much to offset the item randomly either way alongside X visually
var/ground_offset_x = 0
/// How much to offset the item randomly either way alongside Y visually
var/ground_offset_y = 0

/obj/item/Initialize(mapload, ...)
. = ..()

Expand All @@ -175,6 +180,8 @@
if(flags_item & MOB_LOCK_ON_EQUIP)
AddComponent(/datum/component/id_lock)

scatter_item()

/obj/item/Destroy()
flags_item &= ~DELONDROP //to avoid infinite loop of unequip, delete, unequip, delete.
flags_item &= ~NODROP //so the item is properly unequipped if on a mob.
Expand Down Expand Up @@ -458,6 +465,11 @@ cases. Override_icon_state should be a list.*/
/obj/item/proc/item_action_slot_check(mob/user, slot)
return TRUE

/obj/item/proc/scatter_item()
if(!pixel_x && !pixel_y)
pixel_x = rand(-ground_offset_x, ground_offset_x)
pixel_y = rand(-ground_offset_y, ground_offset_y)

// The mob M is attempting to equip this item into the slot passed through as 'slot'. return TRUE if it can do this and 0 if it can't.
// If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
// Set disable_warning to TRUE if you wish it to not give you outputs.
Expand Down
Loading

0 comments on commit 0d211f9

Please sign in to comment.