Skip to content

Commit

Permalink
Auto stash before cherry pick of "projectiles, artifact tweak"
Browse files Browse the repository at this point in the history
  • Loading branch information
Raeschen committed Feb 23, 2024
1 parent 386a9bb commit 974359f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@
var/hud_state = "unknown" // What HUD state we use when we have ammunition.
var/hud_state_empty = "unknown" // The empty state. DON'T USE _FLASH IN THE NAME OF THE EMPTY STATE STRING, THAT IS ADDED BY THE CODE.

var/obj/item/ammo_casing/my_case = null //ChompEDIT - qdel refs. Ref to the case that created this projectile.

//ChompEDIT START - qdel refs
/obj/item/projectile/New()
if(istype(loc, /obj/item/ammo_casing))
my_case = loc
. = ..()
//ChompEDIT END

/obj/item/projectile/proc/Range()
range--
if(range <= 0 && loc)
Expand Down Expand Up @@ -460,6 +469,12 @@
impacted_mobs = null

qdel(trajectory)

//ChompEDIT START - qdel refs
if(my_case)
if(my_case.BB == src)
my_case.BB = null
//ChompEDIT END
return ..()

/obj/item/projectile/proc/cleanup_beam_segments()
Expand Down
8 changes: 8 additions & 0 deletions code/modules/xenoarcheaology/finds/find_spawning.dm
Original file line number Diff line number Diff line change
Expand Up @@ -709,3 +709,11 @@

if(become_anomalous)
become_anomalous()

//ChompEDIT START - qdel refs
/obj/item/weapon/archaeological_find/Destroy()
if(src.is_anomalous())
var/datum/component/artifact_master/arti_mstr = GetComponent(/datum/component/artifact_master)
arti_mstr.RemoveComponent()
. = ..()
//ChompEDIT END

0 comments on commit 974359f

Please sign in to comment.