Merge pull request #9648 from Ghommie/Ghommie-cit288

Random plush spawner tweaks and fixes.
This commit is contained in:
kevinz000
2019-10-29 21:22:46 -07:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@@ -1,8 +1,7 @@
#define ARCADE_WEIGHT_TRICK 4
#define ARCADE_WEIGHT_USELESS 2
#define ARCADE_WEIGHT_RARE 1
#define ARCADE_WEIGHT_PLUSH 65
#define ARCADE_RATIO_PLUSH 0.20 // average 1 out of 6 wins is a plush.
/obj/machinery/computer/arcade
name = "random arcade"
@@ -27,7 +26,6 @@
/obj/item/toy/katana = ARCADE_WEIGHT_TRICK,
/obj/item/toy/minimeteor = ARCADE_WEIGHT_TRICK,
/obj/item/toy/nuke = ARCADE_WEIGHT_TRICK,
/obj/item/toy/plush/random = ARCADE_WEIGHT_PLUSH,
/obj/item/toy/redbutton = ARCADE_WEIGHT_TRICK,
/obj/item/toy/spinningtoy = ARCADE_WEIGHT_TRICK,
/obj/item/toy/sword = ARCADE_WEIGHT_TRICK,
@@ -90,6 +88,9 @@
var/obj/item/circuitboard/CB = new thegame()
new CB.build_path(loc, CB)
return INITIALIZE_HINT_QDEL
//The below object acts as a spawner with a wide array of possible picks, most being uninspired references to past/current player characters.
//Nevertheless, this keeps its ratio constant with the sum of all the others prizes.
prizes[/obj/item/toy/plush/random] = counterlist_sum(prizes) * ARCADE_RATIO_PLUSH
Reset()
/obj/machinery/computer/arcade/proc/prizevend(mob/user, list/rarity_classes)

View File

@@ -366,10 +366,10 @@
/obj/item/toy/plush/random
name = "Illegal plushie"
desc = "Something fucked up"
var/blacklisted_plushes = list(/obj/item/toy/plush/carpplushie/dehy_carp, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random)
/obj/item/toy/plush/random/Initialize()
..()
var/newtype = pick(subtypesof(/obj/item/toy/plush))
var/newtype = pick(subtypesof(/obj/item/toy/plush) - typecacheof(blacklisted_plushes))
new newtype(loc)
return INITIALIZE_HINT_QDEL