/obj/item/areaeditor name = "area modification item" icon = 'icons/obj/items.dmi' icon_state = "blueprints" 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 as mob) add_fingerprint(user) var/text = "
According to the [src.name], you are now in outer space. Hold your breath.
\ " if(AREA_SPECIAL) text += "This place is not noted on the [src.name].
" return text /obj/item/areaeditor/Topic(href, href_list) if(..()) return if(href_list["create_area"]) if(get_area_type()==AREA_SPACE) create_area() 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 as mob) . = ..() var/area/A = get_area() if(get_area_type() == AREA_STATION) . += "According to \the [src], you are now in \"[strip_html_properly(A.name)]\".
" var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500) popup.set_content(.) popup.open() onclose(usr, "blueprints") /obj/item/areaeditor/permit/create_area() ..() qdel(src) //Station blueprints!!! /obj/item/areaeditor/blueprints name = "station blueprints" desc = "Blueprints of the station. There is a \"Classified\" stamp and several coffee stains on it." icon = 'icons/obj/items.dmi' icon_state = "blueprints" fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage." /obj/item/areaeditor/blueprints/attack_self(mob/user as mob) . = ..() var/area/A = get_area() if(get_area_type() == AREA_STATION) . += "According to \the [src], you are now in \"[strip_html_properly(A.name)]\".
" . += "You may move an amendment to the drawing.
" var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500) popup.set_content(.) popup.open() onclose(user, "blueprints") /obj/item/areaeditor/blueprints/Topic(href, href_list) ..() if(href_list["edit_area"]) if(get_area_type()!=AREA_STATION) return edit_area() updateUsrDialog() /obj/item/areaeditor/proc/get_area() var/turf/T = get_turf(usr) var/area/A = T.loc A = A.master return A /obj/item/areaeditor/proc/get_area_type(var/area/A = get_area()) if (istype(A,/area/space)) return AREA_SPACE var/list/SPECIALS = list( /area/shuttle, /area/admin, /area/arrival, /area/centcom, /area/asteroid, /area/tdome, /area/wizard_station, /area/prison ) for (var/type in SPECIALS) if ( istype(A,type) ) return AREA_SPECIAL return AREA_STATION /obj/item/areaeditor/proc/create_area() var/res = detect_room(get_turf(usr)) if(!istype(res,/list)) switch(res) if(ROOM_ERR_SPACE) usr << "The new area must be completely airtight." return if(ROOM_ERR_TOOLARGE) usr << "The new area is too large." return else usr << "Error! Please notify administration." return var/list/turf/turfs = res var/str = trim(stripped_input(usr,"New area name:", "Blueprint Editing", "", MAX_NAME_LEN)) if(!str || !length(str)) //cancel return if(length(str) > 50) usr << "The given name is too long. The area remains undefined." return var/area/A = new A.name = str //var/ma //ma = A.master ? "[A.master]" : "(null)" //world << "DEBUG: create_area: