Removes smugglers satchels (#42166)

* Removes smugglers satchels

I love the cutie reading this

* remove smuggler's satchel from code

* removes all smugglers' satchel persistence code

* removes remaining things

storage component for smugglers, the miracle ruin (uses smugglers), the dme
This commit is contained in:
subject217
2019-01-02 15:28:26 -05:00
committed by Jordan Brown
parent 9fb370e6e8
commit 5a52f8a7bf
7 changed files with 0 additions and 180 deletions
-11
View File
@@ -1,11 +0,0 @@
//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
"a" = (
/obj/item/storage/backpack/satchel/flat/secret/miracle_ruin,
/turf/open/floor/fakespace{
initial_gas_mix = "TEMP=2.7"
},
/area/ruin/fakespace)
(1,1,1) = {"
a
"}
-92
View File
@@ -4,15 +4,11 @@ SUBSYSTEM_DEF(persistence)
name = "Persistence"
init_order = INIT_ORDER_PERSISTENCE
flags = SS_NO_FIRE
var/list/satchel_blacklist = list() //this is a typecache
var/list/new_secret_satchels = list() //these are objects
var/list/old_secret_satchels = list()
var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list()
var/list/saved_modes = list(1,2,3)
var/list/saved_trophies = list()
var/list/spawned_objects = list()
var/list/antag_rep = list()
var/list/antag_rep_change = list()
var/list/picture_logging_information = list()
@@ -20,7 +16,6 @@ SUBSYSTEM_DEF(persistence)
var/list/obj/item/storage/photo_album/photo_albums
/datum/controller/subsystem/persistence/Initialize()
LoadSatchels()
LoadPoly()
LoadChiselMessages()
LoadTrophies()
@@ -30,63 +25,6 @@ SUBSYSTEM_DEF(persistence)
LoadAntagReputation()
return ..()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
var/placed_satchel = 0
var/path
if(fexists("data/npc_saves/SecretSatchels.sav")) //legacy conversion. Will only ever run once.
var/savefile/secret_satchels = new /savefile("data/npc_saves/SecretSatchels.sav")
for(var/map in secret_satchels)
var/json_file = file("data/npc_saves/SecretSatchels[map].json")
var/list/legacy_secret_satchels = splittext(secret_satchels[map],"#")
var/list/satchels = list()
for(var/i=1,i<=legacy_secret_satchels.len,i++)
var/satchel_string = legacy_secret_satchels[i]
var/list/chosen_satchel = splittext(satchel_string,"|")
if(chosen_satchel.len == 3)
var/list/data = list()
data["x"] = text2num(chosen_satchel[1])
data["y"] = text2num(chosen_satchel[2])
data["saved_obj"] = chosen_satchel[3]
satchels += list(data)
var/list/file_data = list()
file_data["data"] = satchels
WRITE_FILE(json_file, json_encode(file_data))
fdel("data/npc_saves/SecretSatchels.sav")
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/json = list()
if(fexists(json_file))
json = json_decode(file2text(json_file))
old_secret_satchels = json["data"]
var/obj/item/storage/backpack/satchel/flat/F
if(old_secret_satchels && old_secret_satchels.len >= 10) //guards against low drop pools assuring that one player cannot reliably find his own gear.
var/pos = rand(1, old_secret_satchels.len)
var/end = pos + 1
if (end > old_secret_satchels.len)
end = 0
F = new()
F.x = old_secret_satchels[pos]["x"]
F.y = old_secret_satchels[pos]["y"]
F.z = SSmapping.station_start
path = text2path(old_secret_satchels[pos]["saved_obj"])
old_secret_satchels.Cut(pos, end)
if(F)
if(isfloorturf(F.loc) && !isplatingturf(F.loc))
F.hide(1)
if(ispath(path))
var/spawned_item = new path(F)
spawned_objects[spawned_item] = TRUE
placed_satchel++
var/free_satchels = 0
for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,SSmapping.station_start), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,SSmapping.station_start)))) //Nontrivially expensive but it's roundstart only
if(isfloorturf(T) && !isplatingturf(T))
new /obj/item/storage/backpack/satchel/flat/secret(T)
free_satchels++
if((free_satchels + placed_satchel) == 10) //ten tiles, more than enough to kill anything that moves
break
/datum/controller/subsystem/persistence/proc/LoadPoly()
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.alive_mob_list)
twitterize(P.speech_buffer, "polytalk")
@@ -203,7 +141,6 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/CollectData()
CollectChiselMessages()
CollectSecretSatchels()
CollectTrophies()
CollectRoundtype()
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
@@ -279,35 +216,6 @@ SUBSYSTEM_DEF(persistence)
WRITE_FILE(frame_path, frame_json)
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
satchel_blacklist = typecacheof(list(/obj/item/stack/tile/plasteel, /obj/item/crowbar))
var/list/satchels_to_add = list()
for(var/A in new_secret_satchels)
var/obj/item/storage/backpack/satchel/flat/F = A
if(QDELETED(F) || F.z != SSmapping.station_start || F.invisibility != INVISIBILITY_MAXIMUM)
continue
var/list/savable_obj = list()
for(var/obj/O in F)
if(is_type_in_typecache(O, satchel_blacklist) || (O.flags_1 & ADMIN_SPAWNED_1))
continue
if(O.persistence_replacement)
savable_obj += O.persistence_replacement
else
savable_obj += O.type
if(isemptylist(savable_obj))
continue
var/list/data = list()
data["x"] = F.x
data["y"] = F.y
data["saved_obj"] = pick(savable_obj)
satchels_to_add += list(data)
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
var/list/file_data = list()
fdel(json_file)
file_data["data"] = old_secret_satchels + satchels_to_add
WRITE_FILE(json_file, json_encode(file_data))
/datum/controller/subsystem/persistence/proc/CollectChiselMessages()
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
@@ -1,5 +0,0 @@
/datum/component/storage/concrete/secret_satchel/can_be_inserted(I,msg,user)
if(SSpersistence.spawned_objects[I])
to_chat(user, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
return FALSE
return ..()
@@ -290,63 +290,6 @@
icon_state = "satchel-cap"
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
component_type = /datum/component/storage/concrete/secret_satchel
/obj/item/storage/backpack/satchel/flat/Initialize()
. = ..()
SSpersistence.new_secret_satchels += src
/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_MAXIMUM
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()
new /obj/item/stack/tile/plasteel(src)
new /obj/item/crowbar(src)
/obj/item/storage/backpack/satchel/flat/Destroy()
SSpersistence.new_secret_satchels -= src
return ..()
/obj/item/storage/backpack/satchel/flat/secret
var/list/reward_one_of_these = list() //Intended for map editing
var/list/reward_all_of_these = list() //use paths!
var/revealed = FALSE
/obj/item/storage/backpack/satchel/flat/secret/Initialize()
. = ..()
if(isfloorturf(loc) && !isplatingturf(loc))
hide(1)
/obj/item/storage/backpack/satchel/flat/secret/hide(intact)
..()
if(!intact && !revealed)
if(reward_one_of_these.len > 0)
var/reward = pick(reward_one_of_these)
new reward(src)
for(var/R in reward_all_of_these)
new R(src)
revealed = TRUE
/obj/item/storage/backpack/duffelbag
name = "duffel bag"
desc = "A large duffel bag for holding extra things."
@@ -1,4 +0,0 @@
/////////// miracle ruin
/obj/item/storage/backpack/satchel/flat/secret/miracle_ruin
reward_all_of_these = list(/obj/item/gun/energy/pulse/prize)
-9
View File
@@ -1015,15 +1015,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/jammer
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 and a floor tile inside. Properly hidden satchels have been \
known to survive intact even beyond the current shift. "
item = /obj/item/storage/backpack/satchel/flat
cost = 2
surplus = 30
//Space Suits and Hardsuits
/datum/uplink_item/suits
category = "Space Suits and Hardsuits"
-2
View File
@@ -383,7 +383,6 @@
#include "code\datums\components\storage\concrete\implant.dm"
#include "code\datums\components\storage\concrete\pockets.dm"
#include "code\datums\components\storage\concrete\rped.dm"
#include "code\datums\components\storage\concrete\special.dm"
#include "code\datums\components\storage\concrete\stack.dm"
#include "code\datums\diseases\_disease.dm"
#include "code\datums\diseases\_MobProcs.dm"
@@ -2539,7 +2538,6 @@
#include "code\modules\ruins\spaceruin_code\DJstation.dm"
#include "code\modules\ruins\spaceruin_code\hilbertshotel.dm"
#include "code\modules\ruins\spaceruin_code\listeningstation.dm"
#include "code\modules\ruins\spaceruin_code\miracle.dm"
#include "code\modules\ruins\spaceruin_code\oldstation.dm"
#include "code\modules\ruins\spaceruin_code\originalcontent.dm"
#include "code\modules\ruins\spaceruin_code\spacehotel.dm"