STICK EM UP

This commit is contained in:
SomeguyManperson
2019-11-10 08:54:51 -05:00
parent ffa77b16c7
commit d2ce654f60
8 changed files with 52 additions and 0 deletions

View File

@@ -150,7 +150,9 @@
#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): () #define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): ()
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of #define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user) #define COMSIG_MOB_ITEM_ATTACK "mob_item_attack" //from base of /obj/item/attack(): (mob/M, mob/user)
#define COMSIG_MOB_APPLY_DAMAGE "mob_apply_damage" //from base of /mob/living/proc/apply_damage(): (damage, damagetype, def_zone)
#define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters) #define COMSIG_MOB_ITEM_AFTERATTACK "mob_item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_MOB_ITEM_SHOOTED "mob_item_shooted" //from base of obj/item/gun/afterattack() : (atom/target, mob/living/user, flag, params)
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params) #define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params)
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target) #define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
#define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/target) #define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/target)

View File

@@ -128,6 +128,10 @@
#define NECK (1<<11) #define NECK (1<<11)
#define FULL_BODY (~0) #define FULL_BODY (~0)
//defines for the index of hands
#define LEFT_HANDS 1
#define RIGHT_HANDS 2
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird //flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
#define NO_FEMALE_UNIFORM 0 #define NO_FEMALE_UNIFORM 0
#define FEMALE_UNIFORM_FULL 1 #define FEMALE_UNIFORM_FULL 1

View File

@@ -123,6 +123,12 @@
#define STATUS_EFFECT_BOUNTY /datum/status_effect/bounty //rewards the person who added this to the target with refreshed spells and a fair heal #define STATUS_EFFECT_BOUNTY /datum/status_effect/bounty //rewards the person who added this to the target with refreshed spells and a fair heal
#define STATUS_EFFECT_HELDUP /datum/status_effect/heldup // someone is currently pointing a gun at you
#define STATUS_EFFECT_HOLDUP /datum/status_effect/holdup // you are currently pointing a gun at someone
#define STATUS_EFFECT_NOTSCARED /datum/status_effect/notscared // you have had a gun pointed at you and are not startled about this fact for a minute
#define STATUS_EFFECT_TAGALONG /datum/status_effect/tagalong //allows darkspawn to accompany people's shadows //Yogs #define STATUS_EFFECT_TAGALONG /datum/status_effect/tagalong //allows darkspawn to accompany people's shadows //Yogs
///////////// /////////////

View File

@@ -197,3 +197,33 @@
desc = replacetext(desc, "TARGET_NAME", tagalong.shadowing.real_name) desc = replacetext(desc, "TARGET_NAME", tagalong.shadowing.real_name)
..() ..()
desc = initial(desc) //yogs end desc = initial(desc) //yogs end
// heldup is for the person being aimed at
/datum/status_effect/heldup
id = "heldup"
duration = -1
status_type = STATUS_EFFECT_MULTIPLE
alert_type = /obj/screen/alert/status_effect/heldup
/obj/screen/alert/status_effect/heldup
name = "Held Up"
desc = "Making any sudden moves would probably be a bad idea!"
icon_state = "aimed"
// holdup is for the person aiming
/datum/status_effect/holdup
id = "holdup"
duration = -1
status_type = STATUS_EFFECT_UNIQUE
alert_type = /obj/screen/alert/status_effect/holdup
/obj/screen/alert/status_effect/holdup
name = "Holding Up"
desc = "You're currently pointing a gun at someone."
icon_state = "aimed"
/datum/status_effect/notscared
id = "notscared"
duration = 600
status_type = STATUS_EFFECT_UNIQUE
alert_type = null

View File

@@ -1,6 +1,7 @@
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE) /mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100 var/hit_percent = (100-blocked)/100
if(!damage || hit_percent <= 0) if(!damage || hit_percent <= 0)
return 0 return 0

View File

@@ -1429,6 +1429,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return TRUE return TRUE
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H) /datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H)
SEND_SIGNAL(H, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone)
var/hit_percent = (100-(blocked+armor))/100 var/hit_percent = (100-(blocked+armor))/100
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100 hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
if(!damage || hit_percent <= 0) if(!damage || hit_percent <= 0)

View File

@@ -9,6 +9,7 @@
standard 0 if fail standard 0 if fail
*/ */
/mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE) /mob/living/proc/apply_damage(damage = 0,damagetype = BRUTE, def_zone = null, blocked = FALSE)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100 var/hit_percent = (100-blocked)/100
if(!damage || (hit_percent <= 0)) if(!damage || (hit_percent <= 0))
return 0 return 0

View File

@@ -184,6 +184,12 @@
return return
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected) if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
return return
if(ismob(target) && user.a_intent == INTENT_GRAB)
for(var/datum/component/gunpoint/G in user.GetComponents(/datum/component/gunpoint))
if(G && G.weapon == src) //spam check
return
user.AddComponent(/datum/component/gunpoint, target, src)
return
if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can. if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can.
var/mob/living/L = user var/mob/living/L = user
@@ -226,6 +232,7 @@
loop_counter++ loop_counter++
addtimer(CALLBACK(G, /obj/item/gun.proc/process_fire, target, user, TRUE, params, null, bonus_spread), loop_counter) addtimer(CALLBACK(G, /obj/item/gun.proc/process_fire, target, user, TRUE, params, null, bonus_spread), loop_counter)
SEND_SIGNAL(user, COMSIG_MOB_ITEM_SHOOTED)
process_fire(target, user, TRUE, params, null, bonus_spread) process_fire(target, user, TRUE, params, null, bonus_spread)