mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
New tg conveyors are working pretty well, just remember to define dir (conveyor sprite dir), forwards + backwards (conveyor movement dirs) when placing them. Diverters are in, but not working.
Signed-off-by: CaelAislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
anchored = 1
|
||||
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
|
||||
var/operable = 1 // true if can operate (no broken segments in this belt run)
|
||||
var/forwards // this is the default (forward) direction, set by the map dir
|
||||
var/backwards // hopefully self-explanatory
|
||||
var/forwards // this is the default (forward) direction, set by the map dir, can be 0
|
||||
var/backwards // hopefully self-explanatory, can be 0
|
||||
var/movedir // the actual direction to move stuff in
|
||||
|
||||
var/list/affecting // the list of all items that will be moved this ptick
|
||||
@@ -19,14 +19,20 @@
|
||||
//these ones below for backwards compatibility
|
||||
|
||||
// following two only used if a diverter is present
|
||||
var/divert = 0 // if non-zero, direction to divert items
|
||||
var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
|
||||
var/divert_from = 0 // if non-zero, direction to divert items
|
||||
var/divert_to = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
|
||||
var/basedir // this is the default (forward) direction, set by the map dir
|
||||
// note dir var can vary when the direction changes
|
||||
|
||||
//cael - corner icon bug that needs a manual fix
|
||||
//note: for now, the sprites/anis and their directions are mostly independant from the actual conveyor move directions
|
||||
//if no conveyor move directions are specified, they are extracted from the sprite dir
|
||||
var/reverseSpriteMoveDir = 0
|
||||
|
||||
// create a conveyor
|
||||
/obj/machinery/conveyor/New()
|
||||
..()
|
||||
//added these to allow for custom conveyor dirs defined in map
|
||||
if(!forwards)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
@@ -80,7 +86,7 @@
|
||||
operating = 0
|
||||
if(stat & NOPOWER)
|
||||
operating = 0
|
||||
icon_state = "conveyor[operating]"
|
||||
icon_state = "conveyor[operating * (reverseSpriteMoveDir?-1:1)]"
|
||||
|
||||
// machine process
|
||||
// move items to the target location
|
||||
@@ -91,8 +97,10 @@
|
||||
return
|
||||
use_power(100)
|
||||
|
||||
if(divert && dir==divdir) // update if diverter present
|
||||
movedir = divert
|
||||
if(movedir == divert_to && divert_from == (movedir == backwards ? forwards : backwards ) ) // update if diverter present
|
||||
movedir = divert_to
|
||||
//conv.divert = divert_to
|
||||
//conv.divdir = divert_from
|
||||
|
||||
affecting = loc.contents - src // moved items will be all in loc
|
||||
spawn(1) // slight delay to prevent infinite propagation due to map order
|
||||
@@ -310,10 +318,10 @@
|
||||
/obj/machinery/diverter/proc/set_divert()
|
||||
if(conv)
|
||||
if(deployed)
|
||||
conv.divert = divert_to
|
||||
conv.divdir = divert_from
|
||||
conv.divert_to = divert_to
|
||||
conv.divert_from = divert_from
|
||||
else
|
||||
conv.divert= 0
|
||||
conv.divert_to = 0
|
||||
|
||||
|
||||
// *** TESTING click to toggle
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
+6
-6
@@ -403,13 +403,13 @@
|
||||
"hM" = (/obj/machinery/light_switch{pixel_x = 24; pixel_y = 1},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"hN" = (/obj/effect/sign/movingparts,/turf/simulated/wall,/area/quartermaster/qm)
|
||||
"hO" = (/obj/machinery/door/airlock/glass_security{name = "Brig"; req_access_txt = "1"},/turf/simulated/floor,/area)
|
||||
"hP" = (/obj/machinery/conveyor{backwards = 2; dir = 2; divdir = 0; forwards = 1; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"hP" = (/obj/machinery/conveyor{backwards = 2; dir = 2;forwards = 1; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"hQ" = (/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/quartermaster/storage)
|
||||
"hR" = (/turf/simulated/floor{dir = 4; icon_state = "warning"},/area/quartermaster/qm)
|
||||
"hS" = (/obj/machinery/conveyor{backwards = null; dir = 2; divdir = 0; forwards = null; id = "QMonload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"hS" = (/obj/machinery/conveyor{backwards = null; dir = 2;forwards = null; id = "QMonload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"hT" = (/obj/structure/stool/chair{name = "Bailiff"},/turf/simulated/floor,/area)
|
||||
"hU" = (/obj/machinery/door/airlock/maintenance,/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"hV" = (/obj/machinery/conveyor{backwards = 1; dir = 2; divdir = 0; forwards = 2; id = "QMonload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"hV" = (/obj/machinery/conveyor{backwards = 1; dir = 2;forwards = 2; id = "QMonload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"hW" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/quartermaster/qm)
|
||||
"hX" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/maintenance/starboard)
|
||||
"hY" = (/obj/structure/stool/chair{dir = 4},/turf/simulated/floor,/area)
|
||||
@@ -435,12 +435,12 @@
|
||||
"is" = (/turf/simulated/floor{icon_state = "warning"},/area/quartermaster/storage)
|
||||
"it" = (/obj/effect/sign/movingparts{pixel_x = 32; pixel_y = 0},/turf/simulated/floor{icon_state = "warning"},/area/quartermaster/storage)
|
||||
"iu" = (/obj/effect/sign/movingparts{pixel_x = -32; pixel_y = 0},/turf/simulated/floor{dir = 6; icon_state = "warning"},/area/quartermaster/qm)
|
||||
"iv" = (/obj/machinery/conveyor{backwards = 4; dir = 5; forwards = 2; id = "QMonload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"iw" = (/obj/machinery/conveyor{backwards = 1; dir = 2; divdir = 0; forwards = 2; id = "QMonload"},/obj/effect/sign/movingparts{pixel_x = 32},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"iv" = (/obj/machinery/conveyor{backwards = 4; dir = 5; forwards = 2; id = "QMonload"; reverseSpriteMoveDir = 1},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"iw" = (/obj/machinery/conveyor{backwards = 1; dir = 2;forwards = 2; id = "QMonload"},/obj/effect/sign/movingparts{pixel_x = 32},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"ix" = (/turf/simulated/floor/plating{dir = 2; icon_state = "warnplate"; tag = "icon-warnplate (EAST)"},/area/quartermaster/qm)
|
||||
"iy" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/effect/sign/movingparts,/turf/simulated/floor/plating,/area/quartermaster/qm)
|
||||
"iz" = (/obj/machinery/door/window/westleft,/turf/simulated/floor{icon_state = "grimy"},/area)
|
||||
"iA" = (/obj/machinery/conveyor{backwards = 4; dir = 6; divert = 1; forwards = 1; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"iA" = (/obj/machinery/conveyor{backwards = 4; dir = 6; forwards = 1; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"iB" = (/obj/machinery/conveyor{dir = 8; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/storage)
|
||||
"iC" = (/obj/structure/plasticflaps,/obj/machinery/conveyor{dir = 8; id = "QMoffload"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
"iD" = (/obj/machinery/conveyor{dir = 8; id = "QMshuttle"},/turf/simulated/floor,/area/quartermaster/qm)
|
||||
|
||||
Reference in New Issue
Block a user