Hud Element Pooling

Pools the obj/screen elements which are being so casually deleted all the damn time
This commit is contained in:
clusterfack
2015-05-17 05:44:29 -05:00
parent 3b411f8281
commit e6951594a7
55 changed files with 624 additions and 1697 deletions

View File

@@ -64,9 +64,11 @@
#include "code\_onclick\hud\alien_larva.dm"
#include "code\_onclick\hud\hud.dm"
#include "code\_onclick\hud\human.dm"
#include "code\_onclick\hud\mommi.dm"
#include "code\_onclick\hud\monkey.dm"
#include "code\_onclick\hud\movable_screen_objects.dm"
#include "code\_onclick\hud\other_mobs.dm"
#include "code\_onclick\hud\pai.dm"
#include "code\_onclick\hud\robot.dm"
#include "code\_onclick\hud\screen_objects.dm"
#include "code\_onclick\hud\spell_screen_objects.dm"
@@ -328,7 +330,6 @@
#include "code\game\gamemodes\sandbox\sandbox.dm"
#include "code\game\gamemodes\traitor\doubleagent.dm"
#include "code\game\gamemodes\traitor\traitor.dm"
#include "code\game\gamemodes\vampire\hud.dm"
#include "code\game\gamemodes\vampire\vampire.dm"
#include "code\game\gamemodes\vampire\vampire_powers.dm"
#include "code\game\gamemodes\wizard\artefact.dm"
@@ -1199,7 +1200,6 @@
#include "code\modules\mob\living\carbon\metroid\death.dm"
#include "code\modules\mob\living\carbon\metroid\emote.dm"
#include "code\modules\mob\living\carbon\metroid\examine.dm"
#include "code\modules\mob\living\carbon\metroid\hud.dm"
#include "code\modules\mob\living\carbon\metroid\life.dm"
#include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
@@ -1241,7 +1241,6 @@
#include "code\modules\mob\living\silicon\mommi\death.dm"
#include "code\modules\mob\living\silicon\mommi\emote.dm"
#include "code\modules\mob\living\silicon\mommi\examine.dm"
#include "code\modules\mob\living\silicon\mommi\hud.dm"
#include "code\modules\mob\living\silicon\mommi\inventory.dm"
#include "code\modules\mob\living\silicon\mommi\laws.dm"
#include "code\modules\mob\living\silicon\mommi\life.dm"
@@ -1254,7 +1253,6 @@
#include "code\modules\mob\living\silicon\mommi\update_icons.dm"
#include "code\modules\mob\living\silicon\pai\death.dm"
#include "code\modules\mob\living\silicon\pai\examine.dm"
#include "code\modules\mob\living\silicon\pai\hud.dm"
#include "code\modules\mob\living\silicon\pai\life.dm"
#include "code\modules\mob\living\silicon\pai\pai.dm"
#include "code\modules\mob\living\silicon\pai\personality.dm"

View File

@@ -24,7 +24,7 @@
/mob/living/simple_animal/sculpture/proc/GrabMob(var/mob/living/target)
if(target && target != src && ishuman(target) && !observed)
G = new /obj/item/weapon/grab(src, target)
G = getFromPool(/obj/item/weapon/grab,src,target)
target.Stun(1)
target.Paralyse(1)
G.loc = src

View File

@@ -1,210 +1,210 @@
/datum/hud/proc/adminbus_hud()
mymob.gui_icons.adminbus_bg = new /obj/screen()
mymob.gui_icons.adminbus_bg = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_bg.icon = 'icons/adminbus/fullscreen.dmi'
mymob.gui_icons.adminbus_bg.icon_state = "HUD"
mymob.gui_icons.adminbus_bg.name = "HUD"
mymob.gui_icons.adminbus_bg.layer = 19
mymob.gui_icons.adminbus_bg.screen_loc = ui_adminbus_bg
mymob.gui_icons.adminbus_delete = new /obj/screen()
mymob.gui_icons.adminbus_delete = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_delete.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_delete.icon_state = "icon_delete"
mymob.gui_icons.adminbus_delete.name = "Delete Bus"
mymob.gui_icons.adminbus_delete.screen_loc = ui_adminbus_delete
mymob.gui_icons.adminbus_delmobs = new /obj/screen()
mymob.gui_icons.adminbus_delmobs = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_delmobs.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_delmobs.icon_state = "icon_delmobs"
mymob.gui_icons.adminbus_delmobs.name = "Delete Mobs"
mymob.gui_icons.adminbus_delmobs.screen_loc = ui_adminbus_delmobs
mymob.gui_icons.adminbus_spclowns = new /obj/screen()
mymob.gui_icons.adminbus_spclowns = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_spclowns.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_spclowns.icon_state = "icon_spclown"
mymob.gui_icons.adminbus_spclowns.name = "Spawn Clowns"
mymob.gui_icons.adminbus_spclowns.screen_loc = ui_adminbus_spclowns
mymob.gui_icons.adminbus_spcarps = new /obj/screen()
mymob.gui_icons.adminbus_spcarps = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_spcarps.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_spcarps.icon_state = "icon_spcarp"
mymob.gui_icons.adminbus_spcarps.name = "Spawn Carps"
mymob.gui_icons.adminbus_spcarps.screen_loc = ui_adminbus_spcarps
mymob.gui_icons.adminbus_spbears = new /obj/screen()
mymob.gui_icons.adminbus_spbears = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_spbears.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_spbears.icon_state = "icon_spbear"
mymob.gui_icons.adminbus_spbears.name = "Spawn Bears"
mymob.gui_icons.adminbus_spbears.screen_loc = ui_adminbus_spbears
mymob.gui_icons.adminbus_sptrees = new /obj/screen()
mymob.gui_icons.adminbus_sptrees = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_sptrees.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_sptrees.icon_state = "icon_sptree"
mymob.gui_icons.adminbus_sptrees.name = "Spawn Trees"
mymob.gui_icons.adminbus_sptrees.screen_loc = ui_adminbus_sptrees
mymob.gui_icons.adminbus_spspiders = new /obj/screen()
mymob.gui_icons.adminbus_spspiders = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_spspiders.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_spspiders.icon_state = "icon_spspider"
mymob.gui_icons.adminbus_spspiders.name = "Spawn Spiders"
mymob.gui_icons.adminbus_spspiders.screen_loc = ui_adminbus_spspiders
mymob.gui_icons.adminbus_spalien = new /obj/screen()
mymob.gui_icons.adminbus_spalien = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_spalien.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_spalien.icon_state = "icon_spalien"
mymob.gui_icons.adminbus_spalien.name = "Spawn Large Alien Queen"
mymob.gui_icons.adminbus_spalien.screen_loc = ui_adminbus_spalien
mymob.gui_icons.adminbus_loadsids = new /obj/screen()
mymob.gui_icons.adminbus_loadsids = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_loadsids.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_loadsids.icon_state = "icon_loadsids"
mymob.gui_icons.adminbus_loadsids.name = "Spawn Loads of Captain Spare IDs"
mymob.gui_icons.adminbus_loadsids.screen_loc = ui_adminbus_loadsids
mymob.gui_icons.adminbus_loadsmoney = new /obj/screen()
mymob.gui_icons.adminbus_loadsmoney = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_loadsmoney.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_loadsmoney.icon_state = "icon_loadsmone"
mymob.gui_icons.adminbus_loadsmoney.name = "Spawn Loads of Money"
mymob.gui_icons.adminbus_loadsmoney.screen_loc = ui_adminbus_loadsmone
mymob.gui_icons.adminbus_massrepair = new /obj/screen()
mymob.gui_icons.adminbus_massrepair = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_massrepair.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_massrepair.icon_state = "icon_massrepair"
mymob.gui_icons.adminbus_massrepair.name = "Repair Surroundings"
mymob.gui_icons.adminbus_massrepair.screen_loc = ui_adminbus_massrepair
mymob.gui_icons.adminbus_massrejuv = new /obj/screen()
mymob.gui_icons.adminbus_massrejuv = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_massrejuv.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_massrejuv.icon_state = "icon_massrejuv"
mymob.gui_icons.adminbus_massrejuv.name = "Mass Rejuvination"
mymob.gui_icons.adminbus_massrejuv.screen_loc = ui_adminbus_massrejuv
mymob.gui_icons.adminbus_hook = new /obj/screen()
mymob.gui_icons.adminbus_hook = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_hook.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_hook.icon_state = "icon_hook"
mymob.gui_icons.adminbus_hook.name = "Singularity Hook"
mymob.gui_icons.adminbus_hook.screen_loc = ui_adminbus_hook
mymob.gui_icons.adminbus_juke = new /obj/screen()
mymob.gui_icons.adminbus_juke = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_juke.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_juke.icon_state = "icon_jukebox"
mymob.gui_icons.adminbus_juke.name = "Adminbus-mounted Jukebox"
mymob.gui_icons.adminbus_juke.screen_loc = ui_adminbus_juke
mymob.gui_icons.adminbus_tele = new /obj/screen()
mymob.gui_icons.adminbus_tele = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_tele.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_tele.icon_state = "icon_teleport"
mymob.gui_icons.adminbus_tele.name = "Teleportation"
mymob.gui_icons.adminbus_tele.screen_loc = ui_adminbus_tele
mymob.gui_icons.adminbus_bumpers_1 = new /obj/screen()
mymob.gui_icons.adminbus_bumpers_1 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_bumpers_1.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_bumpers_1.icon_state = "icon_bumpers_1-on"
mymob.gui_icons.adminbus_bumpers_1.name = "Capture Mobs"
mymob.gui_icons.adminbus_bumpers_1.screen_loc = ui_adminbus_bumpers_1
mymob.gui_icons.adminbus_bumpers_2 = new /obj/screen()
mymob.gui_icons.adminbus_bumpers_2 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_bumpers_2.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_bumpers_2.icon_state = "icon_bumpers_2-off"
mymob.gui_icons.adminbus_bumpers_2.name = "Hit Mobs"
mymob.gui_icons.adminbus_bumpers_2.screen_loc = ui_adminbus_bumpers_2
mymob.gui_icons.adminbus_bumpers_3 = new /obj/screen()
mymob.gui_icons.adminbus_bumpers_3 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_bumpers_3.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_bumpers_3.icon_state = "icon_bumpers_3-off"
mymob.gui_icons.adminbus_bumpers_3.name = "Gib Mobs"
mymob.gui_icons.adminbus_bumpers_3.screen_loc = ui_adminbus_bumpers_3
mymob.gui_icons.adminbus_door_0 = new /obj/screen()
mymob.gui_icons.adminbus_door_0 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_door_0.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_door_0.icon_state = "icon_door_0-on"
mymob.gui_icons.adminbus_door_0.name = "Close Door"
mymob.gui_icons.adminbus_door_0.screen_loc = ui_adminbus_door_0
mymob.gui_icons.adminbus_door_1 = new /obj/screen()
mymob.gui_icons.adminbus_door_1 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_door_1.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_door_1.icon_state = "icon_door_1-off"
mymob.gui_icons.adminbus_door_1.name = "Open Door"
mymob.gui_icons.adminbus_door_1.screen_loc = ui_adminbus_door_1
mymob.gui_icons.adminbus_roadlights_0 = new /obj/screen()
mymob.gui_icons.adminbus_roadlights_0 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_roadlights_0.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_roadlights_0.icon_state = "icon_lights_0-on"
mymob.gui_icons.adminbus_roadlights_0.name = "Turn Off Headlights"
mymob.gui_icons.adminbus_roadlights_0.screen_loc = ui_adminbus_roadlights_0
mymob.gui_icons.adminbus_roadlights_1 = new /obj/screen()
mymob.gui_icons.adminbus_roadlights_1 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_roadlights_1.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_roadlights_1.icon_state = "icon_lights_1-off"
mymob.gui_icons.adminbus_roadlights_1.name = "Dipped Headlights"
mymob.gui_icons.adminbus_roadlights_1.screen_loc = ui_adminbus_roadlights_1
mymob.gui_icons.adminbus_roadlights_2 = new /obj/screen()
mymob.gui_icons.adminbus_roadlights_2 = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_roadlights_2.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_roadlights_2.icon_state = "icon_lights_2-off"
mymob.gui_icons.adminbus_roadlights_2.name = "Main Headlights"
mymob.gui_icons.adminbus_roadlights_2.screen_loc = ui_adminbus_roadlights_2
mymob.gui_icons.adminbus_free = new /obj/screen()
mymob.gui_icons.adminbus_free = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_free.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_free.icon_state = "icon_free"
mymob.gui_icons.adminbus_free.name = "Release Passengers"
mymob.gui_icons.adminbus_free.screen_loc = ui_adminbus_free
mymob.gui_icons.adminbus_home = new /obj/screen()
mymob.gui_icons.adminbus_home = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_home.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_home.icon_state = "icon_home"
mymob.gui_icons.adminbus_home.name = "Send Passengers Back Home"
mymob.gui_icons.adminbus_home.screen_loc = ui_adminbus_home
mymob.gui_icons.adminbus_antag = new /obj/screen()
mymob.gui_icons.adminbus_antag = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_antag.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_antag.icon_state = "icon_antag"
mymob.gui_icons.adminbus_antag.name = "Antag Madness!"
mymob.gui_icons.adminbus_antag.screen_loc = ui_adminbus_antag
mymob.gui_icons.adminbus_dellasers = new /obj/screen()
mymob.gui_icons.adminbus_dellasers = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_dellasers.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_dellasers.icon_state = "icon_delgiven"
mymob.gui_icons.adminbus_dellasers.name = "Delete the given Infinite Laser Guns"
mymob.gui_icons.adminbus_dellasers.screen_loc = ui_adminbus_dellasers
mymob.gui_icons.adminbus_givelasers = new /obj/screen()
mymob.gui_icons.adminbus_givelasers = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_givelasers.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_givelasers.icon_state = "icon_givelasers"
mymob.gui_icons.adminbus_givelasers.name = "Give Infinite Laser Guns to the Passengers"
mymob.gui_icons.adminbus_givelasers.screen_loc = ui_adminbus_givelasers
mymob.gui_icons.adminbus_delbombs = new /obj/screen()
mymob.gui_icons.adminbus_delbombs = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_delbombs.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_delbombs.icon_state = "icon_delgiven"
mymob.gui_icons.adminbus_delbombs.name = "Delete the given Fuse-Bombs"
mymob.gui_icons.adminbus_delbombs.screen_loc = ui_adminbus_delbombs
mymob.gui_icons.adminbus_givebombs = new /obj/screen()
mymob.gui_icons.adminbus_givebombs = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_givebombs.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_givebombs.icon_state = "icon_givebombs"
mymob.gui_icons.adminbus_givebombs.name = "Give Fuse-Bombs to the Passengers"
mymob.gui_icons.adminbus_givebombs.screen_loc = ui_adminbus_givebombs
mymob.gui_icons.adminbus_tdred = new /obj/screen()
mymob.gui_icons.adminbus_tdred = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_tdred.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_tdred.icon_state = "icon_tdred"
mymob.gui_icons.adminbus_tdred.name = "Send Passengers to the Thunderdome's Red Team"
mymob.gui_icons.adminbus_tdred.screen_loc = ui_adminbus_tdred
mymob.gui_icons.adminbus_tdarena = new /obj/screen()
mymob.gui_icons.adminbus_tdarena = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_tdarena.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_tdarena.icon_state = "icon_tdarena"
mymob.gui_icons.adminbus_tdarena.name = "Split the Passengers between the two Thunderdome Teams"
mymob.gui_icons.adminbus_tdarena.screen_loc = ui_adminbus_tdarena
mymob.gui_icons.adminbus_tdgreen = new /obj/screen()
mymob.gui_icons.adminbus_tdgreen = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_tdgreen.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_tdgreen.icon_state = "icon_tdgreen"
mymob.gui_icons.adminbus_tdgreen.name = "Send Passengers to the Thunderdome's Green Team"
mymob.gui_icons.adminbus_tdgreen.screen_loc = ui_adminbus_tdgreen
mymob.gui_icons.adminbus_tdobs = new /obj/screen()
mymob.gui_icons.adminbus_tdobs = getFromPool(/obj/screen)
mymob.gui_icons.adminbus_tdobs.icon = 'icons/adminbus/32x32.dmi'
mymob.gui_icons.adminbus_tdobs.icon_state = "icon_tdobs"
mymob.gui_icons.adminbus_tdobs.name = "Send Passengers to the Thunderdome's Observers' Lodge"
@@ -249,7 +249,7 @@
)
for(var/i=1;i<=16;i++)
var/obj/screen/S = new /obj/screen()
var/obj/screen/S = getFromPool(/obj/screen)
S.icon = 'icons/adminbus/32x32.dmi'
S.icon_state = ""
S.screen_loc = "[12-round(i/2)]:[16*((i-1)%2)],14:16"

