mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[Ready]Adds the Stray Cargo pod event (#49707)
About The Pull Request Adds an event where a cargo pod containing a random cargo supply pack crash-lands on a random spot on the station. Added a rare variant (post 30 minutes) that spawns a null crate with 30 TCs of gear. Crates which would be locked when ordered from cargo will start unlocked when falling with a stray cargo pod. Note: i'm not yet able to compile or test the code myself, will do it as soon as possible, before tomorrow done, all fine Why It's Good For The Game A fairly neutral event that could benefit some lucky assistant, throw shotguns inside the cult base, or simply land on the head of some very unlucky person. I think more variety will be nice for the game. Changelog 🆑 XDTM add: Added the Stray Cargo Pod event, which drops a pod containing a random cargo crate into a random location. Rarely, one might even contain assorted syndicate gear! /🆑
This commit is contained in:
@@ -2538,3 +2538,27 @@
|
||||
/obj/item/stock_parts/subspace/ansible
|
||||
)
|
||||
crate_name = "crate"
|
||||
|
||||
///Special supply crate that generates random syndicate gear up to a determined TC value
|
||||
/datum/supply_pack/misc/syndicate
|
||||
name = "Assorted Syndicate Gear"
|
||||
desc = "Contains a random assortment of syndicate gear."
|
||||
special = TRUE ///Cannot be ordered via cargo
|
||||
contains = list()
|
||||
crate_name = "syndicate gear crate"
|
||||
crate_type = /obj/structure/closet/crate
|
||||
var/crate_value = 30 ///Total TC worth of contained uplink items
|
||||
|
||||
///Generate assorted uplink items, taking into account the same surplus modifiers used for surplus crates
|
||||
/datum/supply_pack/misc/syndicate/fill(obj/structure/closet/crate/C)
|
||||
var/list/uplink_items = get_uplink_items(SSticker.mode)
|
||||
while(crate_value)
|
||||
var/category = pick(uplink_items)
|
||||
var/item = pick(uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(!I.surplus || prob(100 - I.surplus))
|
||||
continue
|
||||
if(crate_value < I.cost)
|
||||
continue
|
||||
crate_value -= I.cost
|
||||
new I.item(C)
|
||||
|
||||
Reference in New Issue
Block a user