Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-03-03 03:08:41 -07:00
485 changed files with 2456 additions and 2614 deletions
+22 -3
View File
@@ -72,6 +72,22 @@
var/hide_icon = 'icons/mob/actions.dmi'
var/hide_state = "hide"
var/show_state = "show"
var/mutable_appearance/hide_appearance
var/mutable_appearance/show_appearance
/obj/screen/movable/action_button/hide_toggle/Initialize()
. = ..()
var/static/list/icon_cache = list()
var/cache_key = "[hide_icon][hide_state]"
hide_appearance = icon_cache[cache_key]
if(!hide_appearance)
hide_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, hide_state)
cache_key = "[hide_icon][show_state]"
show_appearance = icon_cache[cache_key]
if(!show_appearance)
show_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, show_state)
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
if (!can_use(usr))
@@ -137,9 +153,12 @@
show_state = settings["toggle_show"]
update_icon()
/obj/screen/movable/action_button/hide_toggle/update_icon()
cut_overlays()
add_overlay(mutable_appearance(hide_icon, hidden ? show_state : hide_state))
/obj/screen/movable/action_button/hide_toggle/update_overlays()
. = ..()
if(hidden)
. += show_appearance
else
. += hide_appearance
/obj/screen/movable/action_button/MouseEntered(location,control,params)
+4 -6
View File
@@ -166,29 +166,27 @@
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
var/held_index = 0
/obj/screen/inventory/hand/update_icon()
/obj/screen/inventory/hand/update_overlays()
. = ..()
if(!handcuff_overlay)
var/state = (!(held_index % 2)) ? "markus" : "gabrielle"
handcuff_overlay = mutable_appearance('icons/mob/screen_gen.dmi', state)
cut_overlay(list(handcuff_overlay, blocked_overlay, "hand_active"))
if(!hud?.mymob)
return
if(iscarbon(hud.mymob))
var/mob/living/carbon/C = hud.mymob
if(C.handcuffed)
add_overlay(handcuff_overlay)
. += handcuff_overlay
if(held_index)
if(!C.has_hand_for_held_index(held_index))
add_overlay(blocked_overlay)
. += blocked_overlay
if(held_index == hud.mymob.active_hand_index)
add_overlay("hand_active")
. += "hand_active"
/obj/screen/inventory/hand/Click(location, control, params)
+12 -12
View File
@@ -76,8 +76,8 @@
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
var/atom/movable/focus = null
var/mob/living/carbon/tk_user = null
var/atom/movable/focus
var/mob/living/carbon/tk_user
/obj/item/tk_grab/Initialize()
. = ..()
@@ -85,6 +85,8 @@
/obj/item/tk_grab/Destroy()
STOP_PROCESSING(SSfastprocess, src)
focus = null
tk_user = null
return ..()
/obj/item/tk_grab/process()
@@ -179,16 +181,14 @@
return
new /obj/effect/temp_visual/telekinesis(get_turf(focus))
/obj/item/tk_grab/update_icon()
cut_overlays()
if(focus)
var/old_layer = focus.layer
var/old_plane = focus.plane
focus.layer = layer+0.01
focus.plane = ABOVE_HUD_PLANE
add_overlay(focus) //this is kind of ick, but it's better than using icon()
focus.layer = old_layer
focus.plane = old_plane
/obj/item/tk_grab/update_overlays()
. = ..()
if(!focus)
return
var/mutable_appearance/focus_overlay = new(focus)
focus_overlay.layer = layer + 0.01
focus_overlay.plane = ABOVE_HUD_PLANE
. += focus_overlay
/obj/item/tk_grab/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")