mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Making disposals mail sorting mapping less frustrating (#32218)
* mail sorting helpers && mail sorting code tweaks - Added mail helpers - Added defines for mail tagger locations - FUCKED sort_type_txt * Update mapping_helpers.dmi * Update deltastation.dmm * Update deltastation.dmm * Update cerestation.dmm * Update metastation.dmm * Update emeraldstation.dmm * Update boxstation.dmm * Update boxstation.dmm * Update mail_sorting_helpers.dm
This commit is contained in:
@@ -1181,7 +1181,6 @@
|
||||
name = "disposal sort junction"
|
||||
icon_state = "pipe-j1s"
|
||||
var/list/sort_type = list(1)
|
||||
var/sort_type_txt //Look at the list called TAGGERLOCATIONS in /code/_globalvars/lists/flavor_misc.dm and cry
|
||||
var/posdir = 0
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
@@ -1204,37 +1203,10 @@
|
||||
/obj/structure/disposalpipe/sortjunction/Initialize(mapload)
|
||||
. = ..()
|
||||
updatedir()
|
||||
if(mapload)
|
||||
parse_sort_destinations()
|
||||
update_appearance(UPDATE_NAME|UPDATE_DESC)
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/structure/disposalpipe/sortjunction/proc/parse_sort_destinations()
|
||||
if(sort_type_txt == "1")
|
||||
return
|
||||
|
||||
var/list/sort_type_str = splittext(sort_type_txt, ";")
|
||||
var/mapping_fail
|
||||
|
||||
if(length(sort_type_str)) // Default to disposals if mapped with it along other destinations
|
||||
if("1" in sort_type_str)
|
||||
mapping_fail = "Mutually exclusive sort types in sort_type_txt"
|
||||
else
|
||||
var/new_sort_type = list()
|
||||
for(var/x in sort_type_str)
|
||||
var/n = text2num(x)
|
||||
if(n)
|
||||
new_sort_type |= n
|
||||
if(length(new_sort_type))
|
||||
sort_type = new_sort_type
|
||||
else
|
||||
mapping_fail = "No sort types after parsing sort_type_txt"
|
||||
else
|
||||
mapping_fail = "Sort_type_txt is empty"
|
||||
if(mapping_fail)
|
||||
stack_trace("[src] mapped incorrectly at [x],[y],[z] - [mapping_fail]")
|
||||
|
||||
/obj/structure/disposalpipe/sortjunction/item_interaction(mob/living/user, obj/item/I, list/modifiers)
|
||||
if(..())
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
Reference in New Issue
Block a user