Fixes bartenders spawning with one (1) beanbag (#27572)

This commit is contained in:
ShiftyRail
2020-08-17 06:36:36 +02:00
committed by GitHub
parent b18a189483
commit 87013ff4b3
4 changed files with 24 additions and 7 deletions

View File

@@ -37,3 +37,8 @@ var/list/qualityByString = list(
#define GLUE_STATE_NONE 0
#define GLUE_STATE_TEMP 1
#define GLUE_STATE_PERMA 2
// Spawners
#define SPAWN_ON_TURF "turf"
#define SPAWN_ON_LOC "loc"

View File

@@ -103,10 +103,7 @@
)
items_to_collect = list(
/obj/item/ammo_casing/shotgun/beanbag = SURVIVAL_BOX,
/obj/item/ammo_casing/shotgun/beanbag = SURVIVAL_BOX,
/obj/item/ammo_casing/shotgun/beanbag = SURVIVAL_BOX,
/obj/item/ammo_casing/shotgun/beanbag = SURVIVAL_BOX,
/obj/abstract/spawn_all/bartender = SURVIVAL_BOX,
/obj/item/weapon/reagent_containers/food/drinks/shaker = slot_l_store_str,
)
@@ -123,6 +120,15 @@
return
H.mind.store_memory("Frequencies list: <br/> <b>Service:</b> [SER_FREQ]<br/>")
/obj/abstract/spawn_all/bartender
where_to_spawn = SPAWN_ON_LOC
to_spawn = list(
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag,
/obj/item/ammo_casing/shotgun/beanbag
)
// -- Chef
/datum/outfit/chef

View File

@@ -1415,11 +1415,17 @@
// Spawn all in the turf
/obj/abstract/spawn_all
var/list/to_spawn = list()
var/where_to_spawn = SPAWN_ON_TURF
/obj/abstract/spawn_all/New()
. = ..()
var/location
if (where_to_spawn == SPAWN_ON_TURF)
location = get_turf(src)
else
location = src.loc
for (var/thing in to_spawn)
new thing(get_turf(src))
new thing(location)
qdel(src)
/obj/abstract/spawn_all/dredd_gear