mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 11:39:18 +00:00
Adds spell cards. They're a wizard spell that shoots a burst of 5 semi-accurate homing cards. Projectiles now have a homing framework, complete with some variant of simulated inaccuracy. The said wizard spell will make use of a new mob component, that allows that mob to select targets by moving their cursor near them. It will give a visual and lock onto the nearest mob to the cursor, allowing the homing projectiles to target on the locked on mob/object. Removes colliding variable from projectiles - We never used it after Bump was refactored to Collide. Images soon when I get the lockon datum-components to work.
25 lines
643 B
Plaintext
25 lines
643 B
Plaintext
/proc/WEAKREF(datum/input)
|
|
if(istype(input) && !QDELETED(input))
|
|
if(istype(input, /datum/weakref))
|
|
return input
|
|
if(!input.weak_reference)
|
|
input.weak_reference = new /datum/weakref(input)
|
|
return input.weak_reference
|
|
|
|
/datum/proc/create_weakref() //Forced creation for admin proccalls
|
|
return WEAKREF(src)
|
|
|
|
/datum/weakref
|
|
var/reference
|
|
|
|
/datum/weakref/New(datum/thing)
|
|
reference = REF(thing)
|
|
|
|
/datum/weakref/Destroy()
|
|
return QDEL_HINT_LETMELIVE //Let BYOND autoGC thiswhen nothing is using it anymore.
|
|
|
|
/datum/weakref/proc/resolve()
|
|
var/datum/D = locate(reference)
|
|
return (!QDELETED(D) && D.weak_reference == src) ? D : null
|
|
|