Merge remote-tracking branch 'Citadel-Station-13/master' into Garlic

This commit is contained in:
Artur
2020-03-31 19:42:35 +03:00
605 changed files with 4990 additions and 5304 deletions
+2 -2
View File
@@ -152,10 +152,10 @@
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
UnarmedAttack(A,1)
UnarmedAttack(A, 1)
else
if(W)
W.afterattack(A,src,0,params)
W.ranged_attack_chain(src, A, params)
else
RangedAttack(A,params)
+11
View File
@@ -163,3 +163,14 @@
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
//UI position overrides for 1:1 screen layout. (default is 7:5)
#define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button
#define ui_overridden_resist "EAST-3:24,SOUTH+1:7"
#define ui_combat_toggle "EAST-4:22,SOUTH:5"
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
#define ui_boxarea "EAST-4:6,SOUTH+1:6"
#define ui_boxlang "EAST-5:22,SOUTH+1:6"
#define ui_boxvore "EAST-5:22,SOUTH+1:6"
+51
View File
@@ -16,6 +16,7 @@
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob)
///Things rendered on "openspace"; holes in multi-z
/obj/screen/plane_master/openspace
name = "open space plane master"
plane = FLOOR_OPENSPACE_PLANE
@@ -38,12 +39,14 @@
/obj/screen/plane_master/proc/clear_filters()
filters = list()
///Contains just the floor
/obj/screen/plane_master/floor
name = "floor plane master"
plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
///Contains most things in the game world
/obj/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
@@ -57,12 +60,60 @@
remove_filter("ambient_occlusion")
update_filters()
///Contains all lighting objects
/obj/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/Initialize()
. = ..()
filters += filter(type="alpha", render_source=EMISSIVE_RENDER_TARGET, flags=MASK_INVERSE)
filters += filter(type="alpha", render_source=EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this mask the lighting plane. Doesn't render directly.
*
* Gets masked by blocking plane. Use for things that you want blocked by
* mobs, items, etc.
*/
/obj/screen/plane_master/emissive
name = "emissive plane master"
plane = EMISSIVE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_RENDER_TARGET
/obj/screen/plane_master/emissive/Initialize()
. = ..()
filters += filter(type="alpha", render_source=EMISSIVE_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this always mask the lighting plane. Doesn't render directly.
*
* Always masks the light plane, isn't blocked by anything. Use for on mob glows,
* magic stuff, etc.
*/
/obj/screen/plane_master/emissive_unblockable
name = "unblockable emissive plane master"
plane = EMISSIVE_UNBLOCKABLE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_UNBLOCKABLE_RENDER_TARGET
/**
* Things placed on this layer mask the emissive layer. Doesn't render directly
*
* You really shouldn't be directly using this, use atom helpers instead
*/
/obj/screen/plane_master/emissive_unblockable
name = "emissive mob plane master"
plane = EMISSIVE_BLOCKER_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
///Contains space parallax
/obj/screen/plane_master/parallax
name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX
+44 -4
View File
@@ -8,12 +8,15 @@
*afterattack. The return value does not matter.
*/
/obj/item/proc/melee_attack_chain(mob/user, atom/target, params)
if(item_flags & NO_ATTACK_CHAIN_SOFT_STAMCRIT)
if(isliving(user))
var/mob/living/L = user
if(isliving(user))
var/mob/living/L = user
if(item_flags & NO_ATTACK_CHAIN_SOFT_STAMCRIT)
if(IS_STAMCRIT(L))
to_chat(L, "<span class='warning'>You are too exhausted to swing [src]!</span>")
return
if(!CHECK_MOBILITY(L, MOBILITY_USE))
to_chat(L, "<span class='warning'>You are unable to swing [src] right now!</span>")
return
if(tool_behaviour && target.tool_act(user, src, tool_behaviour))
return
if(pre_attack(target, user, params))
@@ -24,6 +27,15 @@
return
afterattack(target, user, TRUE, params)
/// Like melee_attack_chain but for ranged.
/obj/item/proc/ranged_attack_chain(mob/user, atom/target, params)
if(isliving(user))
var/mob/living/L = user
if(!CHECK_MOBILITY(L, MOBILITY_USE))
to_chat(L, "<span class='warning'>You are unable to raise [src] right now!</span>")
return
afterattack(target, user, FALSE, params)
// 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)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
@@ -50,7 +62,6 @@
user.changeNext_move(CLICK_CD_MELEE)
return I.attack(src, user)
/obj/item/proc/attack(mob/living/M, mob/living/user)
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK, M, user) & COMPONENT_ITEM_NO_ATTACK)
return
@@ -117,6 +128,7 @@
if(user != src && check_shields(I, totitemdamage, "the [I.name]", MELEE_ATTACK, I.armour_penetration))
return FALSE
send_item_attack_message(I, user)
I.do_stagger_action(src, user)
if(I.force)
apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage
if(I.damtype == BRUTE)
@@ -166,5 +178,33 @@
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
return 1
/// How much stamina this takes to swing this is not for realism purposes hecc off.
/obj/item/proc/getweight()
return total_mass || w_class * 1.25
/// How long this staggers for. 0 and negatives supported.
/obj/item/proc/melee_stagger_duration()
if(!isnull(stagger_force))
return stagger_force
/// totally not an untested, arbitrary equation.
return clamp((1.5 + (w_class/7.5)) * (force / 2), 0, 10 SECONDS)
/obj/item/proc/do_stagger_action(mob/living/target, mob/living/user)
if(!CHECK_BITFIELD(target.status_flags, CANSTAGGER))
return FALSE
if(target.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
target.do_staggered_animation()
var/duration = melee_stagger_duration()
if(!duration) //0
return FALSE
else if(duration > 0)
target.Stagger(duration)
else //negative
target.AdjustStaggered(duration)
return TRUE
/mob/proc/do_staggered_animation()
set waitfor = FALSE
animate(src, pixel_x = -2, pixel_y = -2, time = 1, flags = ANIMATION_RELATIVE | ANIMATION_PARALLEL)
animate(pixel_x = 4, pixel_y = 4, time = 1, flags = ANIMATION_RELATIVE)
animate(pixel_x = -2, pixel_y = -2, time = 0.5, flags = ANIMATION_RELATIVE)