no relative pathing (#16234)

* the voices win in the end

* cleanup

* changelog

* secure.dm hates me

* make_exact_fit() in initialize instead of whatever was happening before
This commit is contained in:
harryob
2023-04-30 21:10:13 +00:00
committed by GitHub
parent ad29453d4a
commit 578bae6f6f
144 changed files with 9951 additions and 9675 deletions
+36 -34
View File
@@ -51,8 +51,9 @@
desc = "This item type is used to randomly spawn a given object at round-start"
icon_state = "x3"
var/spawn_object = null
item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/single/item_to_spawn()
return ispath(spawn_object) ? spawn_object : text2path(spawn_object)
/obj/random/tool
name = "random tool"
@@ -1487,46 +1488,47 @@
/obj/item/toy/mech/honk
)
has_postspawn = TRUE
post_spawn(obj/thing)
var/list/frames = list(
/obj/item/gun/custom_ka/frame01 = 1,
/obj/item/gun/custom_ka/frame02 = 2,
/obj/item/gun/custom_ka/frame03 = 3,
/obj/item/gun/custom_ka/frame04 = 2,
/obj/item/gun/custom_ka/frame05 = 1
)
var/list/cells = list(
/obj/item/custom_ka_upgrade/cells/cell01 = 2,
/obj/item/custom_ka_upgrade/cells/cell02 = 3,
/obj/item/custom_ka_upgrade/cells/cell03 = 2,
/obj/item/custom_ka_upgrade/cells/cell04 = 1,
/obj/item/custom_ka_upgrade/cells/cell05 = 1
)
/obj/random/custom_ka/post_spawn(obj/thing)
var/list/frames = list(
/obj/item/gun/custom_ka/frame01 = 1,
/obj/item/gun/custom_ka/frame02 = 2,
/obj/item/gun/custom_ka/frame03 = 3,
/obj/item/gun/custom_ka/frame04 = 2,
/obj/item/gun/custom_ka/frame05 = 1
)
var/list/barrels = list(
/obj/item/custom_ka_upgrade/barrels/barrel01 = 2,
/obj/item/custom_ka_upgrade/barrels/barrel02 = 3,
/obj/item/custom_ka_upgrade/barrels/barrel03 = 2,
/obj/item/custom_ka_upgrade/barrels/barrel04 = 1,
/obj/item/custom_ka_upgrade/barrels/barrel05 = 1
)
var/list/cells = list(
/obj/item/custom_ka_upgrade/cells/cell01 = 2,
/obj/item/custom_ka_upgrade/cells/cell02 = 3,
/obj/item/custom_ka_upgrade/cells/cell03 = 2,
/obj/item/custom_ka_upgrade/cells/cell04 = 1,
/obj/item/custom_ka_upgrade/cells/cell05 = 1
)
var/frame_type = pickweight(frames)
var/obj/item/gun/custom_ka/spawned_frame = new frame_type(thing.loc)
var/list/barrels = list(
/obj/item/custom_ka_upgrade/barrels/barrel01 = 2,
/obj/item/custom_ka_upgrade/barrels/barrel02 = 3,
/obj/item/custom_ka_upgrade/barrels/barrel03 = 2,
/obj/item/custom_ka_upgrade/barrels/barrel04 = 1,
/obj/item/custom_ka_upgrade/barrels/barrel05 = 1
)
var/cell_type = pickweight(cells)
spawned_frame.installed_cell = new cell_type(spawned_frame)
var/frame_type = pickweight(frames)
var/obj/item/gun/custom_ka/spawned_frame = new frame_type(thing.loc)
var/barrel_type = pickweight(barrels)
spawned_frame.installed_barrel = new barrel_type(spawned_frame)
var/cell_type = pickweight(cells)
spawned_frame.installed_cell = new cell_type(spawned_frame)
spawned_frame.installed_upgrade_chip = new /obj/item/custom_ka_upgrade/upgrade_chips/capacity(spawned_frame)
var/barrel_type = pickweight(barrels)
spawned_frame.installed_barrel = new barrel_type(spawned_frame)
spawned_frame.update_icon()
spawned_frame.update_stats()
spawned_frame.installed_upgrade_chip = new /obj/item/custom_ka_upgrade/upgrade_chips/capacity(spawned_frame)
qdel(thing)
spawned_frame.update_icon()
spawned_frame.update_stats()
qdel(thing)
/obj/random/prebuilt_ka
name = "random prebuilt kinetic accelerator"