View File

@@ -7,7 +7,7 @@
var/obj/screen/using
//AI core
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "AI Core"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "ai_core"
@@ -16,7 +16,7 @@
adding += using
//Camera list
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Show Camera List"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "camera"
@@ -25,7 +25,7 @@
adding += using
//Track
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Track With Camera"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "track"
@@ -34,7 +34,7 @@
adding += using
//Camera light
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Toggle Camera Light"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "camera_light"
@@ -43,7 +43,7 @@
adding += using
//Crew Manifest
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Show Crew Manifest"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "manifest"
@@ -52,7 +52,7 @@
adding += using
//Alerts
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Show Alerts"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "alerts"
@@ -61,7 +61,7 @@
adding += using
//Announcement
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Announcement"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "announcement"
@@ -70,7 +70,7 @@
adding += using
//Shuttle
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Call Emergency Shuttle"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "call_shuttle"
@@ -79,7 +79,7 @@
adding += using
//Laws
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "State Laws"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "state_laws"
@@ -88,7 +88,7 @@
adding += using
//PDA message
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "PDA - Send Message"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "pda_send"
@@ -97,7 +97,7 @@
adding += using
//PDA log
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "PDA - Show Message Log"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "pda_receive"
@@ -106,7 +106,7 @@
adding += using
//Take image
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "Take Image"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "take_picture"
@@ -115,7 +115,7 @@
adding += using
//View images
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "View Images"
using.icon = 'icons/mob/screen_ai.dmi'
using.icon_state = "view_images"

View File

