mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 02:12:14 +00:00
CAR!!!
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1537,6 +1537,13 @@
|
||||
/obj/machinery/suit_storage_unit/ce,
|
||||
/turf/open/floor/plasteel,
|
||||
/area/construction)
|
||||
"ik" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 1
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"ip" = (
|
||||
/obj/effect/spawner/structure/window/reinforced,
|
||||
/turf/open/floor/plating,
|
||||
@@ -1601,6 +1608,10 @@
|
||||
},
|
||||
/turf/open/floor/plasteel,
|
||||
/area/engineering/storage)
|
||||
"nE" = (
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"od" = (
|
||||
/obj/effect/turf_decal/stripes/white/line,
|
||||
/obj/effect/spawner/structure/window/reinforced,
|
||||
@@ -1632,6 +1643,13 @@
|
||||
/obj/effect/turf_decal/stripes/asteroid/line,
|
||||
/turf/open/floor/plating,
|
||||
/area/maintenance/department/bridge)
|
||||
"oR" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 6
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"qo" = (
|
||||
/turf/open/openspace,
|
||||
/area/engineering/storage)
|
||||
@@ -1694,6 +1712,18 @@
|
||||
/obj/item/construction/rcd/combat/admin,
|
||||
/turf/open/floor/plasteel,
|
||||
/area/construction)
|
||||
"wr" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 10
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"xh" = (
|
||||
/obj/effect/turf_decal/stripes/line,
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"xr" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 1
|
||||
@@ -1718,6 +1748,10 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
|
||||
/turf/open/floor/plating,
|
||||
/area/construction)
|
||||
"zH" = (
|
||||
/obj/structure/lattice,
|
||||
/turf/open/openspace,
|
||||
/area/engineering/storage)
|
||||
"zZ" = (
|
||||
/obj/structure/disposalpipe/trunk{
|
||||
dir = 1;
|
||||
@@ -1755,7 +1789,15 @@
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 4
|
||||
},
|
||||
/turf/open/floor/plasteel,
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"CE" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 8
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"CK" = (
|
||||
/obj/structure/disposalpipe/trunk,
|
||||
@@ -1782,6 +1824,13 @@
|
||||
/obj/effect/turf_decal/stripes/white/line,
|
||||
/turf/open/floor/plating,
|
||||
/area/engineering/storage)
|
||||
"ED" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 9
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"EF" = (
|
||||
/obj/machinery/atmospherics/components/binary/valve,
|
||||
/turf/open/floor/plating,
|
||||
@@ -1882,6 +1931,17 @@
|
||||
/obj/machinery/airalarm/directional/north,
|
||||
/turf/open/floor/plating,
|
||||
/area/engineering/storage)
|
||||
"Oz" = (
|
||||
/obj/structure/lattice/catwalk,
|
||||
/turf/open/openspace,
|
||||
/area/engineering/storage)
|
||||
"Pj" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 5
|
||||
},
|
||||
/obj/structure/industrial_lift,
|
||||
/turf/open/floor/plating,
|
||||
/area/commons/storage/primary)
|
||||
"Pu" = (
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/on{
|
||||
dir = 8
|
||||
@@ -1907,6 +1967,12 @@
|
||||
},
|
||||
/turf/open/floor/plasteel,
|
||||
/area/engineering/storage)
|
||||
"RR" = (
|
||||
/obj/machinery/light{
|
||||
dir = 4
|
||||
},
|
||||
/turf/open/openspace,
|
||||
/area/hallway/secondary/service)
|
||||
"St" = (
|
||||
/obj/effect/turf_decal/stripes/line{
|
||||
dir = 1
|
||||
@@ -3945,9 +4011,9 @@ eo
|
||||
eo
|
||||
cK
|
||||
by
|
||||
dJ
|
||||
dJ
|
||||
dB
|
||||
ED
|
||||
CE
|
||||
wr
|
||||
dl
|
||||
dF
|
||||
dk
|
||||
@@ -3999,9 +4065,9 @@ eo
|
||||
eo
|
||||
cL
|
||||
by
|
||||
dJ
|
||||
dJ
|
||||
dB
|
||||
ik
|
||||
nE
|
||||
xh
|
||||
dl
|
||||
dl
|
||||
dl
|
||||
@@ -4053,9 +4119,9 @@ eo
|
||||
eo
|
||||
cM
|
||||
by
|
||||
dk
|
||||
Pj
|
||||
Bm
|
||||
dC
|
||||
oR
|
||||
dl
|
||||
dl
|
||||
dl
|
||||
@@ -6754,9 +6820,9 @@ dY
|
||||
dY
|
||||
dY
|
||||
TY
|
||||
dY
|
||||
dY
|
||||
dY
|
||||
iu
|
||||
iu
|
||||
iu
|
||||
eF
|
||||
iu
|
||||
iu
|
||||
@@ -6808,9 +6874,9 @@ dY
|
||||
dY
|
||||
dY
|
||||
TY
|
||||
dY
|
||||
dY
|
||||
dY
|
||||
iu
|
||||
iu
|
||||
iu
|
||||
eF
|
||||
iu
|
||||
iu
|
||||
@@ -6862,9 +6928,9 @@ dY
|
||||
dY
|
||||
dY
|
||||
TY
|
||||
dY
|
||||
eN
|
||||
dY
|
||||
iu
|
||||
RR
|
||||
iu
|
||||
eF
|
||||
iu
|
||||
iu
|
||||
@@ -8920,7 +8986,7 @@ dS
|
||||
IN
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -8974,7 +9040,7 @@ dS
|
||||
IN
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9026,17 +9092,17 @@ ej
|
||||
Qw
|
||||
Qw
|
||||
Vn
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
AG
|
||||
au
|
||||
au
|
||||
@@ -9074,15 +9140,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9128,15 +9194,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9182,15 +9248,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9236,15 +9302,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9290,15 +9356,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9344,15 +9410,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9398,15 +9464,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9452,15 +9518,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9506,15 +9572,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9560,15 +9626,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9601,36 +9667,36 @@ au
|
||||
au
|
||||
au
|
||||
AG
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
zH
|
||||
AG
|
||||
au
|
||||
au
|
||||
@@ -9668,15 +9734,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9722,15 +9788,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
Oz
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
@@ -9776,15 +9842,15 @@ qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
zH
|
||||
qo
|
||||
qo
|
||||
qo
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{
|
||||
"map_name": "Snow Taxi",
|
||||
"map_path": "map_files/Snaxi",
|
||||
"map_file":[
|
||||
"IcemoonUnderground_Below.dmm",
|
||||
"IcemoonUnderground_Above.dmm",
|
||||
"Snaxi.dmm"
|
||||
],
|
||||
"map_file": "Snaxi.dmm",
|
||||
"station_ruin_budget": 0,
|
||||
"space_ruin_levels": 0,
|
||||
"space_empty_levels": 0,
|
||||
|
||||
295
code/game/objects/structures/industrial_lift.dm
Normal file
295
code/game/objects/structures/industrial_lift.dm
Normal file
@@ -0,0 +1,295 @@
|
||||
///Collect and command
|
||||
/datum/lift_master
|
||||
var/list/lift_platforms
|
||||
|
||||
/datum/lift_master/Destroy()
|
||||
for(var/l in lift_platforms)
|
||||
var/obj/structure/industrial_lift/lift_platform = l
|
||||
lift_platform.lift_master_datum = null
|
||||
lift_platforms = null
|
||||
return ..()
|
||||
|
||||
/datum/lift_master/New(obj/structure/industrial_lift/lift_platform)
|
||||
Rebuild_lift_plaform(lift_platform)
|
||||
|
||||
/datum/lift_master/proc/add_lift_platforms(obj/structure/industrial_lift/new_lift_platform)
|
||||
if(new_lift_platform in lift_platforms)
|
||||
return
|
||||
new_lift_platform.lift_master_datum = src
|
||||
LAZYADD(lift_platforms, new_lift_platform)
|
||||
RegisterSignal(new_lift_platform, COMSIG_PARENT_QDELETING, .proc/remove_lift_platforms)
|
||||
|
||||
/datum/lift_master/proc/remove_lift_platforms(obj/structure/industrial_lift/old_lift_platform)
|
||||
if(!(old_lift_platform in lift_platforms))
|
||||
return
|
||||
old_lift_platform.lift_master_datum = null
|
||||
LAZYREMOVE(lift_platforms, old_lift_platform)
|
||||
UnregisterSignal(old_lift_platform, COMSIG_PARENT_QDELETING)
|
||||
|
||||
///Collect all bordered platforms
|
||||
/datum/lift_master/proc/Rebuild_lift_plaform(obj/structure/industrial_lift/base_lift_platform)
|
||||
add_lift_platforms(base_lift_platform)
|
||||
var/list/possible_expansions = list(base_lift_platform)
|
||||
while(possible_expansions.len)
|
||||
for(var/b in possible_expansions)
|
||||
var/obj/structure/industrial_lift/borderline = b
|
||||
var/list/result = borderline.lift_platform_expansion(src)
|
||||
if(length(result))
|
||||
for(var/p in result)
|
||||
if(lift_platforms.Find(p))
|
||||
continue
|
||||
var/obj/structure/industrial_lift/lift_platform = p
|
||||
add_lift_platforms(lift_platform)
|
||||
possible_expansions |= lift_platform
|
||||
possible_expansions -= borderline
|
||||
|
||||
///Move all platforms together
|
||||
/datum/lift_master/proc/MoveLift(going, mob/user)
|
||||
for(var/p in lift_platforms)
|
||||
var/obj/structure/industrial_lift/lift_platform = p
|
||||
lift_platform.travel(going)
|
||||
|
||||
/datum/lift_master/proc/MoveLiftHorizontal(going, z)
|
||||
var/max_x = 1
|
||||
var/max_y = 1
|
||||
var/min_x = world.maxx
|
||||
var/min_y = world.maxy
|
||||
|
||||
for(var/p in lift_platforms)
|
||||
var/obj/structure/industrial_lift/lift_platform = p
|
||||
max_x = max(max_x, lift_platform.x)
|
||||
max_y = max(max_y, lift_platform.y)
|
||||
min_x = min(min_x, lift_platform.x)
|
||||
min_y = min(min_y, lift_platform.y)
|
||||
|
||||
//This must be safe way to border tile to tile move of bordered platforms, that excludes platform overlapping.
|
||||
if( going & WEST )
|
||||
//Go along the X axis from min to max, from left to right
|
||||
for(var/x in min_x to max_x)
|
||||
if( going & NORTH )
|
||||
//Go along the Y axis from max to min, from up to down
|
||||
for(var/y in max_y to min_y step -1)
|
||||
var/obj/structure/industrial_lift/lift_platform = locate(/obj/structure/industrial_lift, locate(x, y, z))
|
||||
lift_platform.travel(going)
|
||||
else
|
||||
//Go along the Y axis from min to max, from down to up
|
||||
for(var/y in min_y to max_y)
|
||||
var/obj/structure/industrial_lift/lift_platform = locate(/obj/structure/industrial_lift, locate(x, y, z))
|
||||
lift_platform.travel(going)
|
||||
else
|
||||
//Go along the X axis from max to min, from right to left
|
||||
for(var/x in max_x to min_x step -1)
|
||||
if( going & NORTH )
|
||||
//Go along the Y axis from max to min, from up to down
|
||||
for(var/y in max_y to min_y step -1)
|
||||
var/obj/structure/industrial_lift/lift_platform = locate(/obj/structure/industrial_lift, locate(x, y, z))
|
||||
lift_platform.travel(going)
|
||||
else
|
||||
//Go along the Y axis from min to max, from down to up
|
||||
for(var/y in min_y to max_y)
|
||||
var/obj/structure/industrial_lift/lift_platform = locate(/obj/structure/industrial_lift, locate(x, y, z))
|
||||
lift_platform.travel(going)
|
||||
|
||||
///Check destination turfs
|
||||
/datum/lift_master/proc/Check_lift_move(check_dir)
|
||||
for(var/lift_platform in lift_platforms)
|
||||
var/turf/T = get_step_multiz(lift_platform, check_dir)
|
||||
if(!T)// || !isopenturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/industrial_lift
|
||||
name = "lift platform"
|
||||
desc = "A lightweight lift platform. It moves up and down."
|
||||
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
||||
icon_state = "catwalk"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 80, ACID = 50)
|
||||
max_integrity = 50
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = null
|
||||
obj_flags = CAN_BE_HIT | BLOCK_Z_OUT_DOWN
|
||||
|
||||
var/list/atom/movable/lift_load //things to move
|
||||
var/datum/lift_master/lift_master_datum //control from
|
||||
|
||||
/obj/structure/industrial_lift/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
RegisterSignal(src, COMSIG_MOVABLE_CROSSED, .proc/AddItemOnLift)
|
||||
RegisterSignal(loc, COMSIG_ATOM_CREATED, .proc/AddItemOnLift)//For atoms created on platform
|
||||
RegisterSignal(src, COMSIG_MOVABLE_UNCROSSED, .proc/RemoveItemFromLift)
|
||||
|
||||
if(!lift_master_datum)
|
||||
lift_master_datum = new(src)
|
||||
|
||||
/obj/structure/industrial_lift/Move(atom/newloc, direct)
|
||||
UnregisterSignal(loc, COMSIG_ATOM_CREATED)
|
||||
. = ..()
|
||||
RegisterSignal(newloc, COMSIG_ATOM_CREATED, .proc/AddItemOnLift)//For atoms created on platform
|
||||
|
||||
/obj/structure/industrial_lift/proc/RemoveItemFromLift(datum/source, atom/movable/AM)
|
||||
if(!(AM in lift_load))
|
||||
return
|
||||
LAZYREMOVE(lift_load, AM)
|
||||
UnregisterSignal(AM, COMSIG_PARENT_QDELETING)
|
||||
|
||||
/obj/structure/industrial_lift/proc/AddItemOnLift(datum/source, atom/movable/AM)
|
||||
if(AM in lift_load)
|
||||
return
|
||||
LAZYADD(lift_load, AM)
|
||||
RegisterSignal(AM, COMSIG_PARENT_QDELETING, .proc/RemoveItemFromLift)
|
||||
|
||||
/obj/structure/industrial_lift/proc/lift_platform_expansion(datum/lift_master/lift_master_datum)
|
||||
. = list()
|
||||
for(var/direction in GLOB.cardinals)
|
||||
var/obj/structure/industrial_lift/neighbor = locate() in get_step(src, direction)
|
||||
if(!neighbor)
|
||||
continue
|
||||
. += neighbor
|
||||
|
||||
/obj/structure/industrial_lift/proc/travel(going)
|
||||
var/list/things2move = LAZYCOPY(lift_load)
|
||||
var/turf/destination
|
||||
if(!isturf(going))
|
||||
destination = get_step_multiz(src, going)
|
||||
else
|
||||
destination = going
|
||||
forceMove(destination)
|
||||
for(var/am in things2move)
|
||||
var/atom/movable/thing = am
|
||||
thing.forceMove(destination)
|
||||
|
||||
/obj/structure/industrial_lift/proc/use(mob/user, is_ghost=FALSE)
|
||||
if (is_ghost && !in_range(src, user))
|
||||
return
|
||||
|
||||
var/static/list/tool_list = list(
|
||||
"Up" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
|
||||
"Down" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH)
|
||||
)
|
||||
|
||||
var/turf/can_move_up = lift_master_datum.Check_lift_move(UP)
|
||||
var/turf/can_move_up_down = lift_master_datum.Check_lift_move(DOWN)
|
||||
|
||||
if (!can_move_up && !can_move_up_down)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to able move anywhere!</span>")
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
if("Up")
|
||||
if(can_move_up)
|
||||
lift_master_datum.MoveLift(UP, user)
|
||||
show_fluff_message(TRUE, user)
|
||||
use(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to able move up!</span>")
|
||||
use(user)
|
||||
if("Down")
|
||||
if(can_move_up_down)
|
||||
lift_master_datum.MoveLift(DOWN, user)
|
||||
show_fluff_message(FALSE, user)
|
||||
use(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] doesn't seem to able move down!</span>")
|
||||
use(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/industrial_lift/proc/check_menu(mob/user)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/industrial_lift/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
use(user)
|
||||
|
||||
/obj/structure/industrial_lift/attack_paw(mob/user)
|
||||
return use(user)
|
||||
|
||||
/obj/structure/industrial_lift/attackby(obj/item/W, mob/user, params)
|
||||
return use(user)
|
||||
|
||||
/obj/structure/industrial_lift/attack_robot(mob/living/silicon/robot/R)
|
||||
if(R.Adjacent(src))
|
||||
return use(R)
|
||||
|
||||
/obj/structure/industrial_lift/proc/show_fluff_message(going_up, mob/user)
|
||||
if(going_up)
|
||||
user.visible_message("<span class='notice'>[user] move lift up.</span>", "<span class='notice'>Lift move up.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] move lift down.</span>", "<span class='notice'>Lift move down.</span>")
|
||||
|
||||
/obj/structure/industrial_lift/Destroy()
|
||||
QDEL_NULL(lift_master_datum)
|
||||
var/list/border_lift_platforms = lift_platform_expansion()
|
||||
moveToNullspace()
|
||||
for(var/border_lift in border_lift_platforms)
|
||||
lift_master_datum = new(border_lift)
|
||||
return ..()
|
||||
|
||||
/obj/structure/industrial_lift/debug
|
||||
name = "transport platform"
|
||||
desc = "A lightweight platform. It moves in any direction, except up and down."
|
||||
color = "#5286b9ff"
|
||||
|
||||
/obj/structure/industrial_lift/debug/use(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
//NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST
|
||||
var/static/list/tool_list = list(
|
||||
"NORTH" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
|
||||
"NORTHEAST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = NORTH),
|
||||
"EAST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = EAST),
|
||||
"SOUTHEAST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = EAST),
|
||||
"SOUTH" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH),
|
||||
"SOUTHWEST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = SOUTH),
|
||||
"WEST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = WEST),
|
||||
"NORTHWEST" = image(icon = 'icons/testing/turf_analysis.dmi', icon_state = "red_arrow", dir = WEST)
|
||||
)
|
||||
|
||||
var/result = show_radial_menu(user, src, tool_list, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = FALSE)
|
||||
if (!in_range(src, user))
|
||||
return // nice try
|
||||
|
||||
switch(result)
|
||||
if("NORTH")
|
||||
lift_master_datum.MoveLiftHorizontal(NORTH, z)
|
||||
use(user)
|
||||
if("NORTHEAST")
|
||||
lift_master_datum.MoveLiftHorizontal(NORTHEAST, z)
|
||||
use(user)
|
||||
if("EAST")
|
||||
lift_master_datum.MoveLiftHorizontal(EAST, z)
|
||||
use(user)
|
||||
if("SOUTHEAST")
|
||||
lift_master_datum.MoveLiftHorizontal(SOUTHEAST, z)
|
||||
use(user)
|
||||
if("SOUTH")
|
||||
lift_master_datum.MoveLiftHorizontal(SOUTH, z)
|
||||
use(user)
|
||||
if("SOUTHWEST")
|
||||
lift_master_datum.MoveLiftHorizontal(SOUTHWEST, z)
|
||||
use(user)
|
||||
if("WEST")
|
||||
lift_master_datum.MoveLiftHorizontal(WEST, z)
|
||||
use(user)
|
||||
if("NORTHWEST")
|
||||
lift_master_datum.MoveLiftHorizontal(NORTHWEST, z)
|
||||
use(user)
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -377,13 +377,9 @@
|
||||
var/static/radial_shuffle = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_shuffle")
|
||||
var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
|
||||
|
||||
/obj/item/tcgcard_deck/Initialize(mapload)
|
||||
. = ..()
|
||||
LoadComponent(/datum/component/storage/concrete/tcg)
|
||||
|
||||
/obj/item/tcgcard_deck/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage/concrete/tcg)
|
||||
var/datum/component/storage/STR = LoadComponent(/datum/component/storage/concrete/tcg)
|
||||
STR.storage_flags = STORAGE_FLAGS_LEGACY_DEFAULT
|
||||
STR.max_volume = DEFAULT_VOLUME_TINY * 30
|
||||
STR.max_w_class = DEFAULT_VOLUME_TINY
|
||||
|
||||
@@ -1368,6 +1368,7 @@
|
||||
#include "code\game\objects\structures\headpike.dm"
|
||||
#include "code\game\objects\structures\hivebot.dm"
|
||||
#include "code\game\objects\structures\holosign.dm"
|
||||
#include "code\game\objects\structures\industrial_lift.dm"
|
||||
#include "code\game\objects\structures\janicart.dm"
|
||||
#include "code\game\objects\structures\kitchen_spike.dm"
|
||||
#include "code\game\objects\structures\ladders.dm"
|
||||
|
||||
Reference in New Issue
Block a user