mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge https://github.com/ParadiseSS13/Paradise into SlimeHUD
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/screen/movable/action_button
|
||||
var/datum/action/linked_action
|
||||
screen_loc = null
|
||||
@@ -6,18 +5,26 @@
|
||||
/obj/screen/movable/action_button/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
moved = 0
|
||||
if(locked)
|
||||
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
|
||||
return TRUE
|
||||
moved = FALSE
|
||||
usr.update_action_buttons() //redraw buttons that are no longer considered "moved"
|
||||
return 1
|
||||
if(usr.next_move >= world.time) // Is this needed ?
|
||||
return TRUE
|
||||
if(modifiers["ctrl"])
|
||||
locked = !locked
|
||||
to_chat(usr, "<span class='notice'>Action button \"[name]\" [locked ? "" : "un"]locked.</span>")
|
||||
return TRUE
|
||||
if(usr.next_click > world.time)
|
||||
return
|
||||
usr.next_click = world.time + 1
|
||||
linked_action.Trigger()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
//Hide/Show Action Buttons ... Button
|
||||
/obj/screen/movable/action_button/hide_toggle
|
||||
name = "Hide Buttons"
|
||||
desc = "Shift-click any button to reset its position. Alt-click to reset all buttons to their default positions."
|
||||
desc = "Shift-click any button to reset its position, and Control-click it to lock/unlock its position. Alt-click this button to reset all buttons to their default positions."
|
||||
icon = 'icons/mob/actions/actions.dmi'
|
||||
icon_state = "bg_default"
|
||||
var/hidden = 0
|
||||
@@ -25,9 +32,16 @@
|
||||
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
|
||||
var/list/modifiers = params2list(params)
|
||||
if(modifiers["shift"])
|
||||
if(locked)
|
||||
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
|
||||
return TRUE
|
||||
moved = FALSE
|
||||
usr.update_action_buttons(TRUE)
|
||||
return TRUE
|
||||
if(modifiers["ctrl"])
|
||||
locked = !locked
|
||||
to_chat(usr, "<span class='notice'>Action button \"[name]\" [locked ? "" : "un"]locked.</span>")
|
||||
return TRUE
|
||||
if(modifiers["alt"])
|
||||
for(var/V in usr.actions)
|
||||
var/datum/action/A = V
|
||||
@@ -69,7 +83,6 @@
|
||||
var/image/img = image(icon, src, hidden ? "show" : "hide")
|
||||
overlays += img
|
||||
|
||||
|
||||
/obj/screen/movable/action_button/MouseEntered(location,control,params)
|
||||
openToolTip(usr,src,params,title = name,content = desc)
|
||||
|
||||
@@ -77,7 +90,6 @@
|
||||
/obj/screen/movable/action_button/MouseExited()
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
/mob/proc/update_action_buttons_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
@@ -122,7 +134,6 @@
|
||||
client.screen += hud_used.hide_actions_toggle
|
||||
|
||||
|
||||
|
||||
#define AB_MAX_COLUMNS 10
|
||||
|
||||
/datum/hud/proc/ButtonNumberToScreenCoords(number) // TODO : Make this zero-indexed for readabilty
|
||||
|
||||
@@ -177,6 +177,41 @@
|
||||
desc = "You're severely malnourished. The hunger pains make moving around a chore."
|
||||
icon_state = "starving"
|
||||
|
||||
///Vampire "hunger"
|
||||
|
||||
/obj/screen/alert/fat/vampire
|
||||
name = "Fat"
|
||||
desc = "You somehow drank too much blood, lardass. Run around the station and lose some weight."
|
||||
icon_state = "v_fat"
|
||||
|
||||
/obj/screen/alert/full/vampire
|
||||
name = "Full"
|
||||
desc = "You feel full and satisfied, but you know you will thirst for more blood soon..."
|
||||
icon_state = "v_full"
|
||||
|
||||
/obj/screen/alert/well_fed/vampire
|
||||
name = "Well Fed"
|
||||
desc = "You feel quite satisfied, but you could do with a bit more blood."
|
||||
icon_state = "v_well_fed"
|
||||
|
||||
/obj/screen/alert/fed/vampire
|
||||
name = "Fed"
|
||||
desc = "You feel moderately satisfied, but a bit more blood wouldn't hurt."
|
||||
icon_state = "v_fed"
|
||||
|
||||
/obj/screen/alert/hungry/vampire
|
||||
name = "Hungry"
|
||||
desc = "You currently thirst for blood."
|
||||
icon_state = "v_hungry"
|
||||
|
||||
/obj/screen/alert/starving/vampire
|
||||
name = "Starving"
|
||||
desc = "You're severely thirsty. The thirst pains make moving around a chore."
|
||||
icon_state = "v_starving"
|
||||
|
||||
//End of Vampire "hunger"
|
||||
|
||||
|
||||
/obj/screen/alert/hot
|
||||
name = "Too Hot"
|
||||
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
/obj/screen/movable
|
||||
var/snap2grid = FALSE
|
||||
var/moved = FALSE
|
||||
var/locked = TRUE
|
||||
var/x_off = -16
|
||||
var/y_off = -16
|
||||
|
||||
@@ -20,8 +21,10 @@
|
||||
/obj/screen/movable/snap
|
||||
snap2grid = TRUE
|
||||
|
||||
|
||||
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
|
||||
if(locked) //no! I am locked! begone!
|
||||
return
|
||||
|
||||
var/list/PM = params2list(params)
|
||||
|
||||
//No screen-loc information? abort.
|
||||
@@ -47,7 +50,6 @@
|
||||
|
||||
moved = screen_loc
|
||||
|
||||
|
||||
//Debug procs
|
||||
/client/proc/test_movable_UI()
|
||||
set category = "Debug"
|
||||
@@ -67,7 +69,6 @@
|
||||
|
||||
screen += M
|
||||
|
||||
|
||||
/client/proc/test_snap_UI()
|
||||
set category = "Debug"
|
||||
set name = "Spawn Snap UI Object"
|
||||
@@ -84,4 +85,4 @@
|
||||
|
||||
S.screen_loc = screen_l
|
||||
|
||||
screen += S
|
||||
screen += S
|
||||
|
||||
Reference in New Issue
Block a user