Readds non-persistent contraband filled smugglers satchels (#42228)

* Readds non-persistent contraband filled smugglers satchels

* Ten random satchels are placed each round
This commit is contained in:
coiax
2019-01-07 10:16:47 +00:00
committed by Jordie
parent 07f0b6d6a4
commit ffd160a495
3 changed files with 70 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(minor_mapping)
/datum/controller/subsystem/minor_mapping/Initialize(timeofday) /datum/controller/subsystem/minor_mapping/Initialize(timeofday)
trigger_migration(CONFIG_GET(number/mice_roundstart)) trigger_migration(CONFIG_GET(number/mice_roundstart))
place_satchels()
return ..() return ..()
/datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10) /datum/controller/subsystem/minor_mapping/proc/trigger_migration(num_mice=10)
@@ -23,11 +24,21 @@ SUBSYSTEM_DEF(minor_mapping)
num_mice -= 1 num_mice -= 1
M = null M = null
/datum/controller/subsystem/minor_mapping/proc/place_satchels(amount=10)
var/list/turfs = find_satchel_suitable_turfs()
while(turfs.len && amount > 0)
var/turf/T = pick_n_take(turfs)
var/obj/item/storage/backpack/satchel/flat/S = new(T)
S.hide(intact=TRUE)
amount--
/proc/find_exposed_wires() /proc/find_exposed_wires()
var/list/exposed_wires = list() var/list/exposed_wires = list()
var/list/all_turfs var/list/all_turfs
for (var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z)) all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
for(var/turf/open/floor/plating/T in all_turfs) for(var/turf/open/floor/plating/T in all_turfs)
if(is_blocked_turf(T)) if(is_blocked_turf(T))
@@ -36,3 +47,13 @@ SUBSYSTEM_DEF(minor_mapping)
exposed_wires += T exposed_wires += T
return shuffle(exposed_wires) return shuffle(exposed_wires)
/proc/find_satchel_suitable_turfs()
var/list/suitable = list()
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
for(var/t in block(locate(1,1,z), locate(world.maxx,world.maxy,z)))
if(isfloorturf(t) && !isplatingturf(t))
suitable += t
return shuffle(suitable)

View File

@@ -290,6 +290,46 @@
icon_state = "satchel-cap" icon_state = "satchel-cap"
item_state = "captainpack" item_state = "captainpack"
/obj/item/storage/backpack/satchel/flat
name = "smuggler's satchel"
desc = "A very slim satchel that can easily fit into tight spaces."
icon_state = "satchel-flat"
w_class = WEIGHT_CLASS_NORMAL //Can fit in backpacks itself.
level = 1
/obj/item/storage/backpack/satchel/flat/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 15
STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks
/obj/item/storage/backpack/satchel/flat/hide(intact)
if(intact)
invisibility = INVISIBILITY_OBSERVER
anchored = TRUE //otherwise you can start pulling, cover it, and drag around an invisible backpack.
icon_state = "[initial(icon_state)]2"
else
invisibility = initial(invisibility)
anchored = FALSE
icon_state = initial(icon_state)
/obj/item/storage/backpack/satchel/flat/PopulateContents()
var/datum/supply_pack/costumes_toys/randomised/contraband/C = new
for(var/i in 1 to 2)
var/ctype = pick(C.contains)
new ctype(src)
qdel(C)
/obj/item/storage/backpack/satchel/flat/with_tools/PopulateContents()
new /obj/item/stack/tile/plasteel(src)
new /obj/item/crowbar(src)
..()
/obj/item/storage/backpack/satchel/flat/empty/PopulateContents()
return
/obj/item/storage/backpack/duffelbag /obj/item/storage/backpack/duffelbag
name = "duffel bag" name = "duffel bag"
desc = "A large duffel bag for holding extra things." desc = "A large duffel bag for holding extra things."

View File

@@ -1015,6 +1015,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/jammer item = /obj/item/jammer
cost = 5 cost = 5
/datum/uplink_item/stealthy_tools/smugglersatchel
name = "Smuggler's Satchel"
desc = "This satchel is thin enough to be hidden in the gap between plating and tiling; great for stashing \
your stolen goods. Comes with a crowbar, a floor tile and some contraband inside."
item = /obj/item/storage/backpack/satchel/flat/with_tools
cost = 2
surplus = 30
//Space Suits and Hardsuits //Space Suits and Hardsuits
/datum/uplink_item/suits /datum/uplink_item/suits
category = "Space Suits and Hardsuits" category = "Space Suits and Hardsuits"