From 0698fb759a23e7e1b62f01cd3faf8b5fd2224139 Mon Sep 17 00:00:00 2001
From: CIB According this blueprints you are in open space now. According \the [src] you are in open space now. Mark this place as a new area. According this blueprints you are in [A.name] now. According \the [src] you are in \The [A] now. You may
-move an amendment to the drawing.
"
dat += "(Message Holder) |
"
diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm
index 33dffbcb83b..f77e9f4a77a 100644
--- a/code/game/master_controller.dm
+++ b/code/game/master_controller.dm
@@ -47,7 +47,7 @@ datum/controller/game_controller
world.tick_lag = config.Ticklag
- createRandomZlevel()
+// createRandomZlevel()
// Sleep for about 5 seconds to allow background initialization procs to finish
sleep(50)
diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm
index 10791618fbf..ba1a2597c18 100644
--- a/code/game/objects/items/apc_frame.dm
+++ b/code/game/objects/items/apc_frame.dm
@@ -12,7 +12,7 @@
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
- var/turf/loc = get_turf_loc(usr)
+ var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red APC cannot be placed on this spot."
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 325a6cbdc75..11ea1670586 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -1,4 +1,11 @@
/obj/item/blueprints
+ name = "station blueprints"
+ desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it. Looks like you can edit the station's layout with these."
+ icon = 'items.dmi'
+ icon_state = "blueprints"
+
+ var/list/image/helper_images = list()
+
var/const/AREA_ERRNONE = 0
var/const/AREA_STATION = 1
var/const/AREA_SPACE = 2
@@ -9,6 +16,7 @@
var/const/BORDER_BETWEEN = 2
var/const/BORDER_2NDTILE = 3
var/const/BORDER_SPACE = 4
+ var/const/BORDER_AREA = 5
var/const/ROOM_ERR_LOLWAT = 0
var/const/ROOM_ERR_SPACE = -1
@@ -16,7 +24,7 @@
/obj/item/blueprints/attack_self(mob/M as mob)
if (!istype(M,/mob/living/carbon/human))
- M << "This is stack of useless pieces of harsh paper." //monkeys cannot into projecting
+ M << "This is stack of useless pieces of heavy paper." //monkeys cannot into projecting
return
interact()
return
@@ -32,12 +40,24 @@
if (get_area_type()!=AREA_SPACE)
interact()
return
- create_area()
+ spawn()
+ create_area(usr.client)
+ if(usr && usr.client)
+ for(var/image/to_remove in helper_images)
+ if(to_remove in usr.client.images)
+ usr.client.images.Remove(to_remove)
+ del(to_remove)
if ("edit_area")
if (get_area_type()!=AREA_STATION)
interact()
return
- edit_area()
+ spawn()
+ edit_area(usr.client)
+ if(usr && usr.client)
+ for(var/image/to_remove in helper_images)
+ if(to_remove in usr.client.images)
+ usr.client.images.Remove(to_remove)
+ del(to_remove)
/obj/item/blueprints/proc/interact()
var/area/A = get_area()
@@ -48,18 +68,18 @@
switch (get_area_type())
if (AREA_SPACE)
text += {"
-
This place doesn't noted on this blueprints.
+This place isn't noted on \the [src].
"} else return @@ -67,14 +87,10 @@ move an amendment to the drawing. usr << browse(text, "window=blueprints") onclose(usr, "blueprints") - -/obj/item/blueprints/proc/get_area() - var/turf/T = get_turf_loc(usr) - var/area/A = T.loc - A = A.master - return A - -/obj/item/blueprints/proc/get_area_type(var/area/A = get_area()) +/obj/item/blueprints/proc/get_area_type(var/turf/T = get_turf(src)) + if(!T) + return AREA_SPECIAL + var/area/A = get_area(T) if (A.name == "Space") return AREA_SPACE var/list/SPECIALS = list( @@ -87,99 +103,235 @@ move an amendment to the drawing. /area/syndicate_station, /area/wizard_station, /area/prison - // /area/derelict //commented out, all hail derelict-rebuilders! ) for (var/type in SPECIALS) if ( istype(A,type) ) return AREA_SPECIAL return AREA_STATION -/obj/item/blueprints/proc/create_area() +/obj/item/blueprints/proc/create_area(var/client/user) //world << "DEBUG: create_area" - var/res = detect_room(get_turf_loc(usr)) - if(!istype(res,/list)) - switch(res) + var/list/turf/turfs = detect_room(get_turf(user.mob),user) + if(!istype(turfs)) + switch(turfs) if(ROOM_ERR_SPACE) - usr << "\red New area must be complete airtight!" + usr << "\red The new area must be completly airtight!" return if(ROOM_ERR_TOOLARGE) - usr << "\red New area too large!" + usr << "\red The new area is too large!" return else usr << "\red Error! Please notify administration!" return - var/list/turf/turfs = res - var/str = sanitize(trim(input(usr,"New area title","Blueprints editing"))) - if(!str || !length(str)) //cancel - return - if(length(str) > 50) - usr << "\red Text too long." - return - var/area/A = new - A.name = str - A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing - //var/ma - //ma = A.master ? "[A.master]" : "(null)" - //world << "DEBUG: create_area:dwSeT&E`Aq@@=#%`v4nV#dzu
z`ij+6MoLQb)Xxvnd3^iGKFrqiuDra8l4EVmM1<3RbiviwdB=6sKEr;8l#zMpO_3zV
z;e*6)g J>kS_0-Hok_c5mjzk8
z^qes+-ky8^>GP9XuT-Z*(3#fYGg$Ywq@o!en1vUNA_y>R Fv4i9uqHbBQ~*w^yR^Z9auXv577=_Q2$Bns_damUM#S?jvP
z^54OjNzbPU+>uf%UP>(N6;TITfaJN7ARlimG499BNcO$eWF)iHL`65alOUIv&J^Fs
zBP)9HhMONB;_e?ZAtp6Pi>$40ury3D?;ZmG+D$te Q$M6TVq
z4y>2_q9Q_iV`gS%=|f^wpse}8&OV)o)T4Y0|5MO+so2B(^7eLD8>e*p(`5{CWQ`$P
zy13)7d0afa9bD>(UtWA|`Co!t)-gM$N^8ru@PBX6a5(W+HubW!;2^NZ2|fg@K0b^v
zgLUcTqzT{X)XHJFFF`#~jRPdr2a>#B{zpDoZFenIH&`Gbe6)rJdT_B!%Xt*RWdti;
z3vYVC76(6oK1cAQvDOe?P_nojC|&|;V6A3Ic6K&hH{+PA1_}@nf(Gt-mMaC 9T?}`}g%Z=!27|B!2dyjHM8ST~2Zk?+8T%@pEX=V;-tNw(V}vVL
zBUVLVa7s@YR;|URvDeLs2u3V1DW6mDSl+uPX*&imOave!Bzsb`&F6c~rQ~I{I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