Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

NullCrate #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions code/modules/cargo/packs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,45 @@
contains = list(/obj/item/storage/box/metalfoam)
crate_name = "metal foam grenade crate"

// Singulostation edit start -- Adds null crates
/datum/supply_pack/emergency/syndicate
name = "NULL_ENTRY"
desc = "(#@&^$THIS PACKAGE CONTAINS 30TC WORTH OF SOME RANDOM SYNDICATE GEAR WE HAD LYING AROUND THE WAREHOUSE. GIVE EM HELL, OPERATIVE, BUT DON'T GET GREEDY- ORDER TOO MANY AND WE'LL BE SENDING OUR DEADLIEST ENFORCERS TO INVESTIGATE@&!*() "
hidden = TRUE
cost = 60000 // Changed cost from 20K to 60K because we have shitloads of cash
contains = list()
crate_name = "emergency crate"
crate_type = /obj/structure/closet/crate/internals
dangerous = TRUE
var/beepsky_chance = -1
var/level = 1

/datum/supply_pack/emergency/syndicate/fill(obj/structure/closet/crate/C)
var/crate_value = 30
var/list/uplink_items = get_uplink_items(SSticker.mode)
beepsky_chance += min(level, 5) //1% chance per crate an item will be replaced with a beepsky and the crate stops spawning items. Doesnt act as a hardcap, making nullcrates far riskier and less predictable
while(crate_value)
if(prob(beepsky_chance) && prob(50))
new /mob/living/simple_animal/bot/secbot/grievous/nullcrate(C)
crate_value = 0
beepsky_chance = 0
level += 1
var/category = pick(uplink_items)
var/item = pick(uplink_items[category])
var/datum/uplink_item/I = uplink_items[category][item]
if(!I.surplus_nullcrates || prob(100 - I.surplus_nullcrates))
continue
if(crate_value < I.cost)
continue
crate_value -= I.cost
new I.item(C)
var/datum/round_event_control/operative/loneop = locate(/datum/round_event_control/operative) in SSevents.control
if(istype(loneop))
loneop.weight += 7
message_admins("a NULL_ENTRY crate has shipped, increasing the weight of the Lone Operative event to [loneop.weight]")
log_game("a NULL_ENTRY crate has shipped, increasing the weight of the Lone Operative event to [loneop.weight]")
// Singulostation edit end

/datum/supply_pack/emergency/plasma_spacesuit
name = "Plasmaman Space Envirosuits"
desc = "Contains two space-worthy envirosuits for Plasmamen. Order now and we'll throw in two free helmets! Requires EVA access to open."
Expand Down