mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
[MIRROR] RPD UI ,bunch of pipe fixes & stack garbage collection [MDB IGNORE] (#19100)
* RPD UI ,bunch of pipe fixes & stack garbage collection * Update _machinery.dm --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
co-authored by
SyncIt21
lessthanthree
parent
43e3b37073
commit
dfe6c614ae
@@ -139,14 +139,19 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
dirs = list("[NORTH]" = "North", "[EAST]" = "East", "[SOUTH]" = "South", "[WEST]" = "West",
|
||||
"[NORTHEAST]" = "North Flipped", "[SOUTHEAST]" = "East Flipped", "[SOUTHWEST]" = "South Flipped", "[NORTHWEST]" = "West Flipped")
|
||||
|
||||
|
||||
var/list/rows = list()
|
||||
var/list/row = list("previews" = list())
|
||||
var/i = 0
|
||||
for(var/dir in dirs)
|
||||
var/numdir = text2num(dir)
|
||||
var/flipped = ((dirtype == PIPE_TRIN_M) || (dirtype == PIPE_UNARY_FLIPPABLE)) && (ISDIAGONALDIR(numdir))
|
||||
row["previews"] += list(list("selected" = (numdir == selected_dir), "dir" = dir2text(numdir), "dir_name" = dirs[dir], "icon_state" = icon_state, "flipped" = flipped))
|
||||
row["previews"] += list(list(
|
||||
"selected" = dirtype == PIPE_ONEDIR ? TRUE : (numdir == selected_dir),
|
||||
"dir" = dir2text(numdir),
|
||||
"dir_name" = dirs[dir],
|
||||
"icon_state" = icon_state,
|
||||
"flipped" = flipped,
|
||||
))
|
||||
if(i++ || dirtype == PIPE_ONEDIR)
|
||||
rows += list(row)
|
||||
row = list("previews" = list())
|
||||
@@ -317,7 +322,6 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(istype(target, /obj/machinery/air_sensor))
|
||||
if(!do_after(user, destroy_speed, target))
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
qdel(target)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
@@ -379,6 +383,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
"ducting_layer" = ducting_layer,
|
||||
"preview_rows" = recipe.get_preview(p_dir),
|
||||
"categories" = list(),
|
||||
"selected_recipe" = recipe.name,
|
||||
"selected_color" = paint_color,
|
||||
"mode" = mode,
|
||||
)
|
||||
@@ -404,7 +409,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(GLOB.objects_by_id_tag[CHAMBER_SENSOR_FROM_ID(initial(sensor.chamber_id))] != null)
|
||||
continue
|
||||
|
||||
r += list(list("pipe_name" = info.name, "pipe_index" = i, "selected" = (info == recipe), "all_layers" = info.all_layers))
|
||||
r += list(list("pipe_name" = info.name, "pipe_index" = i))
|
||||
if(info == recipe)
|
||||
data["selected_category"] = c
|
||||
if(r.len == 0) //when all air sensors are installed this list will become empty
|
||||
|
||||
Reference in New Issue
Block a user