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

This commit is contained in:
kevinz000
2020-05-27 18:11:15 -07:00
149 changed files with 3488 additions and 1036 deletions
+2 -24
View File
@@ -24,16 +24,6 @@
return
/client
var/list/atom/selected_target[2]
var/obj/item/active_mousedown_item = null
var/mouseParams = ""
var/mouseLocation = null
var/mouseObject = null
var/mouseControlObject = null
var/middragtime = 0
var/atom/middragatom
/client/MouseDown(object, location, control, params)
if (mouse_down_icon)
mouse_pointer_icon = mouse_down_icon
@@ -84,12 +74,6 @@
/obj/item/proc/onMouseUp(object, location, params, mob)
return
/obj/item
var/canMouseDown = FALSE
/obj/item/gun
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
/obj/item/gun/CanItemAutoclick(object, location, params)
. = automatic
@@ -108,16 +92,10 @@
mouseLocation = location
mouseObject = object
mouseControlObject = control
if(mob && LAZYLEN(mob.mousemove_intercept_objects))
for(var/datum/D in mob.mousemove_intercept_objects)
D.onMouseMove(object, location, control, params)
if(!show_popup_menus && mob) //CIT CHANGE - passes onmousemove() to mobs
mob.onMouseMove(object, location, control, params) //CIT CHANGE - ditto
if(mob)
SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_MOUSEMOVE, object, location, control, params)
..()
/datum/proc/onMouseMove(object, location, control, params)
return
/client/MouseDrag(src_object,atom/over_object,src_location,over_location,src_control,over_control,params)
var/list/L = params2list(params)
if (L["middle"])
-3
View File
@@ -642,9 +642,6 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen |= alert
return 1
/mob
var/list/alerts = list() // contains /obj/screen/alert only // On /mob so clientless mobs will throw alerts properly
/obj/screen/alert/Click(location, control, params)
if(!usr || !usr.client)
return
-4
View File
@@ -1,7 +1,3 @@
/mob
var/list/screens = list()
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
-2
View File
@@ -114,8 +114,6 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
return ..()
/mob
var/hud_type = /datum/hud
/mob/proc/create_mob_hud()
if(!client || hud_used)
-7
View File
@@ -246,13 +246,6 @@
using.screen_loc = ui_pull_resist
using.hud = src
static_inventory += using
//CIT CHANGES - combat mode buttons
using = new /obj/screen/combattoggle()
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_combat_toggle
using.hud = src
static_inventory += using
//END OF CIT CHANGES
using = new /obj/screen/human/toggle()
-12
View File
@@ -1,16 +1,4 @@
/client
var/list/parallax_layers
var/list/parallax_layers_cached
var/atom/movable/movingmob
var/turf/previous_turf
var/dont_animate_parallax //world.time of when we can state animate()ing parallax again
var/last_parallax_shift //world.time of last update
var/parallax_throttle = 0 //ds between updates
var/parallax_movedir = 0
var/parallax_layers_max = 3
var/parallax_animate_timer
/datum/hud/proc/create_parallax(mob/viewmob)
var/mob/screenmob = viewmob || mymob
var/client/C = screenmob.client
+5 -7
View File
@@ -113,7 +113,7 @@
/obj/attacked_by(obj/item/I, mob/living/user)
var/totitemdamage = I.force
var/bad_trait
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && iscarbon(user))
if(!SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
totitemdamage *= 0.5
bad_trait = SKILL_COMBAT_MODE //blacklist combat skills.
if(I.used_skills && user.mind)
@@ -157,9 +157,11 @@
/mob/living/proc/pre_attacked_by(obj/item/I, mob/living/user)
. = I.force
var/bad_trait
if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && iscarbon(user))
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
. *= 0.5
bad_trait = SKILL_COMBAT_MODE //blacklist combat skills.
if(SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
. *= 1.5
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
. *= 0.5
if(!user.mind || !I.used_skills)
@@ -171,10 +173,6 @@
continue
user.mind.auto_gain_experience(skill, I.skill_gain)
/mob/living/carbon/pre_attacked_by(obj/item/I, mob/living/user)
. = ..()
if(!(combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
. *= 1.5
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
// Click parameters is the params string from byond Click() code, see that documentation.
@@ -214,7 +212,7 @@
if(!user)
return
var/bad_trait
if(iscarbon(user) && !(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE))
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
. *= STAM_COST_NO_COMBAT_MULT
bad_trait = SKILL_COMBAT_MODE
if(used_skills && user.mind)