mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-01-02 13:14:42 +00:00
Merge pull request #9648 from Ghommie/Ghommie-cit288
Random plush spawner tweaks and fixes.
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
#define ARCADE_WEIGHT_TRICK 4
|
#define ARCADE_WEIGHT_TRICK 4
|
||||||
#define ARCADE_WEIGHT_USELESS 2
|
#define ARCADE_WEIGHT_USELESS 2
|
||||||
#define ARCADE_WEIGHT_RARE 1
|
#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
|
/obj/machinery/computer/arcade
|
||||||
name = "random arcade"
|
name = "random arcade"
|
||||||
@@ -27,7 +26,6 @@
|
|||||||
/obj/item/toy/katana = ARCADE_WEIGHT_TRICK,
|
/obj/item/toy/katana = ARCADE_WEIGHT_TRICK,
|
||||||
/obj/item/toy/minimeteor = ARCADE_WEIGHT_TRICK,
|
/obj/item/toy/minimeteor = ARCADE_WEIGHT_TRICK,
|
||||||
/obj/item/toy/nuke = 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/redbutton = ARCADE_WEIGHT_TRICK,
|
||||||
/obj/item/toy/spinningtoy = ARCADE_WEIGHT_TRICK,
|
/obj/item/toy/spinningtoy = ARCADE_WEIGHT_TRICK,
|
||||||
/obj/item/toy/sword = ARCADE_WEIGHT_TRICK,
|
/obj/item/toy/sword = ARCADE_WEIGHT_TRICK,
|
||||||
@@ -90,6 +88,9 @@
|
|||||||
var/obj/item/circuitboard/CB = new thegame()
|
var/obj/item/circuitboard/CB = new thegame()
|
||||||
new CB.build_path(loc, CB)
|
new CB.build_path(loc, CB)
|
||||||
return INITIALIZE_HINT_QDEL
|
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()
|
Reset()
|
||||||
|
|
||||||
/obj/machinery/computer/arcade/proc/prizevend(mob/user, list/rarity_classes)
|
/obj/machinery/computer/arcade/proc/prizevend(mob/user, list/rarity_classes)
|
||||||
|
|||||||
@@ -366,10 +366,10 @@
|
|||||||
/obj/item/toy/plush/random
|
/obj/item/toy/plush/random
|
||||||
name = "Illegal plushie"
|
name = "Illegal plushie"
|
||||||
desc = "Something fucked up"
|
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()
|
/obj/item/toy/plush/random/Initialize()
|
||||||
..()
|
var/newtype = pick(subtypesof(/obj/item/toy/plush) - typecacheof(blacklisted_plushes))
|
||||||
var/newtype = pick(subtypesof(/obj/item/toy/plush))
|
|
||||||
new newtype(loc)
|
new newtype(loc)
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user