Gives blobs a fukken hud, with buttons and everything.

Blobs can now expand just by clicking.
Shield blob creation changed to ctrl-click.
Reverted expand cost to 5.
This commit is contained in:
Nerd Lord
2015-11-20 11:58:55 -05:00
parent d1bcc9d0de
commit 6b72222dbf
6 changed files with 137 additions and 31 deletions
+2
View File
@@ -210,6 +210,8 @@ var/datum/global_hud/global_hud = new()
hoggod_hud()
else if(isguardian(mymob))
guardian_hud()
else if(isovermind(mymob))
blob_hud()
//Version denotes which style should be displayed. blank or 0 means "next version"
/datum/hud/proc/show_hud(version = 0)
-19
View File
@@ -14,25 +14,6 @@
mymob.client.screen += list(mymob.blind)
mymob.client.screen += mymob.client.void
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen_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 = list()
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
mymob.client.screen += mymob.client.void
/datum/hud/proc/hoggod_hud(ui_style = 'icons/mob/screen_midnight.dmi')
deity_health_display = new /obj/screen()
deity_health_display.name = "Nexus Health"
+15 -2
View File
@@ -1,7 +1,20 @@
// Blob Overmind Controls
/mob/camera/blob/CtrlClickOn(atom/A) // Expand blob
/mob/camera/blob/ClickOn(var/atom/A, var/params) // Expand blob
var/list/modifiers = params2list(params)
if(modifiers["middle"])
MiddleClickOn(A)
return
if(modifiers["shift"])
ShiftClickOn(A)
return
if(modifiers["alt"])
AltClickOn(A)
return
if(modifiers["ctrl"])
CtrlClickOn(A)
return
var/turf/T = get_turf(A)
if(T)
expand_blob(T)
@@ -11,7 +24,7 @@
if(T)
rally_spores(T)
/mob/camera/blob/AltClickOn(atom/A) // Create a shield
/mob/camera/blob/CtrlClickOn(atom/A) // Create a shield
var/turf/T = get_turf(A)
if(T)
create_shield(T)
+111 -1
View File
@@ -60,7 +60,7 @@
src << "<b>Resource Blob</b> is a blob which will collect more resources for you, try to build these earlier to get a strong income. It will benefit from being near your core or multiple nodes, by having an increased resource rate; put it alone and it won't create resources at all."
src << "<b>Node Blob</b> is a blob which will grow, like the core. Unlike the core it won't give you a small income but it can power resource and factory blobs to increase their rate."
src << "<b>Factory Blob</b> is a blob which will spawn blob spores which will attack nearby food. Putting this nearby nodes and your core will increase the spawn rate; put it alone and it will not spawn any spores."
src << "<b>Shortcuts:</b> CTRL Click = Expand Blob / Middle Mouse Click = Rally Spores / Alt Click = Create Shield"
src << "<b>Shortcuts:</b> Click = Expand Blob / Middle Mouse Click = Rally Spores / Ctrl Click = Create Shield"
update_health()
/mob/camera/blob/proc/update_health()
@@ -126,3 +126,113 @@
/mob/camera/blob/proc/can_attack()
return (world.time > (last_attack + CLICK_CD_RANGE))
/obj/screen/blob
icon = 'icons/mob/blob.dmi'
/obj/screen/blob/JumpToNode
icon_state = "ui_tonode"
name = "Jump to Node"
desc = "Moves your camera to a selected blob node."
/obj/screen/blob/JumpToNode/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.jump_to_node()
/obj/screen/blob/JumpToCore
icon_state = "ui_tocore"
name = "Jump to Core"
desc = "Moves your camera to your blob core."
/obj/screen/blob/JumpToCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.transport_core()
/obj/screen/blob/ResourceBlob
icon_state = "ui_resource"
name = "Produce Resource Blob (40)"
desc = "Produces a resource blob for 40 points."
/obj/screen/blob/ResourceBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_resource()
/obj/screen/blob/NodeBlob
icon_state = "ui_node"
name = "Produce Node Blob (60)"
desc = "Produces a node blob for 60 points."
/obj/screen/blob/NodeBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_node()
/obj/screen/blob/FactoryBlob
icon_state = "ui_factory"
name = "Produce Factory Blob (60)"
desc = "Produces a resource blob for 60 points."
/obj/screen/blob/FactoryBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_factory()
/obj/screen/blob/RelocateCore
icon_state = "ui_swap"
name = "Relocate Core (80)"
desc = "Swaps a node and your core for 80 points."
/obj/screen/blob/RelocateCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.relocate_core()
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen_midnight.dmi')
adding = list()
var/obj/screen/using
blobpwrdisplay = new /obj/screen()
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.layer = 20
adding += blobpwrdisplay
blobhealthdisplay = new /obj/screen()
blobhealthdisplay.name = "blob health"
blobhealthdisplay.icon_state = "block"
blobhealthdisplay.screen_loc = ui_internal
blobhealthdisplay.layer = 20
adding += blobhealthdisplay
using = new /obj/screen/blob/JumpToNode()
using.screen_loc = ui_inventory
adding += using
using = new /obj/screen/blob/JumpToCore()
using.screen_loc = ui_zonesel
adding += using
using = new /obj/screen/blob/ResourceBlob()
using.screen_loc = ui_back
adding += using
using = new /obj/screen/blob/NodeBlob()
using.screen_loc = ui_lhand
adding += using
using = new /obj/screen/blob/FactoryBlob()
using.screen_loc = ui_rhand
adding += using
using = new /obj/screen/blob/RelocateCore()
using.screen_loc = ui_storage1
adding += using
mymob.client.screen = list()
mymob.client.screen += mymob.client.void
mymob.client.screen += adding
+9 -9
View File
@@ -91,10 +91,10 @@
var/turf/T = get_turf(src)
var/obj/effect/blob/B = locate(/obj/effect/blob) in T
if(!B)
src << "You must be on a blob!"
src << "<span class='warning'>You must be on a blob!</span>"
return
if(!istype(B, /obj/effect/blob/factory))
src << "Unable to use this blob, find a factory blob."
src << "<span class='warning'>Unable to use this blob, find a factory blob.</span>"
return
if(!can_buy(20))
return
@@ -112,7 +112,7 @@
var/turf/T = get_turf(src)
var/obj/effect/blob/node/B = locate(/obj/effect/blob/node) in T
if(!B)
src << "You must be on a blob node!"
src << "<span class='warning'>You must be on a blob node!</span>"
return
if(!can_buy(80))
return
@@ -127,16 +127,16 @@
var/turf/T = get_turf(src)
var/obj/effect/blob/B = locate(/obj/effect/blob) in T
if(!B)
src << "You must be on a blob!"
src << "<span class='warning'>You must be on a blob!</span>"
return
if(istype(B, /obj/effect/blob/core))
src << "Unable to remove this blob."
src << "<span class='warning'>Unable to remove this blob.</span>"
return
qdel(B)
/mob/camera/blob/verb/expand_blob_power()
set category = "Blob"
set name = "Expand/Attack Blob (4)"
set name = "Expand/Attack Blob (5)"
set desc = "Attempts to create a new blob in this tile. If the tile isn't clear we will attack it, which might clear it."
var/turf/T = get_turf(src)
expand_blob(T)
@@ -146,13 +146,13 @@
return
var/obj/effect/blob/B = locate() in T
if(B)
src << "There is a blob here!"
src << "<span class='warning'>There is a blob here!</span>"
return
var/obj/effect/blob/OB = locate() in circlerange(T, 1)
if(!OB)
src << "There is no blob adjacent to you."
src << "<span class='warning'>There is no blob adjacent to you.</span>"
return
if(!can_buy(4))
if(!can_buy(5))
return
last_attack = world.time
OB.expand(T, 0, blob_reagent_datum.color)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

After

Width:  |  Height:  |  Size: 478 KiB