everything to controllers
This commit is contained in:
+47
-35
@@ -40,7 +40,7 @@
|
||||
*/
|
||||
/atom/Click(location,control,params)
|
||||
if(flags_1 & INITIALIZED_1)
|
||||
SendSignal(COMSIG_CLICK, location, control, params)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK, location, control, params)
|
||||
usr.ClickOn(src, params)
|
||||
|
||||
/atom/DblClick(location,control,params)
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
After that, mostly just check your state, check whether you're holding an item,
|
||||
check whether you're adjacent to the target, then pass off the click to whoever
|
||||
is recieving it.
|
||||
is receiving it.
|
||||
The most common are:
|
||||
* mob/UnarmedAttack(atom,adjacent) - used here only when adjacent, with no item in hand; in the case of humans, checks gloves
|
||||
* atom/attackby(item,user) - used only when adjacent
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
//These are always reachable.
|
||||
//User itself, current loc, and user inventory
|
||||
if(DirectAccess(A))
|
||||
if(A in DirectAccess())
|
||||
if(W)
|
||||
W.melee_attack_chain(src, A, params)
|
||||
else
|
||||
@@ -174,40 +174,52 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/atom/movable/proc/CanReach(atom/target,obj/item/tool,view_only = FALSE)
|
||||
if(isturf(target) || isturf(target.loc) || DirectAccess(target)) //Directly accessible atoms
|
||||
if(Adjacent(target) || (tool && CheckToolReach(src, target, tool.reach))) //Adjacent or reaching attacks
|
||||
return TRUE
|
||||
else
|
||||
//Things inside storage insde another storage
|
||||
//Eg Contents of a box in a backpack
|
||||
var/atom/outer_storage = get_atom_on_turf(target)
|
||||
if(outer_storage == target) //whatever that is we don't want infinite loop.
|
||||
return FALSE
|
||||
if(outer_storage && CanReach(outer_storage,tool) && outer_storage.CanReachStorage(target,src,view_only ? STORAGE_VIEW_DEPTH : INVENTORY_DEPTH))
|
||||
return TRUE
|
||||
/atom/movable/proc/CanReach(atom/ultimate_target, obj/item/tool, view_only = FALSE)
|
||||
// A backwards depth-limited breadth-first-search to see if the target is
|
||||
// logically "in" anything adjacent to us.
|
||||
var/list/direct_access = DirectAccess()
|
||||
var/depth = 1 + (view_only ? STORAGE_VIEW_DEPTH : INVENTORY_DEPTH)
|
||||
|
||||
var/list/closed = list()
|
||||
var/list/checking = list(ultimate_target)
|
||||
while (checking.len && depth > 0)
|
||||
var/list/next = list()
|
||||
--depth
|
||||
|
||||
for(var/atom/target in checking) // will filter out nulls
|
||||
if(closed[target] || isarea(target)) // avoid infinity situations
|
||||
continue
|
||||
closed[target] = TRUE
|
||||
if(isturf(target) || isturf(target.loc) || (target in direct_access)) //Directly accessible atoms
|
||||
if(Adjacent(target) || (tool && CheckToolReach(src, target, tool.reach))) //Adjacent or reaching attacks
|
||||
return TRUE
|
||||
|
||||
if (!target.loc)
|
||||
continue
|
||||
GET_COMPONENT_FROM(storage, /datum/component/storage, target.loc)
|
||||
if (storage)
|
||||
var/datum/component/storage/concrete/master = storage.master()
|
||||
if (master)
|
||||
next += master.parent
|
||||
for(var/S in master.slaves)
|
||||
var/datum/component/storage/slave = S
|
||||
next += slave.parent
|
||||
else
|
||||
next += target.loc
|
||||
else
|
||||
next += target.loc
|
||||
|
||||
checking = next
|
||||
return FALSE
|
||||
|
||||
//Can [target] in this container be reached by [user], can't be more than [depth] levels deep
|
||||
/atom/proc/CanReachStorage(atom/target,user,depth)
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/CanReachStorage(atom/target,user,depth)
|
||||
while(target && depth > 0)
|
||||
target = target.loc
|
||||
depth--
|
||||
if(target == src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/atom/movable/proc/DirectAccess(atom/target)
|
||||
return (target == src || target == loc)
|
||||
/atom/movable/proc/DirectAccess()
|
||||
return list(src, loc)
|
||||
|
||||
/mob/DirectAccess(atom/target)
|
||||
return (..() || (target in contents))
|
||||
return ..() + contents
|
||||
|
||||
/mob/living/DirectAccess(atom/target)
|
||||
return (..() || (target in GetAllContents()))
|
||||
return ..() + GetAllContents()
|
||||
|
||||
/atom/proc/AllowClick()
|
||||
return FALSE
|
||||
@@ -309,7 +321,7 @@
|
||||
A.ShiftClick(src)
|
||||
return
|
||||
/atom/proc/ShiftClick(mob/user)
|
||||
SendSignal(COMSIG_CLICK_SHIFT, user)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_SHIFT, user)
|
||||
if(user.client && user.client.eye == user || user.client.eye == user.loc)
|
||||
user.examinate(src)
|
||||
return
|
||||
@@ -324,7 +336,7 @@
|
||||
return
|
||||
|
||||
/atom/proc/CtrlClick(mob/user)
|
||||
SendSignal(COMSIG_CLICK_CTRL, user)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user)
|
||||
var/mob/living/ML = user
|
||||
if(istype(ML))
|
||||
ML.pulled(src)
|
||||
@@ -356,7 +368,7 @@
|
||||
..()
|
||||
|
||||
/atom/proc/AltClick(mob/user)
|
||||
SendSignal(COMSIG_CLICK_ALT, user)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_ALT, user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && user.TurfAdjacent(T))
|
||||
if(user.listed_turf == T)
|
||||
@@ -381,7 +393,7 @@
|
||||
return
|
||||
|
||||
/atom/proc/CtrlShiftClick(mob/user)
|
||||
SendSignal(COMSIG_CLICK_CTRL_SHIFT)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_CTRL_SHIFT)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
/mob/living/silicon/robot/AltClickOn(atom/A)
|
||||
A.BorgAltClick(src)
|
||||
|
||||
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
|
||||
@@ -111,7 +111,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
ShiftClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgShiftClick(mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
|
||||
@@ -121,7 +121,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overridden
|
||||
CtrlClick(user)
|
||||
|
||||
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
MouseDrop:
|
||||
|
||||
Called on the atom you're dragging. In a lot of circumstances we want to use the
|
||||
recieving object instead, so that's the default action. This allows you to drag
|
||||
receiving object instead, so that's the default action. This allows you to drag
|
||||
almost anything into a trash can.
|
||||
*/
|
||||
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
if(!usr || !over)
|
||||
return
|
||||
if(SendSignal(COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is recieving will verify themselves for adjacency.
|
||||
if(SEND_SIGNAL(src, COMSIG_MOUSEDROP_ONTO, over, usr) & COMPONENT_NO_MOUSEDROP) //Whatever is receiving will verify themselves for adjacency.
|
||||
return
|
||||
if(over == src)
|
||||
return usr.client.Click(src, src_location, src_control, params)
|
||||
@@ -18,9 +18,9 @@
|
||||
over.MouseDrop_T(src,usr)
|
||||
return
|
||||
|
||||
// recieve a mousedrop
|
||||
// receive a mousedrop
|
||||
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
||||
SendSignal(COMSIG_MOUSEDROPPED_ONTO, dropping, user)
|
||||
SEND_SIGNAL(src, COMSIG_MOUSEDROPPED_ONTO, dropping, user)
|
||||
return
|
||||
|
||||
|
||||
@@ -140,4 +140,4 @@
|
||||
if (middragatom == src_object)
|
||||
middragtime = 0
|
||||
middragatom = null
|
||||
..()
|
||||
..()
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/datum/hud/proc/get_action_buttons_icons()
|
||||
. = list()
|
||||
.["bg_icon"] = ui_style_icon
|
||||
.["bg_icon"] = ui_style
|
||||
.["bg_state"] = "template"
|
||||
|
||||
//TODO : Make these fit theme
|
||||
|
||||
@@ -186,9 +186,9 @@
|
||||
|
||||
|
||||
/datum/hud/ai
|
||||
ui_style_icon = 'icons/mob/screen_ai.dmi'
|
||||
ui_style = 'icons/mob/screen_ai.dmi'
|
||||
|
||||
/datum/hud/ai/New(mob/owner, ui_style = 'icons/mob/screen_ai.dmi')
|
||||
/datum/hud/ai/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
|
||||
@@ -237,6 +237,16 @@ magboots would let you walk around normally on the floor. Barring those, you can
|
||||
or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
icon_state = "weightless"
|
||||
|
||||
/obj/screen/alert/highgravity
|
||||
name = "High Gravity"
|
||||
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed."
|
||||
icon_state = "paralysis"
|
||||
|
||||
/obj/screen/alert/veryhighgravity
|
||||
name = "Crushing Gravity"
|
||||
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed. You'll also accumulate brute damage!"
|
||||
icon_state = "paralysis"
|
||||
|
||||
/obj/screen/alert/fire
|
||||
name = "On Fire"
|
||||
desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area."
|
||||
@@ -588,7 +598,6 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
// Re-render all alerts - also called in /datum/hud/show_hud() because it's needed there
|
||||
/datum/hud/proc/reorganize_alerts()
|
||||
var/list/alerts = mymob.alerts
|
||||
var/icon_pref
|
||||
if(!hud_shown)
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
mymob.client.screen -= alerts[alerts[i]]
|
||||
@@ -596,9 +605,7 @@ so as to remain in compliance with the most up-to-date laws."
|
||||
for(var/i = 1, i <= alerts.len, i++)
|
||||
var/obj/screen/alert/alert = alerts[alerts[i]]
|
||||
if(alert.icon_state == "template")
|
||||
if(!icon_pref)
|
||||
icon_pref = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
alert.icon = icon_pref
|
||||
alert.icon = ui_style
|
||||
switch(i)
|
||||
if(1)
|
||||
. = ui_alert1
|
||||
|
||||
@@ -24,11 +24,10 @@
|
||||
desc = "Allows you to sense the general direction of your Queen."
|
||||
screen_loc = ui_alien_queen_finder
|
||||
|
||||
|
||||
/datum/hud/alien
|
||||
ui_style_icon = 'icons/mob/screen_alien.dmi'
|
||||
ui_style = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner, ui_style = 'icons/mob/screen_alien.dmi')
|
||||
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
|
||||
..()
|
||||
|
||||
var/obj/screen/using
|
||||
@@ -36,7 +35,7 @@
|
||||
//equippable shit
|
||||
|
||||
//hands
|
||||
build_hand_slots(ui_style)
|
||||
build_hand_slots()
|
||||
|
||||
//begin buttons
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/datum/hud/larva
|
||||
ui_style = 'icons/mob/screen_alien.dmi'
|
||||
|
||||
/datum/hud/larva/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
/datum/hud/constructs
|
||||
ui_style_icon = 'icons/mob/screen_construct.dmi'
|
||||
ui_style = 'icons/mob/screen_construct.dmi'
|
||||
|
||||
/datum/hud/constructs/New(mob/owner)
|
||||
..()
|
||||
pull_icon = new /obj/screen/pull()
|
||||
pull_icon.icon = 'icons/mob/screen_construct.dmi'
|
||||
pull_icon.icon = ui_style
|
||||
pull_icon.update_icon(mymob)
|
||||
pull_icon.screen_loc = ui_construct_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//Soul counter is stored with the humans, it does weird when you place it here apparently...
|
||||
|
||||
|
||||
/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/devil/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
build_hand_slots()
|
||||
|
||||
using = new /obj/screen/inventory()
|
||||
using.name = "hand"
|
||||
@@ -62,4 +62,4 @@
|
||||
|
||||
/mob/living/carbon/true_devil/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/devil(src)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/hud/dextrous/drone/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/dextrous/drone/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/inventory/inv_box
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//Used for normal mobs that have hands.
|
||||
/datum/hud/dextrous/New(mob/living/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/dextrous/New(mob/living/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
pull_icon.screen_loc = ui_drone_pull
|
||||
static_inventory += pull_icon
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
build_hand_slots()
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
@@ -78,6 +78,6 @@
|
||||
/mob/living/simple_animal/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
if(dextrous)
|
||||
hud_used = new dextrous_hud_type(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new dextrous_hud_type(src)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -90,4 +90,4 @@
|
||||
|
||||
/mob/dead/observer/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/ghost(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/ghost(src)
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
if(dextrous)
|
||||
..()
|
||||
else
|
||||
hud_used = new /datum/hud/guardian(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/guardian(src)
|
||||
|
||||
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner, ui_style = 'icons/mob/screen_midnight.dmi') //for a dextrous guardian
|
||||
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian
|
||||
..()
|
||||
var/obj/screen/using
|
||||
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
|
||||
|
||||
+41
-38
@@ -4,6 +4,19 @@
|
||||
including inventories and item quick actions.
|
||||
*/
|
||||
|
||||
// The default UI style is the first one in the list
|
||||
GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
"Midnight" = 'icons/mob/screen_midnight.dmi',
|
||||
"Retro" = 'icons/mob/screen_retro.dmi',
|
||||
"Plasmafire" = 'icons/mob/screen_plasmafire.dmi',
|
||||
"Slimecore" = 'icons/mob/screen_slimecore.dmi',
|
||||
"Operative" = 'icons/mob/screen_operative.dmi',
|
||||
"Clockwork" = 'icons/mob/screen_clockwork.dmi'
|
||||
))
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
return GLOB.available_ui_styles[ui_style] || GLOB.available_ui_styles[GLOB.available_ui_styles[1]]
|
||||
|
||||
/datum/hud
|
||||
var/mob/mymob
|
||||
|
||||
@@ -45,12 +58,15 @@
|
||||
var/obj/screen/internals
|
||||
var/obj/screen/mood
|
||||
|
||||
var/ui_style_icon = 'icons/mob/screen_midnight.dmi'
|
||||
// subtypes can override this to force a specific UI style
|
||||
var/ui_style
|
||||
|
||||
/datum/hud/New(mob/owner , ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/New(mob/owner)
|
||||
mymob = owner
|
||||
|
||||
ui_style_icon = ui_style
|
||||
if (!ui_style)
|
||||
// will fall back to the default if any of these are null
|
||||
ui_style = ui_style2icon(owner.client && owner.client.prefs && owner.client.prefs.UI_style)
|
||||
|
||||
hide_actions_toggle = new
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
@@ -68,38 +84,19 @@
|
||||
if(mymob.hud_used == src)
|
||||
mymob.hud_used = null
|
||||
|
||||
qdel(hide_actions_toggle)
|
||||
hide_actions_toggle = null
|
||||
|
||||
qdel(module_store_icon)
|
||||
module_store_icon = null
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
static_inventory.Cut()
|
||||
QDEL_NULL(hide_actions_toggle)
|
||||
QDEL_NULL(module_store_icon)
|
||||
QDEL_LIST(static_inventory)
|
||||
|
||||
inv_slots.Cut()
|
||||
action_intent = null
|
||||
zone_select = null
|
||||
pull_icon = null
|
||||
|
||||
if(toggleable_inventory.len)
|
||||
for(var/thing in toggleable_inventory)
|
||||
qdel(thing)
|
||||
toggleable_inventory.Cut()
|
||||
|
||||
if(hotkeybuttons.len)
|
||||
for(var/thing in hotkeybuttons)
|
||||
qdel(thing)
|
||||
hotkeybuttons.Cut()
|
||||
|
||||
QDEL_LIST(toggleable_inventory)
|
||||
QDEL_LIST(hotkeybuttons)
|
||||
throw_icon = null
|
||||
|
||||
if(infodisplay.len)
|
||||
for(var/thing in infodisplay)
|
||||
qdel(thing)
|
||||
infodisplay.Cut()
|
||||
QDEL_LIST(infodisplay)
|
||||
|
||||
healths = null
|
||||
healthdoll = null
|
||||
@@ -112,15 +109,8 @@
|
||||
alien_plasma_display = null
|
||||
alien_queen_finder = null
|
||||
|
||||
if(plane_masters.len)
|
||||
for(var/thing in plane_masters)
|
||||
qdel(plane_masters[thing])
|
||||
plane_masters.Cut()
|
||||
|
||||
if(screenoverlays.len)
|
||||
for(var/thing in screenoverlays)
|
||||
qdel(thing)
|
||||
screenoverlays.Cut()
|
||||
QDEL_LIST_ASSOC_VAL(plane_masters)
|
||||
QDEL_LIST(screenoverlays)
|
||||
mymob = null
|
||||
|
||||
return ..()
|
||||
@@ -239,6 +229,19 @@
|
||||
if(!mymob)
|
||||
return
|
||||
|
||||
/datum/hud/proc/update_ui_style(new_ui_style)
|
||||
// do nothing if overridden by a subtype or already on that style
|
||||
if (initial(ui_style) || ui_style == new_ui_style)
|
||||
return
|
||||
|
||||
for(var/atom/item in static_inventory + toggleable_inventory + hotkeybuttons + infodisplay + screenoverlays + inv_slots)
|
||||
if (item.icon == ui_style)
|
||||
item.icon = new_ui_style
|
||||
|
||||
ui_style = new_ui_style
|
||||
build_hand_slots()
|
||||
hide_actions_toggle.InitialiseIcon(src)
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
set name = "F12"
|
||||
@@ -254,7 +257,7 @@
|
||||
//(re)builds the hand ui slots, throwing away old ones
|
||||
//not really worth jugglying existing ones so we just scrap+rebuild
|
||||
//9/10 this is only called once per mob and only for 2 hands
|
||||
/datum/hud/proc/build_hand_slots(ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/proc/build_hand_slots()
|
||||
for(var/h in hand_slots)
|
||||
var/obj/screen/inventory/hand/H = hand_slots[h]
|
||||
if(H)
|
||||
|
||||
@@ -82,10 +82,10 @@
|
||||
|
||||
/mob/living/carbon/human/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/human(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/human(src)
|
||||
|
||||
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/human/New(mob/living/carbon/human/owner)
|
||||
..()
|
||||
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
inv_box.screen_loc = ui_oclothing
|
||||
toggleable_inventory += inv_box
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
build_hand_slots()
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner, ui_style = 'icons/mob/screen_midnight.dmi')
|
||||
/datum/hud/monkey/New(mob/living/carbon/monkey/owner)
|
||||
..()
|
||||
var/obj/screen/using
|
||||
var/obj/screen/inventory/inv_box
|
||||
@@ -24,7 +24,7 @@
|
||||
using.screen_loc = ui_drop_throw
|
||||
static_inventory += using
|
||||
|
||||
build_hand_slots(ui_style)
|
||||
build_hand_slots()
|
||||
|
||||
using = new /obj/screen/swap_hand()
|
||||
using.icon = ui_style
|
||||
@@ -152,4 +152,4 @@
|
||||
|
||||
/mob/living/carbon/monkey/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud/monkey(src, ui_style2icon(client.prefs.UI_style))
|
||||
hud_used = new /datum/hud/monkey(src)
|
||||
|
||||
@@ -89,9 +89,9 @@
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/datum/hud/robot
|
||||
ui_style_icon = 'icons/mob/screen_cyborg.dmi'
|
||||
ui_style = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
/datum/hud/robot/New(mob/owner, ui_style = 'icons/mob/screen_cyborg.dmi')
|
||||
/datum/hud/robot/New(mob/owner)
|
||||
..()
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
@@ -17,17 +17,18 @@
|
||||
|
||||
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
SendSignal(COMSIG_ITEM_ATTACK_SELF, user)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
|
||||
if(SendSignal(COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
|
||||
return FALSE
|
||||
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
|
||||
|
||||
// No comment
|
||||
/atom/proc/attackby(obj/item/W, mob/user, params)
|
||||
if(SendSignal(COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK)
|
||||
if(SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params) & COMPONENT_NO_AFTERATTACK)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -52,8 +53,8 @@
|
||||
|
||||
|
||||
/obj/item/proc/attack(mob/living/M, mob/living/user)
|
||||
SendSignal(COMSIG_ITEM_ATTACK, M, user)
|
||||
if(flags_1 & NOBLUDGEON_1)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user)
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
@@ -82,9 +83,9 @@
|
||||
|
||||
//the equivalent of the standard version of attack() but for object targets.
|
||||
/obj/item/proc/attack_obj(obj/O, mob/living/user)
|
||||
if(SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_OBJ, O, user) & COMPONENT_NO_ATTACK_OBJ)
|
||||
return
|
||||
if(flags_1 & NOBLUDGEON_1)
|
||||
if(item_flags & NOBLUDGEON)
|
||||
return
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>") // CIT CHANGE - ditto
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
|
||||
/atom/proc/attack_ghost(mob/dead/observer/user)
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
if(user.client)
|
||||
if(IsAdminGhost(user))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(override)
|
||||
return
|
||||
|
||||
SendSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A)
|
||||
A.attack_hand(src)
|
||||
|
||||
//Return TRUE to cancel other attack hand effects that respect it.
|
||||
@@ -33,7 +33,7 @@
|
||||
. = FALSE
|
||||
if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND))
|
||||
add_fingerprint(user)
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
. = TRUE
|
||||
if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
|
||||
. = _try_interact(user)
|
||||
@@ -111,7 +111,7 @@
|
||||
A.attack_paw(src)
|
||||
|
||||
/atom/proc/attack_paw(mob/user)
|
||||
if(SendSignal(COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_PAW, user) & COMPONENT_NO_ATTACK_HAND)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
desc = "Magic"
|
||||
icon = 'icons/obj/magic.dmi'//Needs sprites
|
||||
icon_state = "2"
|
||||
flags_1 = NOBLUDGEON_1 | ABSTRACT_1 | DROPDEL_1
|
||||
item_flags = NOBLUDGEON | ABSTRACT | DROPDEL
|
||||
//item_state = null
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
layer = ABOVE_HUD_LAYER
|
||||
|
||||
Reference in New Issue
Block a user