mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
refactors pods, new helper for spawning items from pods through code (#58222)
This commit is contained in:
@@ -713,15 +713,18 @@
|
||||
var/chosen = pick_closest_path(object)
|
||||
if(!chosen)
|
||||
return
|
||||
var/turf/T = get_turf(usr)
|
||||
var/turf/target_turf = get_turf(usr)
|
||||
|
||||
if(ispath(chosen, /turf))
|
||||
T.ChangeTurf(chosen)
|
||||
target_turf.ChangeTurf(chosen)
|
||||
else
|
||||
var/obj/structure/closet/supplypod/centcompod/pod = new()
|
||||
var/obj/structure/closet/supplypod/pod = podspawn(list(
|
||||
"target" = target_turf,
|
||||
"path" = /obj/structure/closet/supplypod/centcompod,
|
||||
))
|
||||
//we need to set the admin spawn flag for the spawned items so we do it outside of the podspawn proc
|
||||
var/atom/A = new chosen(pod)
|
||||
A.flags_1 |= ADMIN_SPAWNED_1
|
||||
new /obj/effect/pod_landingzone(T, pod)
|
||||
|
||||
log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Podspawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -34,16 +34,15 @@
|
||||
|
||||
/datum/smite/supply_pod_quick/effect(client/user, mob/living/target)
|
||||
. = ..()
|
||||
|
||||
var/obj/structure/closet/supplypod/centcompod/pod = new
|
||||
pod.damage = SUPPLY_POD_QUICK_DAMAGE
|
||||
pod.explosionSize = list(0, 0, 0, SUPPLY_POD_QUICK_FIRE_RANGE)
|
||||
pod.effectStun = TRUE
|
||||
|
||||
if (!isnull(target_path))
|
||||
new target_path(pod)
|
||||
|
||||
new /obj/effect/pod_landingzone(get_turf(target), pod)
|
||||
podspawn(list(
|
||||
"target" = get_turf(target),
|
||||
"path" = /obj/structure/closet/supplypod/centcompod,
|
||||
"style" = STYLE_CENTCOM,
|
||||
"spawn" = target_path,
|
||||
"damage" = SUPPLY_POD_QUICK_DAMAGE,
|
||||
"explosionSize" = list(0, 0, 0, SUPPLY_POD_QUICK_FIRE_RANGE),
|
||||
"effectStun" = TRUE
|
||||
))
|
||||
|
||||
#undef SUPPLY_POD_QUICK_DAMAGE
|
||||
#undef SUPPLY_POD_QUICK_FIRE_RANGE
|
||||
|
||||
Reference in New Issue
Block a user