@@ -6,7 +6,7 @@
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -22,7 +22,7 @@
ico = new('icons/mob/screen1_alien.dmi', "black")
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())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
@@ -33,7 +33,7 @@
ico = new('icons/mob/screen1_alien.dmi', "black")
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())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
@@ -44,7 +44,7 @@
ico = new('icons/mob/screen1_alien.dmi', "black")
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)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
@@ -55,7 +55,7 @@
ico = new('icons/mob/screen1_alien.dmi', "black")
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)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
@@ -65,7 +65,7 @@
//end intent small hud objects
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -75,7 +75,7 @@
src.adding += using
move_intent = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "drop"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_drop"
@@ -85,7 +85,7 @@
//equippable shit
//suit
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = 'icons/mob/screen1_alien.dmi'
@@ -95,7 +95,7 @@
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
@@ -108,7 +108,7 @@
inv_box.slot_id = slot_r_hand
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = 'icons/mob/screen1_alien.dmi'
@@ -121,7 +121,7 @@
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -130,7 +130,7 @@
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -140,7 +140,7 @@
src.adding += using
//pocket 1
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "storage1"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
@@ -150,7 +150,7 @@
src.adding += inv_box
//pocket 2
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "storage2"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "pocket"
@@ -160,7 +160,7 @@
src.adding += inv_box
//head
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "head"
inv_box.icon = 'icons/mob/screen1_alien.dmi'
inv_box.icon_state = "hair"
@@ -171,7 +171,7 @@
//end of equippable shit
/*
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "resist"
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = "act_resist"
@@ -180,62 +180,62 @@
src.adding += using
*/
mymob.throw_icon = new /obj/screen()
mymob.throw_icon = getFromPool(/obj/screen)
mymob.throw_icon.icon = 'icons/mob/screen1_alien.dmi'
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin = getFromPool(/obj/screen)
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = 'icons/mob/screen1_alien.dmi'
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -5,7 +5,7 @@
var/obj/screen/using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -15,7 +15,7 @@
src.adding += using
action_intent = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
@@ -25,57 +25,57 @@
src.adding += using
move_intent = using
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = 'icons/mob/screen1_alien.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_alien_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin = getFromPool(/obj/screen)
mymob.toxin.icon = 'icons/mob/screen1_alien.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_alien_toxin
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_alien.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_alien_fire
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_alien.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_alien_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_alien.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -1,84 +1,3 @@
/*
The global hud:
Uses the same visual objects for all players.
*/
var/datum/global_hud/global_hud = new()
/datum/hud/var/obj/screen/grab_intent
/datum/hud/var/obj/screen/hurt_intent
/datum/hud/var/obj/screen/disarm_intent
/datum/hud/var/obj/screen/help_intent
/datum/global_hud
var/obj/screen/druggy
var/obj/screen/blurry
var/list/vimpaired
var/list/darkMask
/datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high
druggy = new /obj/screen()
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
blurry = new /obj/screen()
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
var/obj/screen/O
var/i
//that nasty looking dither you get when you're short-sighted
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "1,1 to 5,15"
O = vimpaired[2]
O.screen_loc = "5,1 to 10,5"
O = vimpaired[3]
O.screen_loc = "6,11 to 10,15"
O = vimpaired[4]
O.screen_loc = "11,1 to 15,15"
//welding mask overlay black/dither
darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen)
O = darkMask[1]
O.screen_loc = "3,3 to 5,13"
O = darkMask[2]
O.screen_loc = "5,3 to 10,5"
O = darkMask[3]
O.screen_loc = "6,11 to 10,13"
O = darkMask[4]
O.screen_loc = "11,3 to 13,13"
O = darkMask[5]
O.screen_loc = "1,1 to 15,2"
O = darkMask[6]
O.screen_loc = "1,3 to 2,15"
O = darkMask[7]
O.screen_loc = "14,3 to 15,15"
O = darkMask[8]
O.screen_loc = "3,14 to 13,15"
for(i = 1, i <= 4, i++)
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
for(i = 5, i <= 8, i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
O.mouse_opacity = 0
/*
The hud datum
Used to show and hide huds for all the different mob types,
@@ -88,6 +7,11 @@ var/datum/global_hud/global_hud = new()
/datum/hud
var/mob/mymob
var/obj/screen/grab_intent
var/obj/screen/hurt_intent
var/obj/screen/disarm_intent
var/obj/screen/help_intent
var/hud_shown = 1 //Used for the HUD toggle (F12)
var/inventory_shown = 1 //the inventory
var/show_intent_icons = 0
@@ -108,12 +32,31 @@ var/datum/global_hud/global_hud = new()
var/list/obj/screen/item_action/item_action_list = list() //Used for the item action ui buttons.
datum/hud/New(mob/owner)
/datum/hud/New(mob/owner)
mymob = owner
instantiate()
..()
/datum/hud/Destroy()
..()
grab_intent = null
hurt_intent = null
disarm_intent = null
help_intent = null
lingchemdisplay = null
blobpwrdisplay = null
blobhealthdisplay = null
vampire_blood_display = null
r_hand_hud_object = null
l_hand_hud_object = null
action_intent = null
move_intent = null
adding = null
other = null
hotkeybuttons = null
item_action_list = null
mymob = null
/datum/hud/proc/hidden_inventory_update()
if(!mymob)
@@ -262,3 +205,79 @@ datum/hud/New(mob/owner)
usr << "<span class='warning'>Inventory hiding is currently only supported for human mobs, sorry.</span>"
else
usr << "<span class='warning'>This mob type does not use a HUD.</span>"
/*
The global hud:
Uses the same visual objects for all players.
*/
var/datum/global_hud/global_hud = new()
/datum/global_hud
var/obj/screen/druggy
var/obj/screen/blurry
var/list/vimpaired
var/list/darkMask
/datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high
druggy = getFromPool(/obj/screen)
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
blurry = getFromPool(/obj/screen)
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
var/obj/screen/O
var/i
//that nasty looking dither you get when you're short-sighted
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "1,1 to 5,15"
O = vimpaired[2]
O.screen_loc = "5,1 to 10,5"
O = vimpaired[3]
O.screen_loc = "6,11 to 10,15"
O = vimpaired[4]
O.screen_loc = "11,1 to 15,15"
//welding mask overlay black/dither
darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen)
O = darkMask[1]
O.screen_loc = "3,3 to 5,13"
O = darkMask[2]
O.screen_loc = "5,3 to 10,5"
O = darkMask[3]
O.screen_loc = "6,11 to 10,13"
O = darkMask[4]
O.screen_loc = "11,3 to 13,13"
O = darkMask[5]
O.screen_loc = "1,1 to 15,2"
O = darkMask[6]
O.screen_loc = "1,3 to 2,15"
O = darkMask[7]
O.screen_loc = "14,3 to 15,15"
O = darkMask[8]
O.screen_loc = "3,14 to 13,15"
for(i = 1, i <= 4, i++)
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
for(i = 5, i <= 8, i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
O.mouse_opacity = 0

View File

@@ -7,7 +7,7 @@
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
@@ -23,7 +23,7 @@
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.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
@@ -34,7 +34,7 @@
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
@@ -45,7 +45,7 @@
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
@@ -56,7 +56,7 @@
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.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
@@ -66,7 +66,7 @@
//end intent small hud objects
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
@@ -78,7 +78,7 @@
src.adding += using
move_intent = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
@@ -88,7 +88,7 @@
using.alpha = ui_alpha
src.hotkeybuttons += using
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "i_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
@@ -100,7 +100,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
@@ -112,7 +112,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
@@ -128,7 +128,7 @@
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
@@ -143,7 +143,7 @@
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
@@ -154,7 +154,7 @@
using.alpha = ui_alpha
src.adding += using
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
@@ -165,7 +165,7 @@
using.alpha = ui_alpha
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "id"
inv_box.dir = NORTH
inv_box.icon = ui_style
@@ -177,7 +177,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
@@ -189,7 +189,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "back"
inv_box.dir = NORTH
inv_box.icon = ui_style
@@ -201,7 +201,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -212,7 +212,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -223,7 +223,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
@@ -235,7 +235,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "resist"
using.icon = ui_style
using.icon_state = "act_resist"
@@ -245,7 +245,7 @@
using.alpha = ui_alpha
src.hotkeybuttons += using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "toggle"
using.icon = ui_style
using.icon_state = "other"
@@ -255,7 +255,7 @@
using.alpha = ui_alpha
src.adding += using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "equip"
using.icon = ui_style
using.icon_state = "act_equip"
@@ -265,7 +265,7 @@
using.alpha = ui_alpha
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
@@ -276,7 +276,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
@@ -287,7 +287,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
@@ -298,7 +298,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "hair"
@@ -309,7 +309,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
@@ -320,7 +320,7 @@
inv_box.alpha = ui_alpha
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
@@ -331,7 +331,7 @@
inv_box.alpha = ui_alpha
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon = getFromPool(/obj/screen)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
@@ -340,62 +340,62 @@
mymob.throw_icon.alpha = ui_alpha
src.hotkeybuttons += mymob.throw_icon
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure = getFromPool(/obj/screen)
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin = getFromPool(/obj/screen)
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals = getFromPool(/obj/screen)
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp = getFromPool(/obj/screen)
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.nutrition_icon = new /obj/screen()
mymob.nutrition_icon = getFromPool(/obj/screen)
mymob.nutrition_icon.icon = ui_style
mymob.nutrition_icon.icon_state = "nutrition0"
mymob.nutrition_icon.name = "nutrition"
mymob.nutrition_icon.screen_loc = ui_nutrition
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
src.hotkeybuttons += mymob.pullin
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
@@ -403,7 +403,7 @@
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay = getFromPool(/obj/screen)
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
@@ -411,16 +411,16 @@
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
mymob.pain = getFromPool(/obj/screen)
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = ui_style
mymob.zone_sel.color = ui_color
mymob.zone_sel.alpha = ui_alpha
@@ -428,27 +428,27 @@
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.gun_setting_icon = getFromPool(/obj/screen/gun/mode)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
mymob.item_use_icon = getFromPool(/obj/screen/gun/item)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
mymob.gun_move_icon = getFromPool(/obj/screen/gun/move)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
mymob.gun_run_icon = getFromPool(/obj/screen/gun/run)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
@@ -483,7 +483,7 @@
for(var/obj/item/I in src)
if(I.action_button_name)
if(hud_used.item_action_list.len < num)
var/obj/screen/item_action/N = new(hud_used)
var/obj/screen/item_action/N = getFromPool(/obj/screen/item_action,hud_used)
hud_used.item_action_list += N
var/obj/screen/item_action/A = hud_used.item_action_list[num]

View File

@@ -9,7 +9,7 @@
var/obj/screen/inventory/inv_box
// Radio
using = new /obj/screen() // Set using to a new object
using = getFromPool(/obj/screen) // Set using to a new object
using.name = "radio" // Name it
using.dir = SOUTHWEST // Set its direction
using.icon = 'icons/mob/screen1_robot.dmi' // Pick the base icon
@@ -19,7 +19,7 @@
src.adding += using // Place using in our adding list
// Module select
using = new /obj/screen() // Set using to a new object
using = getFromPool(/obj/screen) // Set using to a new object
using.name = INV_SLOT_TOOL
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -29,7 +29,7 @@
src.adding += using // Place using in our adding list
M.inv_tool = using // Save this using as our MoMMI's inv_sight
/*
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = INV_SLOT_SIGHT
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -41,7 +41,7 @@
// End of module select
// Head
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "head"
inv_box.dir = NORTH
inv_box.icon_state = "hair"
@@ -52,7 +52,7 @@
// Intent
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -63,28 +63,28 @@
action_intent = using
// Cell
mymob:cells = new /obj/screen()
mymob:cells = getFromPool(/obj/screen)
mymob:cells.icon = 'icons/mob/screen1_robot.dmi'
mymob:cells.icon_state = "charge-empty"
mymob:cells.name = "cell"
mymob:cells.screen_loc = ui_toxin
// Health
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_robot.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_borg_health
// Installed Module
mymob.hands = new /obj/screen()
mymob.hands = getFromPool(/obj/screen)
mymob.hands.icon = 'icons/mob/screen1_robot.dmi'
mymob.hands.icon_state = "nomod"
mymob.hands.name = "module"
mymob.hands.screen_loc = ui_borg_module
// Module Panel
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "panel"
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "panel"
@@ -93,41 +93,41 @@
src.adding += using
// Store
mymob.throw_icon = new /obj/screen()
mymob.throw_icon = getFromPool(/obj/screen)
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
mymob.throw_icon.icon_state = "store"
mymob.throw_icon.name = "store"
mymob.throw_icon.screen_loc = ui_borg_store
// Temp
mymob.bodytemp = new /obj/screen()
mymob.bodytemp = getFromPool(/obj/screen)
mymob.bodytemp.icon_state = "temp0"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
// Oxygen
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
// Fire
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_robot.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
// Pulling
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_robot.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_borg_pull
// Blindness overlay
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
@@ -135,7 +135,7 @@
mymob.blind.layer = 0
// Getting flashed overlay
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
@@ -143,13 +143,13 @@
mymob.flash.layer = 17
// Zone
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
// Reset the client's screen
mymob.client.screen = null
mymob.client.reset_screen()
// Add everything to their screen
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -6,7 +6,7 @@
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
@@ -22,7 +22,7 @@
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.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
@@ -33,7 +33,7 @@
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
@@ -44,7 +44,7 @@
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
@@ -55,7 +55,7 @@
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.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using = getFromPool(/obj/screen,src)
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
@@ -65,7 +65,7 @@
//end intent small hud objects
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
@@ -75,7 +75,7 @@
src.adding += using
move_intent = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
@@ -83,7 +83,7 @@
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
@@ -96,7 +96,7 @@
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
@@ -109,7 +109,7 @@
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
@@ -118,7 +118,7 @@
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using = getFromPool(/obj/screen/inventory)
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
@@ -127,43 +127,43 @@
using.layer = 19
src.adding += using
mymob.m_suitclothesbg = new /obj/screen()
mymob.m_suitclothesbg = getFromPool(/obj/screen)
mymob.m_suitclothesbg.icon = ui_style
mymob.m_suitclothesbg.icon_state = "center"
mymob.m_suitclothesbg.name = "uniform"
mymob.m_suitclothesbg.screen_loc = ui_monkey_uniform
mymob.m_suitclothes = new /obj/screen()
mymob.m_suitclothes = getFromPool(/obj/screen)
mymob.m_suitclothes.icon = 'icons/mob/monkey.dmi'
mymob.m_suitclothes.icon_state = "none"
mymob.m_suitclothes.name = "uniform"
mymob.m_suitclothes.screen_loc = ui_monkey_uniform
mymob.m_hatbg = new /obj/screen()
mymob.m_hatbg = getFromPool(/obj/screen)
mymob.m_hatbg.icon = ui_style
mymob.m_hatbg.icon_state = "hair"
mymob.m_hatbg.name = "hat"
mymob.m_hatbg.screen_loc = ui_monkey_hat
mymob.m_hat = new /obj/screen()
mymob.m_hat = getFromPool(/obj/screen)
mymob.m_hat.icon = 'icons/obj/clothing/hats.dmi'
mymob.m_hat.icon_state = "none"
mymob.m_hat.name = "hat"
mymob.m_hat.screen_loc = ui_monkey_hat
mymob.m_glassesbg = new /obj/screen()
mymob.m_glassesbg = getFromPool(/obj/screen)
mymob.m_glassesbg.icon = ui_style
mymob.m_glassesbg.icon_state = "glasses"
mymob.m_glassesbg.name = "glasses"
mymob.m_glassesbg.screen_loc = ui_monkey_glasses
mymob.m_glasses = new /obj/screen()
mymob.m_glasses = getFromPool(/obj/screen)
mymob.m_glasses.icon = 'icons/obj/clothing/glasses.dmi'
mymob.m_glasses.icon_state = "none"
mymob.m_glasses.name = "glasses"
mymob.m_glasses.screen_loc = ui_monkey_glasses
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
@@ -173,7 +173,7 @@
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box = getFromPool(/obj/screen/inventory)
inv_box.name = "back"
inv_box.dir = NORTHEAST
inv_box.icon = ui_style
@@ -183,100 +183,100 @@
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon = getFromPool(/obj/screen)
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure = getFromPool(/obj/screen)
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin = getFromPool(/obj/screen)
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals = getFromPool(/obj/screen)
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp = getFromPool(/obj/screen)
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.gun_setting_icon = getFromPool(/obj/screen/gun/mode)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
mymob.item_use_icon = getFromPool(/obj/screen/gun/item)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
mymob.gun_move_icon = getFromPool(/obj/screen/gun/move)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
mymob.gun_run_icon = getFromPool(/obj/screen/gun/run)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.m_hatbg, mymob.m_hat, mymob.m_suitclothesbg, mymob.m_suitclothes, mymob.m_glassesbg, mymob.m_glasses, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -3,67 +3,67 @@
return
/datum/hud/proc/ghost_hud()
mymob.visible = new /obj/screen()
mymob.visible = getFromPool(/obj/screen)
mymob.visible.icon = 'icons/mob/screen1_ghost.dmi'
mymob.visible.icon_state = "visible0"
mymob.visible.name = "visible"
mymob.visible.screen_loc = ui_health
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(mymob.visible, mymob.flash)
/datum/hud/proc/corgi_hud()
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_corgi.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_corgi.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_corgi.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_construct_pull
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = 'icons/mob/screen1_corgi.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.toxin = new /obj/screen()
mymob.toxin = getFromPool(/obj/screen)
mymob.toxin.icon = 'icons/mob/screen1_corgi.dmi'
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.oxygen, mymob.toxin, mymob.flash)
/datum/hud/proc/brain_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
@@ -72,55 +72,55 @@
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
blobpwrdisplay = new /obj/screen()
blobpwrdisplay = getFromPool(/obj/screen)
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.layer = 20
blobhealthdisplay = new /obj/screen()
blobhealthdisplay = getFromPool(/obj/screen)
blobhealthdisplay.name = "blob health"
blobhealthdisplay.icon_state = "block"
blobhealthdisplay.screen_loc = ui_internal
blobhealthdisplay.layer = 20
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
/datum/hud/proc/shade_hud()
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_shade.dmi'
mymob.healths.icon_state = "shade_health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_construct_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_shade.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_construct_pull
mymob.purged = new /obj/screen()
mymob.purged = getFromPool(/obj/screen)
mymob.purged.icon = 'icons/mob/screen1_shade.dmi'
mymob.purged.icon_state = "purge0"
mymob.purged.name = "purged"
mymob.purged.screen_loc = ui_construct_purge
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = 'icons/mob/screen1_shade.dmi'
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(mymob.healths, mymob.pullin, mymob.zone_sel, mymob.purged, mymob.flash)
@@ -136,7 +136,7 @@
else if(istype(mymob,/mob/living/simple_animal/construct/harvester))
constructtype = "harvester"
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
@@ -144,37 +144,47 @@
mymob.flash.layer = 17
if(constructtype)
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_construct.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_construct_fire
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_construct.dmi'
mymob.healths.icon_state = "[constructtype]_health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_construct_health
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_construct.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_construct_pull
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = 'icons/mob/screen1_construct.dmi'
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.purged = new /obj/screen()
mymob.purged = getFromPool(/obj/screen)
mymob.purged.icon = 'icons/mob/screen1_construct.dmi'
mymob.purged.icon_state = "purge0"
mymob.purged.name = "purged"
mymob.purged.screen_loc = ui_construct_purge
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(mymob.fire, mymob.healths, mymob.pullin, mymob.zone_sel, mymob.purged, mymob.flash)
/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
vampire_blood_display = getFromPool(/obj/screen)
vampire_blood_display.name = "Vampire Blood"
vampire_blood_display.icon_state = "dark128"
vampire_blood_display.screen_loc = "14:28,9:15"
vampire_blood_display.layer = 20
mymob.client.screen += list(vampire_blood_display)

View File

@@ -1,113 +1,117 @@
/mob/living/silicon/pai/regular_hud_updates()
if(client)
for(var/image/hud in client.images)
if(findtext(hud.icon_state, "hud", 1, 4))
client.images -= hud
/mob/living/silicon/pai/proc/securityHUD()
if(client)
var/image/holder
var/turf/T = get_turf(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(src.see_invisible < perp.invisibility)
continue
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
if(I)
perpname = I.registered_name
holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]"
client.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
client.images += holder
else
holder.icon_state = "hudunknown"
client.images += holder
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
holder = perp.hud_list[WANTED_HUD]
for(var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
holder.icon_state = "hudwanted"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
holder.icon_state = "hudprisoner"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
holder.icon_state = "hudparolled"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
holder.icon_state = "hudreleased"
client.images += holder
break
/mob/living/silicon/pai/proc/medicalHUD()
if(client)
var/image/holder
var/turf/T = get_turf(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
if(src.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus++
for (var/ID in patient.virus2)
if (ID in virusDB)
foundVirus = 1
break
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
holder.icon_state = "hudhealth-100"
client.images += holder
else
holder.icon_state = "hud[RoundHealth(patient.health)]"
client.images += holder
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
holder.icon_state = "huddead"
else if(patient.status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(patient.has_brain_worms())
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
client.images += holder
/mob/living/silicon/pai/proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(70 to 100)
return "health80"
if(50 to 70)
return "health60"
if(30 to 50)
return "health40"
if(20 to 30)
return "health25"
if(5 to 15)
return "health10"
if(1 to 5)
return "health1"
if(-99 to 0)
return "health0"
else
return "health-100"
return "0"
#define SCANNER 1
/mob/living/silicon/pai/regular_hud_updates()
if(client)
for(var/image/hud in client.images)
if(findtext(hud.icon_state, "hud", 1, 4))
client.images -= hud
/mob/living/silicon/pai/proc/securityHUD()
if(client)
var/image/holder
var/turf/T = get_turf(src.loc)
for(var/mob/living/carbon/human/perp in view(T))
if(src.see_invisible < perp.invisibility)
continue
var/perpname = "wot"
holder = perp.hud_list[ID_HUD]
if(perp.wear_id)
var/obj/item/weapon/card/id/I = perp.wear_id.GetID()
if(I)
perpname = I.registered_name
holder.icon_state = "hud[ckey(perp:wear_id:GetJobName())]"
client.images += holder
else
perpname = perp.name
holder.icon_state = "hudunknown"
client.images += holder
else
holder.icon_state = "hudunknown"
client.images += holder
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
holder = perp.hud_list[WANTED_HUD]
for(var/datum/data/record/R in data_core.security)
if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*"))
holder.icon_state = "hudwanted"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated"))
holder.icon_state = "hudprisoner"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled"))
holder.icon_state = "hudparolled"
client.images += holder
break
else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released"))
holder.icon_state = "hudreleased"
client.images += holder
break
/mob/living/silicon/pai/proc/medicalHUD()
if(client)
var/image/holder
var/turf/T = get_turf(src.loc)
for(var/mob/living/carbon/human/patient in view(T))
if(src.see_invisible < patient.invisibility)
continue
var/foundVirus = 0
for(var/datum/disease/D in patient.viruses)
if(!D.hidden[SCANNER])
foundVirus++
for (var/ID in patient.virus2)
if (ID in virusDB)
foundVirus = 1
break
holder = patient.hud_list[HEALTH_HUD]
if(patient.stat == 2)
holder.icon_state = "hudhealth-100"
client.images += holder
else
holder.icon_state = "hud[RoundHealth(patient.health)]"
client.images += holder
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
holder.icon_state = "huddead"
else if(patient.status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(patient.has_brain_worms())
var/mob/living/simple_animal/borer/B = patient.has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
client.images += holder
/mob/living/silicon/pai/proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(70 to 100)
return "health80"
if(50 to 70)
return "health60"
if(30 to 50)
return "health40"
if(20 to 30)
return "health25"
if(5 to 15)
return "health10"
if(1 to 5)
return "health1"
if(-99 to 0)
return "health0"
else
return "health-100"
return "0"
#undef SCANNER

View File

@@ -7,7 +7,7 @@
//Radio
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "radio"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -18,7 +18,7 @@
//Module select
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "module1"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -28,7 +28,7 @@
src.adding += using
mymob:inv1 = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "module2"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -38,7 +38,7 @@
src.adding += using
mymob:inv2 = using
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "module3"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -51,7 +51,7 @@
//End of module select
//Intent
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
@@ -62,28 +62,28 @@
action_intent = using
//Cell
mymob:cells = new /obj/screen()
mymob:cells = getFromPool(/obj/screen)
mymob:cells.icon = 'icons/mob/screen1_robot.dmi'
mymob:cells.icon_state = "charge-empty"
mymob:cells.name = "cell"
mymob:cells.screen_loc = ui_toxin
//Health
mymob.healths = new /obj/screen()
mymob.healths = getFromPool(/obj/screen)
mymob.healths.icon = 'icons/mob/screen1_robot.dmi'
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_borg_health
//Installed Module
mymob.hands = new /obj/screen()
mymob.hands = getFromPool(/obj/screen)
mymob.hands.icon = 'icons/mob/screen1_robot.dmi'
mymob.hands.icon_state = "nomod"
mymob.hands.name = "module"
mymob.hands.screen_loc = ui_borg_module
//Module Panel
using = new /obj/screen()
using = getFromPool(/obj/screen)
using.name = "panel"
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "panel"
@@ -92,77 +92,77 @@
src.adding += using
//Store
mymob.throw_icon = new /obj/screen()
mymob.throw_icon = getFromPool(/obj/screen)
mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi'
mymob.throw_icon.icon_state = "store"
mymob.throw_icon.name = "store"
mymob.throw_icon.screen_loc = ui_borg_store
//Temp
mymob.bodytemp = new /obj/screen()
mymob.bodytemp = getFromPool(/obj/screen)
mymob.bodytemp.icon_state = "temp0"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.oxygen = new /obj/screen()
mymob.oxygen = getFromPool(/obj/screen)
mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi'
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.fire = new /obj/screen()
mymob.fire = getFromPool(/obj/screen)
mymob.fire.icon = 'icons/mob/screen1_robot.dmi'
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.pullin = new /obj/screen()
mymob.pullin = getFromPool(/obj/screen)
mymob.pullin.icon = 'icons/mob/screen1_robot.dmi'
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_borg_pull
mymob.blind = new /obj/screen()
mymob.blind = getFromPool(/obj/screen)
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash = getFromPool(/obj/screen)
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel = getFromPool(/obj/screen/zone_sel)
mymob.zone_sel.icon = 'icons/mob/screen1_robot.dmi'
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
mymob.gun_setting_icon = getFromPool(/obj/screen/gun/mode)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
mymob.item_use_icon = getFromPool(/obj/screen/gun/item)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
mymob.gun_move_icon = getFromPool(/obj/screen/gun/move)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
mymob.gun_run_icon = getFromPool(/obj/screen/gun/run)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other

View File

@@ -48,6 +48,10 @@
/obj/screen/item_action
var/obj/item/owner
/obj/screen/item_action/Destroy()
..()
owner = null
/obj/screen/item_action/Click()
if(!usr || !owner)
return 1
@@ -83,11 +87,6 @@
/obj/screen/grab/attackby()
return
/obj/screen/grab/Destroy()
if(master)
master = null
..()
/obj/screen/storage
name = "storage"
@@ -748,3 +747,8 @@
usr.update_inv_r_hand(0)
usr.delayNextAttack(6)
return 1
client/proc/reset_screen()
for(var/obj/screen/objects in src.screen)
returnToPool(objects)
src.screen = null

View File

@@ -12,6 +12,18 @@
var/mob/spell_holder
/obj/screen/movable/spell_master/Destroy()
..()
for(var/obj/screen/spell/spells in spell_objects)
spells.spellmaster = null
spell_objects = null
if(spell_holder)
spell_holder.spell_masters -= src
/obj/screen/movable/spell_master/resetVariables()
..("spell_objects", args)
spell_objects = list()
/obj/screen/movable/spell_master/MouseDrop()
if(showing)
return
@@ -20,7 +32,7 @@
/obj/screen/movable/spell_master/Click()
if(!spell_objects.len)
qdel(src)
returnToPool(src)
return
toggle_open()
@@ -64,9 +76,10 @@
if(spell.spell_flags & NO_BUTTON) //no button to add if we don't get one
return
var/obj/screen/spell/newscreen = new
var/obj/screen/spell/newscreen = getFromPool(/obj/screen/spell)
newscreen.spellmaster = src
newscreen.spell = spell
if(!spell.override_base) //if it's not set, we do basic checks
if(spell.spell_flags & CONSTRUCT_CHECK)
newscreen.spell_base = "const" //construct spells
@@ -82,15 +95,13 @@
/obj/screen/movable/spell_master/proc/remove_spell(var/spell/spell)
for(var/obj/screen/spell/s_object in spell_objects)
if(s_object.spell == spell)
spell_objects.Remove(s_object)
qdel(s_object)
returnToPool(s_object)
break
if(spell_objects.len)
toggle_open(showing + 1)
else
spell_holder.spell_masters.Remove(src)
qdel(src)
returnToPool(src)
/obj/screen/movable/spell_master/proc/silence_spells(var/amount)
for(var/obj/screen/spell/spell in spell_objects)
@@ -125,12 +136,21 @@
var/spell/spell = null
var/handle_icon_updates = 0
var/obj/screen/movable/spell_master/spellmaster
var/icon/last_charged_icon
/obj/screen/spell/Destroy()
..()
if(spellmaster)
spellmaster.spell_objects -= src
if(spellmaster && !spellmaster.spell_objects.len)
returnToPool(master)
spellmaster = null
/obj/screen/spell/proc/update_charge(var/forced_update = 0)
if(!spell)
qdel(src)
returnToPool(src)
return
if((last_charge == spell.charge_counter || !handle_icon_updates) && !forced_update)
@@ -168,7 +188,7 @@
/obj/screen/spell/Click()
if(!usr || !spell)
qdel(src)
returnToPool(src)
return
spell.perform(usr)

View File

@@ -1,17 +0,0 @@
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
blobpwrdisplay = new /obj/screen()
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.layer = 20
blobhealthdisplay = new /obj/screen()
blobhealthdisplay.name = "blob health"
blobhealthdisplay.icon_state = "block"
blobhealthdisplay.screen_loc = ui_internal
blobhealthdisplay.layer = 20
mymob.client.screen = null
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)

View File

@@ -1,9 +0,0 @@
/datum/hud/proc/vampire_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
vampire_blood_display = new /obj/screen()
vampire_blood_display.name = "Vampire Blood"
vampire_blood_display.icon_state = "dark128"
vampire_blood_display.screen_loc = "14:28,9:15"
vampire_blood_display.layer = 20
mymob.client.screen += list(vampire_blood_display)

View File

@@ -1,300 +0,0 @@
//Upper left action buttons, displayed when you pick up an item that has this enabled.
#define ui_action_slot1 "1:6,14:26"
#define ui_action_slot2 "2:8,14:26"
#define ui_action_slot3 "3:10,14:26"
#define ui_action_slot4 "4:12,14:26"
#define ui_action_slot5 "5:14,14:26"
//Lower left, persistant menu
#define ui_inventory "1:6,1:5"
//Lower center, persistant menu
#define ui_sstore1 "3:10,1:5"
#define ui_id "4:12,1:5"
#define ui_belt "5:14,1:5"
#define ui_back "6:14,1:5"
#define ui_rhand "7:16,1:5"
#define ui_lhand "8:16,1:5"
#define ui_equip "7:16,2:5"
#define ui_swaphand1 "7:16,2:5"
#define ui_swaphand2 "8:16,2:5"
#define ui_storage1 "9:18,1:5"
#define ui_storage2 "10:20,1:5"
#define ui_alien_head "4:12,1:5" //aliens
#define ui_alien_oclothing "5:14,1:5" //aliens
#define ui_inv1 "6:16,1:5" //borgs
#define ui_inv2 "7:16,1:5" //borgs
#define ui_inv3 "8:16,1:5" //borgs
#define ui_borg_store "9:16,1:5" //borgs
#define ui_monkey_mask "5:14,1:5" //monkey
#define ui_monkey_back "6:14,1:5" //monkey
//Lower right, persistant menu
#define ui_dropbutton "11:22,1:5"
#define ui_drop_throw "14:28,2:7"
#define ui_pull_resist "13:26,2:7"
#define ui_acti "13:26,1:5"
#define ui_movi "12:24,1:5"
#define ui_zonesel "14:28,1:5"
#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_borg_pull "12:24,2:7"
#define ui_borg_module "13:26,2:7"
#define ui_borg_panel "14:28,2:7"
//Gun buttons
#define ui_gun1 "13:26,3:7"
#define ui_gun2 "14:28, 4:7"
#define ui_gun3 "13:26,4:7"
#define ui_gun_select "14:28,3:7"
//Upper-middle right (damage indicators)
#define ui_toxin "14:28,13:27"
#define ui_fire "14:28,12:25"
#define ui_oxygen "14:28,11:23"
#define ui_pressure "14:28,10:21"
#define ui_alien_toxin "14:28,13:25"
#define ui_alien_fire "14:28,12:25"
#define ui_alien_oxygen "14:28,11:25"
//Middle right (status indicators)
#define ui_nutrition "14:28,5:11"
#define ui_temp "14:28,6:13"
#define ui_health "14:28,7:15"
#define ui_internal "14:28,8:17"
//borgs
#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator.
#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator.
//Pop-up inventory
#define ui_shoes "2:8,1:5"
#define ui_iclothing "1:6,2:7"
#define ui_oclothing "2:8,2:7"
#define ui_gloves "3:10,2:7"
#define ui_glasses "1:6,3:9"
#define ui_mask "2:8,3:9"
#define ui_ears "3:10,3:9"
#define ui_head "2:8,4:11"
//Intent small buttons
#define ui_help_small "12:8,1:1"
#define ui_disarm_small "12:15,1:18"
#define ui_grab_small "12:32,1:18"
#define ui_harm_small "12:39,1:1"
//#define ui_swapbutton "6:-16,1:5" //Unused
//#define ui_headset "SOUTH,8"
#define ui_hand "6:14,1:5"
#define ui_hstore1 "5,5"
//#define ui_resist "EAST+1,SOUTH-1"
#define ui_sleep "EAST+1, NORTH-13"
#define ui_rest "EAST+1, NORTH-14"
#define ui_iarrowleft "SOUTH-1,11"
#define ui_iarrowright "SOUTH-1,13"
var/datum/global_hud/global_hud = new()
/datum/global_hud
var/obj/screen/druggy
var/obj/screen/blurry
var/list/vimpaired
var/list/darkMask
New()
//420erryday psychedellic colours screen overlay for when you are high
druggy = new /obj/screen()
druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
blurry = new /obj/screen()
blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
var/obj/screen/O
var/i
//that nasty looking dither you get when you're short-sighted
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "1,1 to 5,15"
O = vimpaired[2]
O.screen_loc = "5,1 to 10,5"
O = vimpaired[3]
O.screen_loc = "6,11 to 10,15"
O = vimpaired[4]
O.screen_loc = "11,1 to 15,15"
//welding mask overlay black/dither
darkMask = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = darkMask[1]
O.screen_loc = "3,3 to 5,13"
O = darkMask[2]
O.screen_loc = "5,3 to 10,5"
O = darkMask[3]
O.screen_loc = "6,11 to 10,13"
O = darkMask[4]
O.screen_loc = "11,3 to 13,13"
O = darkMask[5]
O.screen_loc = "1,1 to 15,2"
O = darkMask[6]
O.screen_loc = "1,3 to 2,15"
O = darkMask[7]
O.screen_loc = "14,3 to 15,15"
O = darkMask[8]
O.screen_loc = "3,14 to 13,15"
for(i=1,i<=4,i++)
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
O.mouse_opacity = 0
for(i=5,i<=8,i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
O.mouse_opacity = 0
/datum/hud/var/obj/screen/grab_intent
/datum/hud/var/obj/screen/hurt_intent
/datum/hud/var/obj/screen/disarm_intent
/datum/hud/var/obj/screen/help_intent
/datum/hud
var/mob/mymob
var/hud_shown = 1 //Used for the HUD toggle (F12)
var/inventory_shown = 1 //the inventory
var/show_intent_icons = 0
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/blobpwrdisplay
var/obj/screen/blobhealthdisplay
var/obj/screen/vampire_blood_display
var/obj/screen/r_hand_hud_object
var/obj/screen/l_hand_hud_object
var/obj/screen/action_intent
var/obj/screen/move_intent
var/list/adding
var/list/other
var/list/obj/screen/hotkeybuttons
var/list/obj/screen/item_action/item_action_list //Used for the item action ui buttons.
datum/hud/New(mob/owner)
mymob = owner
instantiate()
..()
return
/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(inventory_shown && hud_shown)
if(H.shoes) H.shoes.screen_loc = ui_shoes
if(H.gloves) H.gloves.screen_loc = ui_gloves
if(H.ears) H.ears.screen_loc = ui_ears
if(H.glasses) H.glasses.screen_loc = ui_glasses
if(H.w_uniform) H.w_uniform.screen_loc = ui_iclothing
if(H.wear_suit) H.wear_suit.screen_loc = ui_oclothing
if(H.wear_mask) H.wear_mask.screen_loc = ui_mask
if(H.head) H.head.screen_loc = ui_head
else
if(H.shoes) H.shoes.screen_loc = null
if(H.gloves) H.gloves.screen_loc = null
if(H.ears) H.ears.screen_loc = null
if(H.glasses) H.glasses.screen_loc = null
if(H.w_uniform) H.w_uniform.screen_loc = null
if(H.wear_suit) H.wear_suit.screen_loc = null
if(H.wear_mask) H.wear_mask.screen_loc = null
if(H.head) H.head.screen_loc = null
/datum/hud/proc/persistant_inventory_update()
if(!mymob) return
if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
if(hud_shown)
if(H.s_store) H.s_store.screen_loc = ui_sstore1
if(H.wear_id) H.wear_id.screen_loc = ui_id
if(H.belt) H.belt.screen_loc = ui_belt
if(H.back) H.back.screen_loc = ui_back
if(H.l_store) H.l_store.screen_loc = ui_storage1
if(H.r_store) H.r_store.screen_loc = ui_storage2
else
if(H.s_store) H.s_store.screen_loc = null
if(H.wear_id) H.wear_id.screen_loc = null
if(H.belt) H.belt.screen_loc = null
if(H.back) H.back.screen_loc = null
if(H.l_store) H.l_store.screen_loc = null
if(H.r_store) H.r_store.screen_loc = null
/datum/hud/proc/instantiate()
if(!ismob(mymob)) return 0
if(!mymob.client) return 0
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
if(ishuman(mymob))
human_hud(ui_style) // Pass the player the UI style chosen in preferences
else if(ismonkey(mymob))
monkey_hud(ui_style)
else if(isbrain(mymob))
brain_hud(ui_style)
else if(islarva(mymob))
larva_hud()
else if(isalien(mymob))
alien_hud()
else if(isAI(mymob))
ai_hud()
else if(isMoMMI(mymob))
mommi_hud()
else if(isrobot(mymob))
robot_hud()
// else if(ishivebot(mymob))
// hivebot_hud()
// else if(ishivemainframe(mymob))
// hive_mainframe_hud()
else if(isobserver(mymob))
ghost_hud()
else if(isovermind(mymob))
blob_hud()
else if(mymob.mind)
if(mymob.mind.vampire)
vampire_hud()
return

View File

@@ -167,7 +167,7 @@
if (istype(W, /obj/item/weapon/grab))
if(iscarbon(W:affecting))
take_victim(W:affecting,usr)
del(W)
returnToPool(W)
return
if(isrobot(user)) return
user.drop_item(W, src.loc)

View File

@@ -164,7 +164,7 @@
for(var/i=0; i<icount;i++)
var/obj/screen/H = new /obj/screen()
var/obj/screen/H = getFromPool(/obj/screen)
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
@@ -295,7 +295,7 @@
for(var/i=0; i<icount;i++)
var/obj/screen/H = new /obj/screen()
var/obj/screen/H = getFromPool(/obj/screen)
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
@@ -353,7 +353,7 @@ proc/getb(col)
/mob/proc/clearmap()
src.client.screen -= src.mapobjs
for(var/obj/screen/O in mapobjs)
del(O)
returnToPool(O)
mapobjs = null
src.unset_machine()

View File

@@ -925,8 +925,8 @@ steam.start() -- spawns the effect
for(var/mob/O in viewers(src))
if (O.client)
O << "<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>"
del(I)
del(src)
returnToPool(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
@@ -934,7 +934,7 @@ steam.start() -- spawns the effect
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "<span class='warning'>[user] smashes through the foamed metal.</span>"
del(src)
qdel(src)
else
user << "<span class='notice'>You hit the metal foam to no effect.</span>"

View File

@@ -88,7 +88,7 @@
return
var/mob/M = G:affecting
if(put_mob(M))
del(G)
returnToPool(G)
src.updateUsrDialog()
return

View File

@@ -456,13 +456,13 @@
else
verbs -= /obj/item/weapon/storage/verb/toggle_gathering_mode
src.boxes = new /obj/screen/storage( )
src.boxes = getFromPool(/obj/screen/storage)
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer = getFromPool(/obj/screen/close)
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
@@ -525,8 +525,10 @@
/obj/item/weapon/storage/Destroy()
close_all()
qdel(boxes)
qdel(closer)
returnToPool(boxes)
returnToPool(closer)
boxes = null
closer = null
..()
/obj/item/weapon/storage/preattack(atom/target, mob/user, adjacent, params)

View File

@@ -200,13 +200,13 @@
/obj/item/clothing/suit/storage/New()
. = ..()
boxes = new /obj/screen/storage( )
boxes = getFromPool(/obj/screen/storage)
boxes.name = "storage"
boxes.master = src
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
boxes.layer = 19
closer = new /obj/screen/close( )
closer = getFromPool(/obj/screen/close)
closer.master = src
closer.icon_state = "x"
closer.layer = 20

View File

@@ -45,8 +45,8 @@
src.meattype = 1
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='warning'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>"))
del(G.affecting)
del(G)
qdel(G.affecting)
returnToPool(G)
else
user << "<span class='warning'>The spike already has something on it, finish collecting its meat first!</span>"
@@ -59,8 +59,8 @@
src.meattype = 2
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='warning'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>"))
del(G.affecting)
del(G)
qdel(G.affecting)
returnToPool(G)
else
user << "<span class='warning'>The spike already has something on it, finish collecting its meat first!</span>"

View File

@@ -356,7 +356,7 @@
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("<span class='warning'>[G.assailant] puts [G.affecting] on \the [src].</span>")
del(W)
returnToPool(W)
return
if (istype(W, /obj/item/weapon/wrench) && can_disassemble())

View File

@@ -225,7 +225,7 @@
if(istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
var/gstate = G.state
del(W) //Gotta delete it here because if window breaks, it won't get deleted
returnToPool(W) //Gotta delete it here because if window breaks, it won't get deleted
switch(gstate)
if(GRAB_PASSIVE)
M.apply_damage(5) //Meh, bit of pain, window is fine, just a shove

View File

@@ -1,3 +0,0 @@
/datum/hud/proc/ghost_hud()
return

View File

@@ -245,7 +245,7 @@
if(I_GRAB)
if(M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M, src)
M.put_in_active_hand(G)

View File

@@ -226,7 +226,7 @@
if(I_GRAB)
if(M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
grabbed_by += G

View File

@@ -1,10 +0,0 @@
/datum/hud/proc/brain_hud(var/ui_style='icons/mob/screen1_old.dmi')
//ui_style='icons/mob/screen1_old.dmi' //Overriding the parameter. Only this UI style is acceptable with the 'sleek' layout.
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0

View File

@@ -402,7 +402,7 @@
M.LAssailant = null
else
M.LAssailant = usr
del(G)
returnToPool(G)
if(!item) return //Grab processing has a chance of returning null
//item.layer = initial(item.layer)

View File

@@ -1,567 +0,0 @@
/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen1_old.dmi')
src.adding = list()
src.other = list()
src.hotkeybuttons = list() //These can be disabled for hotkey usersx
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
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.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
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.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.hotkeybuttons += using
inv_box = new /obj/screen/inventory()
inv_box.name = "i_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_w_uniform
inv_box.icon_state = "center"
inv_box.screen_loc = ui_iclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "o_clothing"
inv_box.dir = SOUTH
inv_box.icon = ui_style
inv_box.slot_id = slot_wear_suit
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_oclothing
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen/inventory()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "id"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "id"
inv_box.screen_loc = ui_id
inv_box.slot_id = slot_wear_id
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_mask
inv_box.slot_id = slot_wear_mask
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "back"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage1
inv_box.slot_id = slot_l_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
inv_box.screen_loc = ui_storage2
inv_box.slot_id = slot_r_store
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.dir = 8 //The sprite at dir=8 has the background whereas the others don't.
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_sstore1
inv_box.slot_id = slot_s_store
inv_box.layer = 19
src.adding += inv_box
using = new /obj/screen()
using.name = "resist"
using.icon = ui_style
using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist
using.layer = 19
src.hotkeybuttons += using
using = new /obj/screen()
using.name = "other"
using.icon = ui_style
using.icon_state = "other"
using.screen_loc = ui_inventory
using.layer = 20
src.adding += using
using = new /obj/screen()
using.name = "equip"
using.icon = ui_style
using.icon_state = "act_equip"
using.screen_loc = ui_equip
using.layer = 20
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
inv_box.screen_loc = ui_gloves
inv_box.slot_id = slot_gloves
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
inv_box.screen_loc = ui_glasses
inv_box.slot_id = slot_glasses
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
inv_box.screen_loc = ui_ears
inv_box.slot_id = slot_ears
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "hair"
inv_box.screen_loc = ui_head
inv_box.slot_id = slot_head
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
inv_box.screen_loc = ui_shoes
inv_box.slot_id = slot_shoes
inv_box.layer = 19
src.other += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
inv_box.screen_loc = ui_belt
inv_box.slot_id = slot_belt
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
src.hotkeybuttons += mymob.throw_icon
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.nutrition_icon = new /obj/screen()
mymob.nutrition_icon.icon = ui_style
mymob.nutrition_icon.icon_state = "nutrition0"
mymob.nutrition_icon.name = "nutrition"
mymob.nutrition_icon.screen_loc = ui_nutrition
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
src.hotkeybuttons += mymob.pullin
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
mymob.damageoverlay.icon_state = "oxydamageoverlay0"
mymob.damageoverlay.name = "dmg"
mymob.damageoverlay.screen_loc = "1,1"
mymob.damageoverlay.mouse_opacity = 0
mymob.damageoverlay.layer = 18.1 //The black screen overlay sets layer to 18 to display it, this one has to be just on top.
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.pain = new /obj/screen( null )
/*
mymob.hands = new /obj/screen( null )
mymob.hands.icon = ui_style
mymob.hands.icon_state = "hand"
mymob.hands.name = "hand"
mymob.hands.screen_loc = ui_hand
mymob.hands.dir = NORTH
mymob.sleep = new /obj/screen( null )
mymob.sleep.icon = ui_style
mymob.sleep.icon_state = "sleep0"
mymob.sleep.name = "sleep"
mymob.sleep.screen_loc = ui_sleep
mymob.rest = new /obj/screen( null )
mymob.rest.icon = ui_style
mymob.rest.icon_state = "rest0"
mymob.rest.name = "rest"
mymob.rest.screen_loc = ui_rest
*/
/*/Monkey blockers
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_ears
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_belt
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_shoes
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage2
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_glasses
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_gloves
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_storage1
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_headset
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_oclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_iclothing
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_id
using.layer = 20
src.mon_blo += using
using = new /obj/screen( src )
using.name = "blocked"
using.icon_state = "blocked"
using.screen_loc = ui_head
using.layer = 20
src.mon_blo += using
//Monkey blockers
*/
mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
inventory_shown = 0;
return
/mob/living/carbon/human/verb/toggle_hotkey_verbs()
set category = "OOC"
set name = "Toggle hotkey buttons"
set desc = "This disables or enables the user interface buttons which can be used with hotkeys."
if(hud_used.hotkey_ui_hidden)
client.screen += src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 0
else
client.screen -= src.hud_used.hotkeybuttons
src.hud_used.hotkey_ui_hidden = 1
/mob/living/carbon/human/update_action_buttons()
var/num = 1
if(!src.hud_used) return
if(!src.client) return
if(!hud_used.hud_shown) //Hud toggled to minimal
return
src.client.screen -= src.hud_used.item_action_list
hud_used.item_action_list = list()
for(var/obj/item/I in src)
if(I.icon_action_button)
var/obj/screen/item_action/A = new(src.hud_used)
A.icon = 'icons/mob/screen1_action.dmi'
A.icon_state = I.icon_action_button
if(I.action_button_name)
A.name = I.action_button_name
else
A.name = "Use [I.name]"
A.owner = I
hud_used.item_action_list += A
switch(num)
if(1)
A.screen_loc = ui_action_slot1
if(2)
A.screen_loc = ui_action_slot2
if(3)
A.screen_loc = ui_action_slot3
if(4)
A.screen_loc = ui_action_slot4
if(5)
A.screen_loc = ui_action_slot5
break //5 slots available, so no more can be added.
num++
src.client.screen += src.hud_used.item_action_list

View File

@@ -12,7 +12,7 @@
return
if (w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)

View File

@@ -101,7 +101,7 @@
if(w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
if(buckled)
M << "<span class='notice'>You cannot grab [src], \he is buckled in!</span>"
if(!G) //the grab will delete itself in New if affecting is anchored

View File

@@ -1588,7 +1588,7 @@ var/global/list/organ_damage_overlays = list(
if(eye_blurry)
if(!istype(global_hud.blurry,/obj/screen))
global_hud.blurry = new /obj/screen()
global_hud.blurry = getFromPool(/obj/screen)
global_hud.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH"
global_hud.blurry.icon_state = "blurry"
global_hud.blurry.layer = 17
@@ -1596,7 +1596,7 @@ var/global/list/organ_damage_overlays = list(
client.screen += global_hud.blurry
if(druggy)
if(!istype(global_hud.druggy,/obj/screen))
global_hud.druggy = new /obj/screen()
global_hud.druggy = getFromPool(/obj/screen)
global_hud.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH"
global_hud.druggy.icon_state = "druggy"
global_hud.druggy.layer = 17

View File

@@ -1,4 +0,0 @@
/mob/living/carbon/slime/regular_hud_updates()
return

View File

@@ -522,3 +522,6 @@
else
if(!AIproc)
spawn() AIprocess()
/mob/living/carbon/slime/regular_hud_updates()
return

View File

@@ -458,7 +458,7 @@
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
@@ -549,7 +549,7 @@
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
@@ -1226,4 +1226,4 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
return
else
..()
*/
*/

View File

@@ -1,249 +0,0 @@
/datum/hud/proc/monkey_hud(var/ui_style='icons/mob/screen1_old.dmi')
src.adding = list()
src.other = list()
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen()
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using
action_intent = using
//intent small hud objects
var/icon/ico
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.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
help_intent = using
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
disarm_intent = using
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.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
grab_intent = using
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.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = 21
src.adding += using
hurt_intent = using
//end intent small hud objects
using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = 20
src.adding += using
move_intent = using
using = new /obj/screen()
using.name = "drop"
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
inv_box.dir = WEST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
src.r_hand_hud_object = inv_box
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
inv_box.dir = EAST
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
src.l_hand_hud_object = inv_box
src.adding += inv_box
using = new /obj/screen()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
using.layer = 19
src.adding += using
using = new /obj/screen()
using.name = "hand"
using.dir = SOUTH
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
using.layer = 19
src.adding += using
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
inv_box.dir = NORTH
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_monkey_mask
inv_box.slot_id = slot_wear_mask
inv_box.layer = 19
src.adding += inv_box
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
inv_box.dir = NORTHEAST
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_back
inv_box.slot_id = slot_back
inv_box.layer = 19
src.adding += inv_box
mymob.throw_icon = new /obj/screen()
mymob.throw_icon.icon = ui_style
mymob.throw_icon.icon_state = "act_throw_off"
mymob.throw_icon.name = "throw"
mymob.throw_icon.screen_loc = ui_drop_throw
mymob.oxygen = new /obj/screen()
mymob.oxygen.icon = ui_style
mymob.oxygen.icon_state = "oxy0"
mymob.oxygen.name = "oxygen"
mymob.oxygen.screen_loc = ui_oxygen
mymob.pressure = new /obj/screen()
mymob.pressure.icon = ui_style
mymob.pressure.icon_state = "pressure0"
mymob.pressure.name = "pressure"
mymob.pressure.screen_loc = ui_pressure
mymob.toxin = new /obj/screen()
mymob.toxin.icon = ui_style
mymob.toxin.icon_state = "tox0"
mymob.toxin.name = "toxin"
mymob.toxin.screen_loc = ui_toxin
mymob.internals = new /obj/screen()
mymob.internals.icon = ui_style
mymob.internals.icon_state = "internal0"
mymob.internals.name = "internal"
mymob.internals.screen_loc = ui_internal
mymob.fire = new /obj/screen()
mymob.fire.icon = ui_style
mymob.fire.icon_state = "fire0"
mymob.fire.name = "fire"
mymob.fire.screen_loc = ui_fire
mymob.bodytemp = new /obj/screen()
mymob.bodytemp.icon = ui_style
mymob.bodytemp.icon_state = "temp1"
mymob.bodytemp.name = "body temperature"
mymob.bodytemp.screen_loc = ui_temp
mymob.healths = new /obj/screen()
mymob.healths.icon = ui_style
mymob.healths.icon_state = "health0"
mymob.healths.name = "health"
mymob.healths.screen_loc = ui_health
mymob.pullin = new /obj/screen()
mymob.pullin.icon = ui_style
mymob.pullin.icon_state = "pull0"
mymob.pullin.name = "pull"
mymob.pullin.screen_loc = ui_pull_resist
mymob.blind = new /obj/screen()
mymob.blind.icon = 'icons/mob/screen1_full.dmi'
mymob.blind.icon_state = "blackimageoverlay"
mymob.blind.name = " "
mymob.blind.screen_loc = "1,1"
mymob.blind.layer = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = ui_style
mymob.flash.icon_state = "blank"
mymob.flash.name = "flash"
mymob.flash.screen_loc = "1,1 to 15,15"
mymob.flash.layer = 17
mymob.zone_sel = new /obj/screen/zone_sel()
mymob.zone_sel.icon = ui_style
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
//Handle the gun settings buttons
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.dir = 2
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.dir = 1
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
mymob.gun_move_icon.dir = 1
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
mymob.gun_run_icon.dir = 1
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
return

View File

@@ -445,7 +445,7 @@
if (M == src || anchored)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
@@ -514,7 +514,7 @@
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)

View File

@@ -659,17 +659,17 @@
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
resisting++
if (G.state == GRAB_PASSIVE)
del(G)
returnToPool(G)
else
if (G.state == GRAB_AGGRESSIVE)
if (prob(25))
L.visible_message("<span class='danger'>[L] has broken free of [G.assailant]'s grip!</span>")
del(G)
returnToPool(G)
else
if (G.state == GRAB_NECK)
if (prob(5))
L.visible_message("<span class='danger'>[L] has broken free of [G.assailant]'s headlock!</span>")
del(G)
returnToPool(G)
if(resisting)
L.visible_message("<span class='danger'>[L] resists!</span>")

View File

@@ -3,12 +3,12 @@
for(var/obj/effect/rune/rune in rune_list) //HOLY FUCK WHO THOUGHT LOOPING THROUGH THE WORLD WAS A GOOD IDEA
client.images += rune.blood_image
regenerate_icons()
flash = new /obj/screen()
flash = getFromPool(/obj/screen)
flash.icon_state = "blank"
flash.name = "flash"
flash.screen_loc = "1,1 to 15,15"
flash.layer = 17
blind = new /obj/screen()
blind = getFromPool(/obj/screen)
blind.icon_state = "black"
blind.name = " "
blind.screen_loc = "1,1 to 15,15"

View File

@@ -929,7 +929,7 @@
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)

View File

@@ -101,7 +101,7 @@
/mob/living/simple_animal/Login()
if(src && src.client)
src.client.screen = null
src.client.reset_screen()
..()
/mob/living/simple_animal/updatehealth()
@@ -327,7 +327,7 @@
if (!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
@@ -363,7 +363,7 @@
if(!(status_flags & CANPUSH))
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M,src)
M.put_in_active_hand(G)
@@ -598,4 +598,4 @@
/mob/living/simple_animal/say_understands(var/mob/other,var/datum/language/speaking = null)
if(issilicon(other))
return 1
return ..()
return ..()

View File

@@ -28,9 +28,9 @@
update_Login_details()
world.update_status()
if(hud_used) qdel(hud_used) //remove the hud objects
client.images = null //remove the images such as AIs being unable to see runes
client.screen = null //remove hud items just in case
if(hud_used) del(hud_used) //remove the hud objects
client.reset_screen() //remove hud items just in case
hud_used = new /datum/hud(src)
gui_icons = new /datum/ui_icons(src)
@@ -43,12 +43,7 @@
..()
if(loc && !isturf(loc))
client.eye = loc
client.perspective = EYE_PERSPECTIVE
else
client.eye = src
client.perspective = MOB_PERSPECTIVE
reset_view()
//Clear ability list and update from mob.
client.verbs -= ability_verbs

View File

@@ -5,11 +5,15 @@
/mob/Destroy() // This makes sure that mobs with clients/keys are not just deleted from the game.
unset_machine()
if(client)
for(var/atom/movable/AM in client.screen)
qdel(AM)
client.screen = list()
qdel(hud_used)
if(client)
remove_screen_obj_references()
for(var/atom/movable/AM in client.screen)
if(istype(AM,/obj/screen))
returnToPool(AM)
else
qdel(AM)
client.screen = list()
if(mind && mind.current == src)
spellremove(src)
mob_list.Remove(src)
@@ -18,6 +22,39 @@
ghostize()
..()
/mob/proc/remove_screen_obj_references()
flash = null
blind = null
hands = null
pullin = null
visible = null
purged = null
internals = null
oxygen = null
i_select = null
m_select = null
toxin = null
fire = null
bodytemp = null
healths = null
throw_icon = null
nutrition_icon = null
pressure = null
damageoverlay = null
pain = null
item_use_icon = null
gun_move_icon = null
gun_run_icon = null
gun_setting_icon = null
m_suitclothes = null
m_suitclothesbg = null
m_hat = null
m_hatbg = null
m_glasses = null
m_glassesbg = null
spell_masters = null
zone_sel = null
/mob/proc/cultify()
return

View File

@@ -11,9 +11,6 @@
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
//Not in use yet
var/obj/effect/organstructure/organStructure = null
var/obj/screen/flash = null
var/obj/screen/blind = null
var/obj/screen/hands = null

View File

@@ -25,10 +25,10 @@
affecting = victim
if(affecting.anchored)
qdel(src)
returnToPool(src)
return
hud = new /obj/screen/grab(src)
hud = getFromPool(/obj/screen/grab)
hud.icon_state = "reinforce"
hud.name = "reinforce grab"
hud.master = src
@@ -57,7 +57,7 @@
confirm()
if(!assailant)
affecting = null
qdel(src)
returnToPool(src)
return
if(assailant.client)
@@ -116,7 +116,7 @@
return
*/
if(!assailant.canmove || assailant.lying)
qdel(src)
returnToPool(src)
return
last_upgrade = world.time
@@ -150,10 +150,10 @@
if(state == GRAB_KILL)
return
if(!assailant || !affecting)
qdel(src)
returnToPool(src)
return
if(!assailant.canmove || assailant.lying)
qdel(src)
returnToPool(src)
return
state = GRAB_KILL
assailant.visible_message("<span class='danger'>[assailant] has tightened \his grip on [affecting]'s neck!</span>")
@@ -167,7 +167,7 @@
affecting.losebreath += 1
else
if(!assailant || !affecting)
qdel(src)
returnToPool(src)
return
assailant.visible_message("<span class='warning'>[assailant] was unable to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "disarm/kill"
@@ -177,12 +177,12 @@
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
/obj/item/weapon/grab/proc/confirm()
if(!assailant || !affecting)
qdel(src)
returnToPool(src)
return 0
if(affecting)
if(!isturf(assailant.loc) || ( !isturf(affecting.loc) || assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1) )
qdel(src)
returnToPool(src)
return 0
return 1
@@ -207,11 +207,11 @@
user.visible_message("<span class='danger'>[user] devours [affecting]!</span>")
affecting.loc = user
attacker.stomach_contents.Add(affecting)
qdel(src)
returnToPool(src)
/obj/item/weapon/grab/dropped()
qdel(src)
returnToPool(src)
/obj/item/weapon/grab/Destroy()
if(affecting)
@@ -221,5 +221,5 @@
if(assailant.client)
assailant.client.screen -= hud
assailant = null
qdel(hud)
returnToPool(hud)
..()

View File

@@ -350,12 +350,12 @@
mob.delayNextMove(10)
if(!prob(25)) return 1
mob.visible_message("<span class='warning'> [mob] has broken free of [G.assailant]'s grip!</span>")
del(G)
returnToPool(G)
if(G.state == GRAB_NECK)
mob.delayNextMove(10)
if(!prob(5)) return 1
mob.visible_message("<span class='warning'> [mob] has broken free of [G.assailant]'s headlock!</span>")
del(G)
returnToPool(G)
return 0

View File

@@ -1,3 +0,0 @@
/datum/hud/proc/unplayer_hud()
return

View File

@@ -9,7 +9,7 @@
spell_master.add_spell(spell_to_add)
return 1
var/obj/screen/movable/spell_master/new_spell_master = new master_type //we're here because either we didn't find our type, or we have no spell masters to attach to
var/obj/screen/movable/spell_master/new_spell_master = getFromPool(master_type) //we're here because either we didn't find our type, or we have no spell masters to attach to
if(client)
src.client.screen += new_spell_master
new_spell_master.spell_holder = src

View File

@@ -237,17 +237,17 @@ client/var
//These are called by the on-screen buttons, adjusting what the victim can and cannot do.
client/proc/add_gun_icons()
if (!usr.item_use_icon)
usr.item_use_icon = new /obj/screen/gun/item(null)
usr.item_use_icon = getFromPool(/obj/screen/gun/item)
usr.item_use_icon.icon_state = "no_item[target_can_click]"
usr.item_use_icon.name = "[target_can_click ? "Disallow" : "Allow"] Item Use"
if (!usr.gun_move_icon)
usr.gun_move_icon = new /obj/screen/gun/move(null)
usr.gun_move_icon = getFromPool(/obj/screen/gun/move)
usr.gun_move_icon.icon_state = "no_walk[target_can_move]"
usr.gun_move_icon.name = "[target_can_move ? "Disallow" : "Allow"] Walking"
if (target_can_move && !usr.gun_run_icon)
usr.gun_run_icon = new /obj/screen/gun/run(null)
usr.gun_run_icon = getFromPool(/obj/screen/gun/run)
usr.gun_run_icon.icon_state = "no_run[target_can_run]"
usr.gun_run_icon.name = "[target_can_run ? "Disallow" : "Allow"] Running"
@@ -263,9 +263,9 @@ client/proc/remove_gun_icons()
screen -= usr.gun_move_icon
if (target_can_move)
screen -= usr.gun_run_icon
del usr.gun_move_icon
del usr.item_use_icon
del usr.gun_run_icon
returnToPool(usr.gun_move_icon)
returnToPool(usr.item_use_icon)
returnToPool(usr.gun_run_icon)
client/verb/ToggleGunMode()
set hidden = 1
@@ -289,7 +289,7 @@ client/verb/AllowTargetMove()
target_can_move = !target_can_move
if(target_can_move)
usr << "Target may now walk."
usr.gun_run_icon = new /obj/screen/gun/run(null) //adding icon for running permission
usr.gun_run_icon = getFromPool(/obj/screen/gun/run) //adding icon for running permission
screen += usr.gun_run_icon
else
usr << "Target may no longer move."

View File

@@ -194,7 +194,7 @@
if (M.a_intent == "grab")
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M )
var/obj/item/weapon/grab/G = getFromPool(/obj/item/weapon/grab,M)
G.assailant = M
if (M.hand)
M.l_hand = G
@@ -465,7 +465,7 @@ Frequency:
if (istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class='warning'>[G.affecting] has been pulled from [G.assailant]'s grip by [src]</span>"), 1)
del(G)
returnToPool(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))

View File

@@ -243,7 +243,7 @@
mymob.zone_sel.overlays.len = 0
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
mymob.client.reset_screen()
mymob.client.screen += list(mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.other