Merge pull request #11615 from Tayyyyyyy/aa/parallax-no-sql

Parallax
This commit is contained in:
Fox McCloud
2019-08-19 21:13:33 -04:00
committed by GitHub
31 changed files with 544 additions and 34 deletions
+2
View File
@@ -67,6 +67,8 @@
var/can_get_auto_cryod = TRUE
var/hide_attacklogs = FALSE // For areas such as thunderdome, lavaland syndiebase, etc which generate a lot of spammy attacklogs. Reduces log priority.
var/parallax_movedir = 0
/area/Initialize(mapload)
GLOB.all_areas += src
icon_state = ""
+3 -1
View File
@@ -26,7 +26,7 @@
var/inertia_move_delay = 5
var/moving_diagonally = 0 //0: not doing a diagonal move. 1 and 2: doing the first/second step of the diagonal move
var/list/client_mobs_in_contents
var/area/areaMaster
/atom/movable/New()
@@ -215,6 +215,8 @@
if(!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
newtonian_move(Dir)
if(length(client_mobs_in_contents))
update_parallax_contents()
return TRUE
// Previously known as HasEntered()
+5
View File
@@ -22,6 +22,11 @@
if(!drop_stuff())
STOP_PROCESSING(SSprocessing, src)
/turf/open/chasm/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/floors.dmi'
underlay_appearance.icon_state = "basalt"
return TRUE
/turf/simulated/floor/chasm/attackby(obj/item/C, mob/user, params, area/area_restriction)
..()
if(istype(C, /obj/item/stack/rods))
@@ -117,6 +117,9 @@
burnt = 1
update_icon()
/turf/open/floor/carpet/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
/turf/simulated/floor/carpet/black
icon = 'icons/turf/floors/carpet_black.dmi'
floor_tile = /obj/item/stack/tile/carpet/black
@@ -127,6 +130,7 @@
icon_state = "0"
floor_tile = /obj/item/stack/tile/fakespace
broken_states = list("damaged")
plane = PLANE_SPACE
/turf/simulated/floor/fakespace/New()
..()
@@ -137,3 +141,9 @@
icon_state = "arcade"
floor_tile = /obj/item/stack/tile/arcade_carpet
smooth = SMOOTH_FALSE
/turf/open/floor/fakespace/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/space.dmi'
underlay_appearance.icon_state = SPACE_ICON_STATE
underlay_appearance.plane = PLANE_SPACE
return TRUE
@@ -81,5 +81,8 @@
planetary_atmos = TRUE
desc = "A floor with a square pattern. It's faintly cool to the touch."
/turf/open/indestructible/hierophant/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
/turf/simulated/floor/indestructible/hierophant/two
icon_state = "hierophant2"
+5
View File
@@ -41,6 +41,11 @@
/turf/simulated/floor/plating/lava/remove_plating()
return
/turf/open/lava/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/floors.dmi'
underlay_appearance.icon_state = "basalt"
return TRUE
/turf/simulated/floor/plating/lava/proc/is_safe()
var/static/list/lava_safeties_typecache = typecacheof(list(/obj/structure/lattice/catwalk, /obj/structure/stone_tile))
var/list/found_safeties = typecache_filter_list(contents, lava_safeties_typecache)
+7
View File
@@ -48,6 +48,13 @@
setDir(angle2dir(rotation + dir2angle(dir)))
queue_smooth(src)
/turf/simulated/mineral/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
if(turf_type)
underlay_appearance.icon = initial(turf_type.icon)
underlay_appearance.icon_state = initial(turf_type.icon_state)
return TRUE
return ..()
/turf/simulated/mineral/attackby(var/obj/item/pickaxe/P as obj, mob/user as mob, params)
if(!user.IsAdvancedToolUser())
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
+14 -1
View File
@@ -16,6 +16,7 @@
var/destination_z
var/destination_x
var/destination_y
plane = PLANE_SPACE
/turf/space/Initialize(mapload)
if(!istype(src, /turf/space/transit))
@@ -105,6 +106,12 @@
..()
if((!(A) || !(src in A.locs)))
return
if(ismob(A))
var/mob/M = A
if(M && M.client && M.client.new_parallax_movedir)
M.client.new_parallax_movedir = 0
M.update_parallax_contents()
if(destination_z && destination_x && destination_y)
A.forceMove(locate(destination_x, destination_y, destination_z))
@@ -262,4 +269,10 @@
/turf/space/attack_ghost(mob/dead/observer/user)
if(destination_z)
var/turf/T = locate(destination_x, destination_y, destination_z)
user.forceMove(T)
user.forceMove(T)
/turf/space/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/space.dmi'
underlay_appearance.icon_state = SPACE_ICON_STATE
underlay_appearance.plane = PLANE_SPACE
return TRUE
+7
View File
@@ -1,5 +1,6 @@
/turf/space/transit
var/pushdirection // push things that get caught in the transit tile this direction
plane = PLANE_SPACE
//Overwrite because we dont want people building rods in space.
/turf/space/transit/attackby(obj/O as obj, mob/user as mob, params)
@@ -151,3 +152,9 @@
icon_state = "speedspace_ns_[state]"
transform = turn(matrix(), angle)
/turf/space/transit/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = 'icons/turf/space.dmi'
underlay_appearance.icon_state = SPACE_ICON_STATE
underlay_appearance.plane = PLANE_SPACE
return TRUE
+6
View File
@@ -470,6 +470,12 @@
if(ismob(A) || .)
A.ratvar_act()
/turf/proc/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = icon
underlay_appearance.icon_state = icon_state
underlay_appearance.dir = adjacency_dir
return TRUE
/turf/proc/add_blueprints(atom/movable/AM)
var/image/I = new
I.appearance = AM.appearance