Removed turf_animation for now, ported vg hasproximity optimisation. Rewrite and refactor of how turfs handle icon updates, edge smoothing and

construction/deconstruction. Major map rework/changes.
This commit is contained in:
Zuhayr
2015-08-16 06:05:21 -07:00
parent 4a0a6e7163
commit c8baafed2a
91 changed files with 7763 additions and 8513 deletions
+1
View File
@@ -338,6 +338,7 @@ Alien plants should do something if theres a lot of poison
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
flags = PROXMOVE
/obj/effect/alien/egg/New()
if(config.aliens_allowed)
@@ -1,26 +0,0 @@
/obj/effect/vaultspawner
var/maxX = 6
var/maxY = 6
var/minX = 2
var/minY = 2
/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null)
if(!type)
type = pick("sandstone","rock","alien")
var/lowBoundX = location.x
var/lowBoundY = location.y
var/hiBoundX = location.x + rand(lX,uX)
var/hiBoundY = location.y + rand(lY,uY)
var/z = location.z
for(var/i = lowBoundX,i<=hiBoundX,i++)
for(var/j = lowBoundY,j<=hiBoundY,j++)
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
new /turf/simulated/wall/vault(locate(i,j,z),type)
else
new /turf/simulated/floor/vault(locate(i,j,z),type)
qdel(src)
@@ -21,7 +21,10 @@
if(istype(A, /turf/simulated/floor))
var/turf/simulated/floor/F = A
if(F.is_steel_floor()) // only tiled floors
if(F.flooring && F.flooring.name == "floor") // only tiled floors
if(F.broken || F.burnt)
usr << "<span class='warning'>\The [F] is too damaged to repaint.</span>"
return
if(tile_dir_mode)
var/D = get_dir(usr, F)
if(usr.loc == F)
@@ -78,7 +81,7 @@
F.set_dir(0)
F.icon_state = mode
else
usr << "You can't paint that!"
usr << "<span class='warning'>You can't paint that!</span>"
/obj/item/device/floor_painter/attack_self(mob/user as mob)
var/type = input("What type of floor?", "Floor painter", "solid") in list("solid", "corner", "opposite corners", "side/three corners", "special", "letters")
@@ -9,6 +9,7 @@
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
flags = PROXMOVE
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
@@ -69,7 +70,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -80,7 +81,7 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -1,34 +0,0 @@
/obj/item/stack/tile/steel
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon" //why?
icon_state = "tile"
force = 6.0
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
/obj/item/stack/tile/steel/New(var/loc, var/amount=null)
..()
src.pixel_x = rand(1, 14)
src.pixel_y = rand(1, 14)
return
/obj/item/stack/tile/steel/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/steel
build_type = /obj/item/stack/tile/steel
/obj/item/stack/tile/steel/proc/build(turf/S as turf)
if (istype(S,/turf/space))
S.ChangeTurf(/turf/simulated/floor/plating/airless)
else
S.ChangeTurf(/turf/simulated/floor/plating)
return
@@ -5,7 +5,7 @@
* Wood
* Carpet
*/
/obj/item/stack/tile
name = "tile"
singular_name = "tile"
@@ -14,6 +14,11 @@
max_amount = 60
var/build_type = null
/obj/item/stack/tile/New()
..()
pixel_x = rand(-7, 7)
pixel_y = rand(-7, 7)
/*
* Grass
*/
@@ -64,3 +69,43 @@
throw_speed = 5
throw_range = 20
flags = 0
/obj/item/stack/tile/floor
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon" //why?
icon_state = "tile"
force = 6.0
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
/obj/item/stack/tile/floor_white
name = "white floor tile"
singular_name = "white floor tile"
icon_state = "tile_white"
matter = list("plastic" = 937.5)
/obj/item/stack/tile/floor_dark
name = "dark floor tile"
singular_name = "dark floor tile"
icon_state = "fr_tile"
matter = list("plasteel" = 937.5)
/obj/item/stack/tile/floor_freezer
name = "freezer floor tile"
singular_name = "freezer floor tile"
icon_state = "tile_freezer"
matter = list("plastic" = 937.5)
/obj/item/stack/tile/floor/cyborg
name = "floor tile synthesizer"
desc = "A device that makes floor tiles."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(250)
stacktype = /obj/item/stack/tile/floor
build_type = /obj/item/stack/tile/floor
+1 -1
View File
@@ -103,7 +103,7 @@
else if(!deconstruct && (istype(T,/turf/space) || istype(T,get_base_turf(T.z))))
build_cost = 1
build_type = "floor"
build_turf = /turf/simulated/floor/plating/airless
build_turf = /turf/simulated/floor/airless
else if(deconstruct && istype(T,/turf/simulated/wall))
var/turf/simulated/wall/W = T
build_delay = deconstruct ? 50 : 40
+2
View File
@@ -126,6 +126,8 @@
/obj/proc/hide(h)
return
/obj/proc/hides_under_flooring()
return 0
/obj/proc/hear_talk(mob/M as mob, text, verb, datum/language/speaking)
if(talking_atom)
+1 -1
View File
@@ -53,7 +53,7 @@
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile/steel))
if (istype(C, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
+3
View File
@@ -184,3 +184,6 @@ obj/structure/safe/ex_act(severity)
/obj/structure/safe/floor/hide(var/intact)
invisibility = intact ? 101 : 0
/obj/structure/safe/floor/hides_under_flooring()
return 1