12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
+91 -90
View File
@@ -1,3 +1,18 @@
#define AREA_ERRNONE 0
#define AREA_STATION 1
#define AREA_SPACE 2
#define AREA_SPECIAL 3
#define BORDER_ERROR 0
#define BORDER_NONE 1
#define BORDER_BETWEEN 2
#define BORDER_2NDTILE 3
#define BORDER_SPACE 4
#define ROOM_ERR_LOLWAT 0
#define ROOM_ERR_SPACE 1
#define ROOM_ERR_TOOLARGE 2
/obj/item/areaeditor
name = "area modification item"
icon = 'icons/obj/items.dmi'
@@ -5,22 +20,6 @@
attack_verb = list("attacked", "bapped", "hit")
var/fluffnotice = "Nobody's gonna read this stuff!"
var/const/AREA_ERRNONE = 0
var/const/AREA_STATION = 1
var/const/AREA_SPACE = 2
var/const/AREA_SPECIAL = 3
var/const/BORDER_ERROR = 0
var/const/BORDER_NONE = 1
var/const/BORDER_BETWEEN = 2
var/const/BORDER_2NDTILE = 3
var/const/BORDER_SPACE = 4
var/const/ROOM_ERR_LOLWAT = 0
var/const/ROOM_ERR_SPACE = -1
var/const/ROOM_ERR_TOOLARGE = -2
/obj/item/areaeditor/attack_self(mob/user)
add_fingerprint(user)
var/text = "<BODY><HTML><head><title>[src]</title></head> \
@@ -43,37 +42,9 @@
return
if(href_list["create_area"])
if(get_area_type()==AREA_SPACE)
create_area()
create_area(usr)
updateUsrDialog()
//One-use area creation permits.
/obj/item/areaeditor/permit
name = "construction permit"
icon_state = "permit"
desc = "This is a one-use permit that allows the user to offically declare a built room as new addition to the station."
fluffnotice = "Nanotrasen Engineering requires all on-station construction projects to be approved by a head of staff, as detailed in Nanotrasen Company Regulation 512-C (Mid-Shift Modifications to Company Property). \
By submitting this form, you accept any fines, fees, or personal injury/death that may occur during construction."
w_class = 1
/obj/item/areaeditor/permit/attack_self(mob/user)
. = ..()
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
popup.set_content(.)
popup.open()
onclose(usr, "blueprints")
/obj/item/areaeditor/permit/create_area()
var/success = ..()
if(success)
qdel(src)
//Station blueprints!!!
/obj/item/areaeditor/blueprints
name = "station blueprints"
@@ -81,27 +52,38 @@
icon = 'icons/obj/items.dmi'
icon_state = "blueprints"
fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage."
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
var/list/image/showing = list()
var/client/viewing
var/legend = FALSE //Viewing the wire legend
/obj/item/areaeditor/blueprints/Destroy()
clear_viewer()
return ..()
/obj/item/areaeditor/blueprints/attack_self(mob/user)
. = ..()
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
. += "<p>You may <a href='?src=\ref[src];edit_area=1'>make an amendment</a> to the drawing.</p>"
if(!viewing)
. += "<p><a href='?src=\ref[src];view_blueprints=1'>View structural data</a></p>"
if(!legend)
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
. += "<p>You may <a href='?src=\ref[src];edit_area=1'>make an amendment</a> to the drawing.</p>"
. += "<p><a href='?src=\ref[src];view_legend=1'>View wire colour legend</a></p>"
if(!viewing)
. += "<p><a href='?src=\ref[src];view_blueprints=1'>View structural data</a></p>"
else
. += "<p><a href='?src=\ref[src];refresh=1'>Refresh structural data</a></p>"
. += "<p><a href='?src=\ref[src];hide_blueprints=1'>Hide structural data</a></p>"
else
. += "<p><a href='?src=\ref[src];refresh=1'>Refresh structural data</a></p>"
. += "<p><a href='?src=\ref[src];hide_blueprints=1'>Hide structural data</a></p>"
if(legend == TRUE)
. += "<a href='?src=\ref[src];exit_legend=1'><< Back</a>"
. += view_wire_devices(user);
else
//legend is a wireset
. += "<a href='?src=\ref[src];view_legend=1'><< Back</a>"
. += view_wire_set(user, legend)
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
popup.set_content(.)
popup.open()
@@ -114,6 +96,12 @@
if(get_area_type()!=AREA_STATION)
return
edit_area()
if(href_list["exit_legend"])
legend = FALSE;
if(href_list["view_legend"])
legend = TRUE;
if(href_list["view_wireset"])
legend = href_list["view_wireset"];
if(href_list["view_blueprints"])
set_viewer(usr, "<span class='notice'>You flip the blueprints over to view the complex information diagram.</span>")
if(href_list["hide_blueprints"])
@@ -152,6 +140,7 @@
/obj/item/areaeditor/blueprints/dropped(mob/user)
..()
clear_viewer()
legend = FALSE
/obj/item/areaeditor/proc/get_area()
@@ -179,29 +168,48 @@
return AREA_SPECIAL
return AREA_STATION
/obj/item/areaeditor/blueprints/proc/view_wire_devices(mob/user)
var/message = "<br>You examine the wire legend.<br>"
for(var/wireset in wire_color_directory)
message += "<br><a href='?src=\ref[src];view_wireset=[wireset]'>[wire_name_directory[wireset]]</a>"
message += "</p>"
return message
/obj/item/areaeditor/proc/create_area()
var/res = detect_room(get_turf(usr))
/obj/item/areaeditor/blueprints/proc/view_wire_set(mob/user, wireset)
//for some reason you can't use wireset directly as a derefencer so this is the next best :/
for(var/device in wire_color_directory)
if("[device]" == wireset) //I know... don't change it...
var/message = "<p><b>[wire_name_directory[device]]:</b>"
for(var/Col in wire_color_directory[device])
var/wire_name = wire_color_directory[device][Col]
if(!findtext(wire_name, WIRE_DUD_PREFIX)) //don't show duds
message += "<p><span style='color: [Col]'>[Col]</span>: [wire_name]</p>"
message += "</p>"
return message
return ""
/proc/create_area(mob/living/creator)
var/res = detect_room(get_turf(creator))
if(!istype(res,/list))
switch(res)
if(ROOM_ERR_SPACE)
usr << "<span class='warning'>The new area must be completely airtight.</span>"
creator << "<span class='warning'>The new area must be completely airtight.</span>"
return
if(ROOM_ERR_TOOLARGE)
usr << "<span class='warning'>The new area is too large.</span>"
creator << "<span class='warning'>The new area is too large.</span>"
return
else
usr << "<span class='warning'>Error! Please notify administration.</span>"
creator << "<span class='warning'>Error! Please notify administration.</span>"
return
var/list/turfs = res
var/str = trim(stripped_input(usr,"New area name:", "Blueprint Editing", "", MAX_NAME_LEN))
var/str = trim(stripped_input(creator,"New area name:", "Blueprint Editing", "", MAX_NAME_LEN))
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
usr << "<span class='warning'>The given name is too long. The area remains undefined.</span>"
creator << "<span class='warning'>The given name is too long. The area remains undefined.</span>"
return
var/area/old = get_area(get_turf(src))
var/area/old = get_area(get_turf(creator))
var/old_gravity = old.has_gravity
var/area/A
@@ -213,21 +221,21 @@
turfs -= key
if(A)
A.contents += turfs
A.set_dynamic_lighting()
A.SetDynamicLighting()
else
A = new
A.setup(str)
A.contents += turfs
A.set_dynamic_lighting()
A.SetDynamicLighting()
A.has_gravity = old_gravity
interact()
creator << "<span class='notice'>You have created a new area, named [str]. It is now weather proof, and constructing an APC will allow it to be powered.</span>"
return 1
/obj/item/areaeditor/proc/edit_area()
var/area/A = get_area()
var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area name:", "Blueprint Editing", "", MAX_NAME_LEN))
var/str = trim(stripped_input(usr,"New area name:", "Area Creation", "", MAX_NAME_LEN))
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
@@ -258,33 +266,26 @@
//TODO: much much more. Unnamed airlocks, cameras, etc.
/obj/item/areaeditor/proc/check_tile_is_border(turf/T2,dir)
if (istype(T2, /turf/open/space))
return BORDER_SPACE //omg hull breach we all going to die here
if (get_area_type(T2.loc)!=AREA_SPACE)
return BORDER_BETWEEN
if (istype(T2, /turf/closed/wall))
return BORDER_2NDTILE
if (!istype(T2, /turf))
return BORDER_BETWEEN
/turf/proc/check_tile_is_border()
return BORDER_NONE
for (var/obj/structure/window/W in T2)
if(turn(dir,180) == W.dir)
return BORDER_BETWEEN
if (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
/turf/open/space/check_tile_is_border()
return BORDER_SPACE
/turf/closed/check_tile_is_border()
return BORDER_2NDTILE
/turf/open/check_tile_is_border()
for(var/atom/movable/AM in src)
if(!CANATMOSPASS(AM, src))
return BORDER_2NDTILE
for(var/obj/machinery/door/window/D in T2)
if(turn(dir,180) == D.dir)
return BORDER_BETWEEN
if (locate(/obj/machinery/door) in T2)
return BORDER_2NDTILE
if (locate(/obj/structure/falsewall) in T2)
return BORDER_2NDTILE
return BORDER_NONE
/turf/closed/mineral/check_tile_is_border()
return BORDER_NONE
/obj/item/areaeditor/proc/detect_room(turf/first)
/proc/detect_room(turf/first)
var/list/turf/found = new
var/list/turf/pending = list(first)
var/list/border = list()
@@ -312,7 +313,7 @@
if (!isturf(NT) || (NT in found) || (NT in pending))
continue
switch(check_tile_is_border(NT,dir))
switch(NT.check_tile_is_border())
if(BORDER_NONE)
pending+=NT
if(BORDER_BETWEEN)
@@ -333,7 +334,7 @@
var/turf/U = get_step(F, direction)
if((U in border) || (U in found))
continue
if(check_tile_is_border(U, direction) == BORDER_2NDTILE)
if(U.check_tile_is_border() == BORDER_2NDTILE)
found += U
found |= F
return found
@@ -347,4 +348,4 @@
desc = "A digital copy of the station blueprints stored in your memory."
icon = 'icons/obj/items.dmi'
icon_state = "blueprints"
fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station."
fluffnotice = "Intellectual Property of Nanotrasen. For use in engineering cyborgs only. Wipe from memory upon departure from the station."