mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Fix HUD creation and ventcrawling
This commit is contained in:
@@ -75,7 +75,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_HELP
|
using.name = I_HELP
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_DISARM
|
using.name = I_DISARM
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_GRAB
|
using.name = I_GRAB
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_HURT
|
using.name = I_HURT
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_HELP
|
using.name = I_HELP
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_DISARM
|
using.name = I_DISARM
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_GRAB
|
using.name = I_GRAB
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
ico = new(ui_style, "black")
|
ico = new(ui_style, "black")
|
||||||
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
|
||||||
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
|
||||||
using = new /obj/screen( src )
|
using = new /obj/screen()
|
||||||
using.name = I_HURT
|
using.name = I_HURT
|
||||||
using.icon = ico
|
using.icon = ico
|
||||||
using.screen_loc = ui_acti
|
using.screen_loc = ui_acti
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ var/list/ventcrawl_machinery = list(
|
|||||||
/obj/item/weapon/holder,
|
/obj/item/weapon/holder,
|
||||||
/obj/machinery/camera,
|
/obj/machinery/camera,
|
||||||
/mob/living/simple_animal/borer,
|
/mob/living/simple_animal/borer,
|
||||||
|
/obj/screen
|
||||||
)
|
)
|
||||||
|
|
||||||
/mob/living/var/list/icon/pipes_shown = list()
|
/mob/living/var/list/icon/pipes_shown = list()
|
||||||
@@ -41,17 +42,20 @@ var/list/ventcrawl_machinery = list(
|
|||||||
return FALSE
|
return FALSE
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
/mob/living/proc/is_allowed_vent_crawl_item(var/obj/carried_item)
|
||||||
|
//Ability master easy test for allowed (cheaper than istype)
|
||||||
if(carried_item == ability_master)
|
if(carried_item == ability_master)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
var/list/allowed = list()
|
//Try to find it in our allowed list (istype includes subtypes)
|
||||||
for(var/type in can_enter_vent_with)
|
var/listed = FALSE
|
||||||
var/list/types = typesof(type)
|
for(var/test_type in can_enter_vent_with)
|
||||||
allowed += types
|
if(istype(carried_item,test_type))
|
||||||
|
listed = TRUE
|
||||||
|
break
|
||||||
|
|
||||||
if(carried_item.type in allowed)
|
//Only allow it if it's "IN" the mob, not equipped on/being held
|
||||||
if(get_inventory_slot(carried_item) == 0)
|
if(listed && !get_inventory_slot(carried_item))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
/mob/living/carbon/is_allowed_vent_crawl_item(var/obj/item/carried_item)
|
||||||
|
|||||||
Reference in New Issue
Block a user