Merge remote-tracking branch 'upstream/master' into multivis

# Conflicts:
#	.travis.yml
#	_maps/map_files/MetaStation/z2.dmm
#	_maps/map_files/cyberiad/z2.dmm
#	code/game/atoms_movable.dm
#	code/game/machinery/camera/camera.dm
#	code/modules/mob/living/silicon/ai/ai.dm
#	code/modules/mob/living/silicon/ai/freelook/eye.dm
This commit is contained in:
tigercat2000
2018-10-23 17:41:41 -07:00
1545 changed files with 62445 additions and 38543 deletions
+2 -4
View File
@@ -11,7 +11,8 @@
*/
/mob/living/silicon/ai/DblClickOn(var/atom/A, params)
if(client.click_intercept)
client.click_intercept.InterceptClickOn(src, params, A)
// Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc.
// But we return here since we don't want to do regular dblclick handling
return
if(control_disabled || stat) return
@@ -176,9 +177,6 @@
return
/atom/proc/AICtrlClick(var/mob/living/silicon/ai/user)
if(user.holo)
var/obj/machinery/hologram/holopad/H = user.holo
H.face_atom(src)
return
/obj/machinery/door/airlock/AICtrlClick() // Bolts doors
+3 -1
View File
@@ -236,6 +236,8 @@
Makes the mob face the direction of the clicked thing
*/
/mob/proc/MiddleShiftClickOn(atom/A)
if(incapacitated())
return
var/face_dir = get_cardinal_dir(src, A)
if(forced_look == face_dir)
forced_look = null
@@ -392,7 +394,7 @@
icon = 'icons/mob/screen_full.dmi'
icon_state = "passage0"
plane = CLICKCATCHER_PLANE
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER-7,CENTER-7"
/obj/screen/click_catcher/Click(location, control, params)
+5
View File
@@ -163,3 +163,8 @@
//1 = standard hud
//2 = reduced hud (just hands and intent switcher)
//3 = no hud (for screenshots)
#define HUD_LAYER_SCREEN 20
#define HUD_LAYER_BUILDMODE 30
+1 -1
View File
@@ -89,7 +89,7 @@
icon_state = "default"
name = "Alert"
desc = "Something seems to have gone wrong with this alert, so report this bug please"
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
var/severity = 0
var/alerttooltipstyle = ""
+3 -9
View File
@@ -1,8 +1,3 @@
#define FULLSCREEN_LAYER 18
#define DAMAGE_LAYER FULLSCREEN_LAYER + 0.1
#define BLIND_LAYER DAMAGE_LAYER + 0.1
#define CRIT_LAYER BLIND_LAYER + 0.1
/mob
var/list/screens = list()
@@ -59,7 +54,7 @@
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/severity = 0
/obj/screen/fullscreen/Destroy()
@@ -68,11 +63,11 @@
/obj/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = DAMAGE_LAYER
layer = UI_DAMAGE_LAYER
/obj/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = DAMAGE_LAYER
layer = UI_DAMAGE_LAYER
/obj/screen/fullscreen/crit
icon_state = "passage"
@@ -107,5 +102,4 @@
#undef FULLSCREEN_LAYER
#undef BLIND_LAYER
#undef DAMAGE_LAYER
#undef CRIT_LAYER
+12
View File
@@ -1,3 +1,15 @@
/mob/living/simple_animal/create_mob_hud()
hud_used = new /datum/hud/simple_animal(src)
/datum/hud/simple_animal/New(mob/user)
..()
var/obj/screen/using
using = new /obj/screen/act_intent/simple_animal()
using.icon_state = mymob.a_intent
static_inventory += using
action_intent = using
/mob/living/simple_animal/pet/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/corgi(src)
+108 -31
View File
@@ -9,7 +9,7 @@
/obj/screen
name = ""
icon = 'icons/mob/screen_gen.dmi'
layer = 20
layer = HUD_LAYER_SCREEN
plane = HUD_PLANE
unacidable = 1
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
@@ -29,7 +29,7 @@
/obj/screen/text
icon = null
icon_state = null
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = "CENTER-7,CENTER-7"
maptext_height = 480
maptext_width = 480
@@ -74,17 +74,14 @@
if(ishuman(usr))
var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"])
if(_x<=16 && _y<=16)
usr.a_intent_change(INTENT_HARM)
else if(_x<=16 && _y>=17)
usr.a_intent_change(INTENT_HELP)
else if(_x>=17 && _y<=16)
usr.a_intent_change(INTENT_GRAB)
else if(_x>=17 && _y>=17)
usr.a_intent_change(INTENT_DISARM)
else
usr.a_intent_change("right")
@@ -100,6 +97,11 @@
name = "run/walk toggle"
icon_state = "running"
/obj/screen/act_intent/simple_animal
icon = 'icons/mob/screen_simplemob.dmi'
screen_loc = ui_acti
/obj/screen/mov_intent/Click()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
@@ -176,66 +178,111 @@
icon_state = "zone_sel"
screen_loc = ui_zonesel
var/selecting = "chest"
var/static/list/hover_overlays_cache = list()
var/hovering
/obj/screen/zone_sel/Click(location, control,params)
if(isobserver(usr))
return
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
var/old_selecting = selecting //We're only going to update_icon() if there's been a change
var/choice = get_zone_at(icon_x, icon_y)
if(!choice)
return 1
return set_selected_zone(choice, usr)
/obj/screen/zone_sel/MouseEntered(location, control, params)
MouseMove(location, control, params)
/obj/screen/zone_sel/MouseMove(location, control, params)
if(isobserver(usr))
return
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
var/choice = get_zone_at(icon_x, icon_y)
if(hovering == choice)
return
cut_overlay(hover_overlays_cache[hovering])
hovering = choice
var/obj/effect/overlay/zone_sel/overlay_object = hover_overlays_cache[choice]
if(!overlay_object)
overlay_object = new
overlay_object.icon_state = "[choice]"
hover_overlays_cache[choice] = overlay_object
add_overlay(overlay_object)
/obj/effect/overlay/zone_sel
icon = 'icons/mob/zone_sel.dmi'
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 128
anchored = TRUE
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
/obj/screen/zone_sel/MouseExited(location, control, params)
if(!isobserver(usr) && hovering)
cut_overlay(hover_overlays_cache[hovering])
hovering = null
/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y)
if(1 to 3) //Feet
switch(icon_x)
if(10 to 15)
selecting = "r_foot"
return "r_foot"
if(17 to 22)
selecting = "l_foot"
else
return 1
return "l_foot"
if(4 to 9) //Legs
switch(icon_x)
if(10 to 15)
selecting = "r_leg"
return "r_leg"
if(17 to 22)
selecting = "l_leg"
else
return 1
return "l_leg"
if(10 to 13) //Hands and groin
switch(icon_x)
if(8 to 11)
selecting = "r_hand"
return "r_hand"
if(12 to 20)
selecting = "groin"
return "groin"
if(21 to 24)
selecting = "l_hand"
else
return 1
return "l_hand"
if(14 to 22) //Chest and arms to shoulders
switch(icon_x)
if(8 to 11)
selecting = "r_arm"
return "r_arm"
if(12 to 20)
selecting = "chest"
return "chest"
if(21 to 24)
selecting = "l_arm"
else
return 1
return "l_arm"
if(23 to 30) //Head, but we need to check for eye or mouth
if(icon_x in 12 to 20)
selecting = "head"
switch(icon_y)
if(23 to 24)
if(icon_x in 15 to 17)
selecting = "mouth"
return "mouth"
if(26) //Eyeline, eyes are on 15 and 17
if(icon_x in 14 to 18)
selecting = "eyes"
return "eyes"
if(25 to 27)
if(icon_x in 15 to 17)
selecting = "eyes"
return "eyes"
return "head"
if(old_selecting != selecting)
update_icon()
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
if(isobserver(user))
return
if(choice != selecting)
selecting = choice
update_icon(usr)
return 1
/obj/screen/zone_sel/update_icon()
@@ -276,8 +323,38 @@
/obj/screen/inventory
var/slot_id //The indentifier for the slot. It has nothing to do with ID cards.
var/list/object_overlays = list()
layer = 19
/obj/screen/inventory/MouseEntered()
..()
add_overlays()
/obj/screen/inventory/MouseExited()
..()
cut_overlay(object_overlays)
object_overlays.Cut()
/obj/screen/inventory/proc/add_overlays()
var/mob/user = hud.mymob
if(hud && user && slot_id)
var/obj/item/holding = user.get_active_hand()
if(!holding || user.get_item_by_slot(slot_id))
return
var/image/item_overlay = image(holding)
item_overlay.alpha = 92
if(!user.can_equip(holding, slot_id, disable_warning = TRUE))
item_overlay.color = "#ff0000"
else
item_overlay.color = "#00ff00"
object_overlays += item_overlay
add_overlay(object_overlays)
/obj/screen/inventory/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
@@ -380,7 +457,7 @@
icon = 'icons/mob/guardian.dmi'
icon_state = "base"
screen_loc = ui_health
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healthdoll
name = "health doll"
+6 -5
View File
@@ -14,10 +14,10 @@
// No comment
/atom/proc/attackby(obj/item/W, mob/user, params)
return SendSignal(COMSIG_PARENT_ATTACKBY, W, user, params)
return SEND_SIGNAL(src, COMSIG_PARENT_ATTACKBY, W, user, params)
/obj/attackby(obj/item/I, mob/living/user, params)
return ..() || I.attack_obj(src, user)
return ..() || (can_be_hit && I.attack_obj(src, user))
/mob/living/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -37,13 +37,13 @@
return 1
if(istype(src,/obj/item/organ/external))
var/obj/item/organ/external/E = src
if(E.robotic == 2) // Robot limbs are less messy to attach
if(E.is_robotic()) // Robot limbs are less messy to attach
if(!attempt_initiate_surgery(src, M, user,1))
return 0
else
return 1
if(isscrewdriver(src) && M.get_species() == "Machine")
if(isscrewdriver(src) && ismachine(M))
if(!attempt_initiate_surgery(src, M, user))
return 0
else
@@ -65,7 +65,8 @@
user.do_attack_animation(M)
M.attacked_by(src, user, def_zone)
add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", admin_notify = (force > 0 && damtype != STAMINA))
add_attack_logs(user, M, "Attacked with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])", (M.ckey && force > 0 && damtype != STAMINA) ? null : ATKLOG_ALMOSTALL)
add_fingerprint(user)
+2 -1
View File
@@ -1,6 +1,7 @@
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
if(client.click_intercept)
client.click_intercept.InterceptClickOn(src, params, A)
// Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc.
// But we return here since we don't want to do regular dblclick handling
return
if(can_reenter_corpse && mind && mind.current)
-24
View File
@@ -191,27 +191,3 @@ var/const/tk_maxrange = 15
overlays.Cut()
if(focus && focus.icon && focus.icon_state)
overlays += icon(focus.icon,focus.icon_state)
/*Not quite done likely needs to use something thats not get_step_to
proc/check_path()
var/turf/ref = get_turf(src.loc)
var/turf/target = get_turf(focus.loc)
if(!ref || !target) return 0
var/distance = get_dist(ref, target)
if(distance >= 10) return 0
for(var/i = 1 to distance)
ref = get_step_to(ref, target, 0)
if(ref != target) return 0
return 1
*/
//equip_to_slot_or_del(obj/item/W, slot, del_on_fail = 1)
/*
if(istype(user, /mob/living/carbon))
if(user:mutations & TK && get_dist(source, user) <= 7)
if(user:get_active_hand()) return 0
var/X = source:x
var/Y = source:y
var/Z = source:z
*/