Water tile fixes and other minor fancy turf fixes

This commit is contained in:
Mark van Alphen
2019-06-06 00:09:19 +02:00
parent cdaeb5d59c
commit fad735142b
15 changed files with 421 additions and 388 deletions
+28 -19
View File
@@ -20,13 +20,36 @@
var/list/linkedmist = list() //Used to keep track of created mist
var/deep_water = FALSE //set to 1 to drown even standing people
/obj/machinery/poolcontroller/invisible
invisibility = INVISIBILITY_MAXIMUM
name = "Water Controller"
desc = "An invisible water controller. Players shouldn't see this."
/obj/machinery/poolcontroller/New() //This proc automatically happens on world start
/obj/machinery/poolcontroller/invisible/sea
name = "Sea Controller"
desc = "A controller for the underwater portion of the sea. Players shouldn't see this."
deep_water = TRUE
/obj/machinery/poolcontroller/Initialize(mapload)
var/contents_loop = linked_area
if(!linked_area)
for(var/turf/simulated/floor/beach/water/W in range(srange,src)) //Search for /turf/simulated/floor/beach/water in the range of var/srange
linkedturfs += W //Add found pool turfs to the central list.
W.linkedcontroller = src // And add the linked controller to itself.
..() //Changed to call parent as per MarkvA's recommendation
contents_loop = range(srange, src)
for(var/turf/T in contents_loop)
if(istype(T, /turf/simulated/floor/beach/water))
var/turf/simulated/floor/beach/water/W = T
W.linkedcontroller = src
linkedturfs += T
else if(istype(T, /turf/unsimulated/beach/water))
var/turf/unsimulated/beach/water/W = T
W.linkedcontroller = src
linkedturfs += T
. = ..()
/obj/machinery/poolcontroller/invisible/Initialize(mapload)
linked_area = get_area(src)
. = ..()
/obj/machinery/poolcontroller/emag_act(user as mob) //Emag_act, this is called when it is hit with a cryptographic sequencer.
if(!emagged) //If it is not already emagged, emag it.
@@ -190,20 +213,6 @@
return 1
/obj/machinery/poolcontroller/seacontroller
invisibility = 101
unacidable = 1
name = "Sea Controller"
desc = "A controller for the underwater portion of the sea. Players shouldn't see this."
deep_water = TRUE //deep sea is deep water
/obj/machinery/poolcontroller/seacontroller/Initialize()
linked_area = get_area(src)
for(var/turf/unsimulated/beach/water/W in linked_area)
linkedturfs += W //Add found pool turfs to the central list.
W.linkedcontroller = src // And add the linked controller to itself.
..()
#undef FRIGID
#undef COOL
#undef NORMAL
@@ -18,9 +18,6 @@
if(prob(floor_variance))
icon_state = "[environment_type][rand(0,12)]"
/turf/simulated/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
/turf/simulated/floor/plating/asteroid/burn_tile()
return
@@ -254,6 +254,3 @@
/turf/simulated/floor/plating/abductor2/burn_tile()
return //unburnable
/turf/simulated/floor/plating/abductor2/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
@@ -67,10 +67,6 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/obj/machinery/poolcontroller/linkedcontroller = null
/turf/simulated/floor/beach/water/pry_tile(obj/item/C, mob/user, silent = FALSE)
return //cannot pry off tiles of water
/turf/simulated/floor/beach/water/New()
..()
var/image/overlay_image = image('icons/misc/beach.dmi', icon_state = "water5", layer = ABOVE_MOB_LAYER)
+5 -7
View File
@@ -2,7 +2,7 @@
name = "plating"
icon_state = "plating"
icon = 'icons/turf/floors/plating.dmi'
intact = 0
intact = FALSE
floor_tile = null
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
burnt_states = list("floorscorched1", "floorscorched2")
@@ -103,7 +103,7 @@
/turf/simulated/floor/engine/attack_hand(mob/user as mob)
user.Move_Pulled(src)
/turf/simulated/floor/engine/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
/turf/simulated/floor/engine/pry_tile(obj/item/C, mob/user, silent = FALSE)
return
/turf/simulated/floor/engine/attackby(obj/item/C as obj, mob/user as mob, params)
@@ -224,7 +224,7 @@
/turf/simulated/floor/snow/ex_act(severity)
return
/turf/simulated/floor/snow/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
/turf/simulated/floor/snow/pry_tile(obj/item/C, mob/user, silent = FALSE)
return
/turf/simulated/floor/plating/metalfoam
@@ -243,12 +243,10 @@
if(MFOAM_IRON)
icon_state = "ironfoam"
/turf/simulated/floor/plating/metalfoam/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
/turf/simulated/floor/plating/metalfoam/attackby(var/obj/item/C, mob/user, params)
if(..())
return 1
return TRUE
if(istype(C) && C.force)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)