mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Makes the supply drop event have a low chance to spawn crate full of contraband. (#20720)
As the title says. Currently a 10% chance each time the random crate spawn rolls but I'm open to reduce it if desirable. --------- Signed-off-by: FlamingLily <80451102+FlamingLily@users.noreply.github.com>
This commit is contained in:
@@ -280,13 +280,6 @@
|
||||
icon_state = "crate"
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
|
||||
/obj/structure/closet/crate/contraband
|
||||
name = "Poster crate"
|
||||
desc = "A random assortment of posters manufactured by providers NOT listed under NanoTrasen's whitelist."
|
||||
icon_state = "crate"
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
*/
|
||||
|
||||
/obj/structure/closet/crate/medical
|
||||
@@ -614,6 +607,8 @@
|
||||
//Quantity of spawns is number of discrete selections from the loot lists, default 10
|
||||
|
||||
/obj/structure/closet/crate/loot
|
||||
name = "unusual container"
|
||||
desc = "A mysterious container of unknown origins. What mysteries lie within?"
|
||||
icon = 'icons/obj/random.dmi'
|
||||
icon_state = "loot_crate"
|
||||
var/rarity = 1
|
||||
@@ -631,15 +626,14 @@
|
||||
|
||||
var/list/crates_to_use = typesof(/obj/structure/closet/crate) - typesof(/obj/structure/closet/crate/secure/gear_loadout)
|
||||
crates_to_use -= /obj/structure/closet/crate/loot
|
||||
crates_to_use -= /obj/structure/closet/crate/loot/contraband
|
||||
var/icontype = pick(crates_to_use)
|
||||
var/obj/structure/closet/crate/C = new icontype(get_turf(src), TRUE) //TRUE as we do not want the crate to fill(), we will fill it ourselves.
|
||||
|
||||
C.name = "unusual container"
|
||||
C.desc = "A mysterious container of unknown origins. What mysteries lie within?"
|
||||
C.name = name
|
||||
C.desc = desc
|
||||
|
||||
for(var/i in 1 to quantity)
|
||||
var/newtype = get_spawntype()
|
||||
call(newtype)(C)
|
||||
fill_spawned_crate(C, quantity)
|
||||
|
||||
if(C.secure || C.locked) //These should always be accessible
|
||||
C.secure = FALSE
|
||||
@@ -663,6 +657,19 @@
|
||||
if ("3")
|
||||
return pickweight(GLOB.random_stock_common)
|
||||
|
||||
/obj/structure/closet/crate/loot/proc/fill_spawned_crate(var/obj/structure/closet/crate/spawned_crate, var/quantity)
|
||||
for(var/i in 1 to quantity)
|
||||
var/newtype = get_spawntype()
|
||||
call(newtype)(spawned_crate)
|
||||
|
||||
/obj/structure/closet/crate/loot/contraband
|
||||
name = "suspicious container"
|
||||
desc = "A container of some kind. Any and all identifying markings have been filed away. Who knows what it could hold!"
|
||||
|
||||
/obj/structure/closet/crate/loot/contraband/fill_spawned_crate(spawned_crate, quantity)
|
||||
for(var/i in 1 to quantity)
|
||||
new /obj/random/contraband(spawned_crate)
|
||||
|
||||
/obj/structure/closet/crate/extinguisher_cartridges
|
||||
name = "crate of extinguisher cartridges"
|
||||
desc = "Contains a dozen empty extinguisher cartridges."
|
||||
|
||||
@@ -10,15 +10,20 @@
|
||||
/datum/event/supply_drop/start()
|
||||
..()
|
||||
|
||||
var/rarity = 4
|
||||
var/quantity = rand(10,25)
|
||||
|
||||
var/area/a = random_station_area()
|
||||
spawn_loc = a.random_space()
|
||||
location_name = a.name
|
||||
|
||||
new /obj/structure/closet/crate/loot(spawn_loc, rarity, quantity)
|
||||
log_and_message_admins("Unusual container spawned at (<a href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[spawn_loc.x];Y=[spawn_loc.y];Z=[spawn_loc.z]'>JMP</a>)")
|
||||
if(prob(90))
|
||||
var/rarity = 4
|
||||
var/quantity = rand(10,25)
|
||||
|
||||
new /obj/structure/closet/crate/loot(spawn_loc, rarity, quantity)
|
||||
log_and_message_admins("Unusual container spawned at (<a href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[spawn_loc.x];Y=[spawn_loc.y];Z=[spawn_loc.z]'>JMP</a>)")
|
||||
else
|
||||
var/quantity = rand(3, 10)
|
||||
new /obj/structure/closet/crate/loot/contraband(spawn_loc, quantity)
|
||||
log_and_message_admins("Contraband container spawned at (<a href='byond://?_src_=holder;adminplayerobservecoodjump=1;X=[spawn_loc.x];Y=[spawn_loc.y];Z=[spawn_loc.z]'>JMP</a>)")
|
||||
|
||||
spark(spawn_loc, 10, GLOB.alldirs)
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: FlamingLily
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added a low chance of the random crate spawn to spawn full of contraband."
|
||||
Reference in New Issue
Block a user