mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #19810 from KorPhaeron/blueprint_fix
Refactors area creation
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#define ui_lingchemdisplay "WEST:6,CENTER-1:15"
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
#define ui_crafting "12:-10,1:5"
|
||||
#define ui_building "12:-10,1:21"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
//Lower center, persistant menu
|
||||
|
||||
@@ -51,6 +51,10 @@
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory/area_creator
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
mymob.client.screen = list()
|
||||
|
||||
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
|
||||
|
||||
@@ -95,6 +95,10 @@
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/inventory/area_creator
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/act_intent()
|
||||
using.icon_state = mymob.a_intent
|
||||
static_inventory += using
|
||||
|
||||
@@ -58,6 +58,21 @@
|
||||
return
|
||||
M.OpenCraftingMenu()
|
||||
|
||||
/obj/screen/inventory/area_creator
|
||||
name = "create new area"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "area_edit"
|
||||
screen_loc = ui_building
|
||||
|
||||
/obj/screen/inventory/area_creator/Click()
|
||||
if(usr.incapacitated())
|
||||
return 1
|
||||
var/area/A = get_area(usr)
|
||||
if(!A.outdoors)
|
||||
usr << "<span class='warning'>There is already a defined structure here.</span>"
|
||||
return 1
|
||||
create_area(usr)
|
||||
|
||||
/obj/screen/inventory
|
||||
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
|
||||
var/icon_empty // Icon when empty. For now used only by humans.
|
||||
|
||||
Reference in New Issue
Block a user