mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
new attack procs
minor fixes to make it compile cleans up the code
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
if(!iscarbon(user))
|
||||
|
||||
@@ -228,6 +228,3 @@
|
||||
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
|
||||
return
|
||||
|
||||
@@ -215,15 +215,10 @@ emp_act
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
emag_act(user, affecting)
|
||||
|
||||
if(!I.discrete)
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
visible_message("<span class='combat danger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>",
|
||||
"<span class='combat userdanger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>"))
|
||||
else if(I.force)
|
||||
visible_message("<span class='combat danger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>",
|
||||
"<span class='combat userdanger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>"))
|
||||
else
|
||||
return 0
|
||||
send_item_attack_message(I, user, hit_area)
|
||||
|
||||
if(!I.force)
|
||||
return 0 //item force is zero
|
||||
|
||||
var/armor = run_armor_check(affecting, "melee", "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened hit to your [hit_area].</span>", armour_penetration = I.armour_penetration)
|
||||
var/weapon_sharp = is_sharp(I)
|
||||
|
||||
@@ -567,10 +567,7 @@ var/list/robot_verbs_default = list(
|
||||
return 2
|
||||
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(opened) // Are they trying to insert something?
|
||||
for(var/V in components)
|
||||
var/datum/robot_component/C = components[V]
|
||||
@@ -610,6 +607,7 @@ var/list/robot_verbs_default = list(
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!getFireLoss())
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
@@ -744,9 +742,13 @@ var/list/robot_verbs_default = list(
|
||||
to_chat(user, "<span class='danger'>Upgrade error.</span>")
|
||||
|
||||
else
|
||||
spark_system.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/robot/attacked_by(obj/item/I, mob/living/user, def_zone)
|
||||
if(I.force && I.damtype != STAMINA && stat != DEAD) //only sparks if real damage is dealt.
|
||||
spark_system.start()
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/emag_act(user as mob)
|
||||
if(!ishuman(user) && !issilicon(user))
|
||||
return
|
||||
|
||||
@@ -221,8 +221,9 @@
|
||||
update_controls()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
/mob/living/simple_animal/bot/medbot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass))
|
||||
. = 1 //no afterattack
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>You cannot insert a beaker because the panel is locked!</span>")
|
||||
return
|
||||
@@ -236,7 +237,6 @@
|
||||
reagent_glass = W
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
show_controls(user)
|
||||
return
|
||||
|
||||
else
|
||||
var/current_health = health
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
|
||||
/mob/living/simple_animal/attackby(obj/item/O, mob/living/user)
|
||||
if(can_collar && !collar && istype(O, /obj/item/clothing/accessory/petcollar))
|
||||
var/obj/item/clothing/accessory/petcollar/C = O
|
||||
user.drop_item()
|
||||
@@ -396,34 +396,7 @@
|
||||
real_name = C.tagname
|
||||
return
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(attempt_harvest(O, user))
|
||||
return
|
||||
user.do_attack_animation(src)
|
||||
if(istype(O) && istype(user) && !O.attack(src, user))
|
||||
var/damage = 0
|
||||
if(O.force)
|
||||
if(O.force >= force_threshold)
|
||||
damage = O.force
|
||||
if(O.damtype == STAMINA)
|
||||
damage = 0
|
||||
if(O.damtype == BRUTE)
|
||||
if(prob(33))
|
||||
O.add_mob_blood(src)
|
||||
var/turf/location = get_turf(src)
|
||||
add_splatter_floor(location)
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
visible_message("<span class='danger'>[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] [src] with [O]!</span>",\
|
||||
"<span class='userdanger'>[user] has [O.attack_verb.len ? "[pick(O.attack_verb)]": "attacked"] you with [O]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[O] bounces harmlessly off of [src].</span>",\
|
||||
"<span class='userdanger'>[O] bounces harmlessly off of [src].</span>")
|
||||
playsound(loc, O.hitsound, 50, 1, -1)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] gently taps [src] with [O].</span>",\
|
||||
"<span class='warning'>This weapon is ineffective, it does no damage.</span>")
|
||||
adjustBruteLoss(damage)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/movement_delay()
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user