Files
Paradise/code/_onclick/hud/swarmer.dm
Tigercat2000 0f70e6810b -tg- OOP Hud Refactor
- Added 4 new HUD styles
 - Humans recreate their hud if they change their UI pref mid-game
 - Refactored how objects are added to the client screen
 - HUD's are now handled by subtype and mob/proc/create_mob_hud()
 - HUD visibility is no longer chained directly to the F12 button, it's a proc on HUD datums now
 - Mobs only create/destroy their HUD when necessary, not every Login()
 - Destroyed aim-mode, it didn't work and I couldn't make it work.
 - Renamed all of the screen1_x.dmi files to screen_x.dmi
 - Removed screen1.dmi, screen_gen.dmi now handles generic icons.
2016-04-21 20:28:08 -07:00

98 lines
2.8 KiB
Plaintext

////HUD NONSENSE////
/obj/screen/swarmer
icon = 'icons/mob/swarmer.dmi'
/obj/screen/swarmer/FabricateTrap
icon_state = "ui_trap"
name = "Create trap (Costs 5 Resources)"
desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it. (Costs 5 resources)"
/obj/screen/swarmer/FabricateTrap/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateTrap()
/obj/screen/swarmer/Barricade
icon_state = "ui_barricade"
name = "Create barricade (Costs 5 Resources)"
desc = "Creates a destructible barricade that will stop any non swarmer from passing it. Also allows disabler beams to pass through. (Costs 5 resources)"
/obj/screen/swarmer/Barricade/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateBarricade()
/obj/screen/swarmer/Replicate
icon_state = "ui_replicate"
name = "Replicate (Costs 50 Resources)"
desc = "Creates a another of our kind."
/obj/screen/swarmer/Replicate/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateSwarmer()
/obj/screen/swarmer/RepairSelf
icon_state = "ui_self_repair"
name = "Repair self"
desc = "Repairs damage to our body."
/obj/screen/swarmer/RepairSelf/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.RepairSelf()
/obj/screen/swarmer/ToggleLight
icon_state = "ui_light"
name = "Toggle light"
desc = "Toggles our inbuilt light on or off."
/obj/screen/swarmer/ToggleLight/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ToggleLight()
/obj/screen/swarmer/ContactSwarmers
icon_state = "ui_contact_swarmers"
name = "Contact swarmers"
desc = "Sends a message to all other swarmers, should they exist."
/obj/screen/swarmer/ContactSwarmers/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ContactSwarmers()
/mob/living/simple_animal/hostile/swarmer/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/swarmer(src)
/datum/hud/swarmer/New(mob/owner)
..()
var/obj/screen/using
using = new /obj/screen/swarmer/FabricateTrap()
using.screen_loc = ui_rhand
static_inventory += using
using = new /obj/screen/swarmer/Barricade()
using.screen_loc = ui_lhand
static_inventory += using
using = new /obj/screen/swarmer/Replicate()
using.screen_loc = ui_zonesel
static_inventory += using
using = new /obj/screen/swarmer/RepairSelf()
using.screen_loc = ui_storage1
static_inventory += using
using = new /obj/screen/swarmer/ToggleLight()
using.screen_loc = ui_back
static_inventory += using
using = new /obj/screen/swarmer/ContactSwarmers()
using.screen_loc = ui_inventory
static_inventory += using