mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Merge pull request #8257 from phil235/ReflectFix
Simplifies laser reflection code
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/allowed = null //suit storage stuff.
|
||||
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
|
||||
var/reflect_chance = 0 //This var dictates what % of a time an object will reflect an energy based weapon's shot
|
||||
var/strip_delay = 40
|
||||
var/put_on_delay = 20
|
||||
var/m_amt = 0 // metal
|
||||
@@ -315,8 +314,7 @@
|
||||
return 0
|
||||
|
||||
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
|
||||
if(prob(reflect_chance))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
w_class = 4
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
|
||||
user << "<span class='notice'>[src] is now active.</span>"
|
||||
reflect_chance = 40
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
@@ -78,7 +77,6 @@
|
||||
w_class = 1
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
user << "<span class='notice'>[src] can now be concealed.</span>"
|
||||
reflect_chance = 0
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/shield/riot/tele
|
||||
|
||||
@@ -192,7 +192,6 @@ obj/item/weapon/twohanded/
|
||||
item_color = "green"
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/hacked = 0
|
||||
reflect_chance = 0
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/New()
|
||||
item_color = pick("red", "blue", "green", "purple")
|
||||
@@ -234,7 +233,7 @@ obj/item/weapon/twohanded/
|
||||
user << "<span class='warning'>You cant pick up such dangerous item with your meaty hands without losing fingers, better not to.</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflect_chance var for balance issues and switches hitsounds.
|
||||
/obj/item/weapon/twohanded/dualsaber/wield(mob/living/carbon/M) //Specific wield () hulk checks due to reflection chance for balance issues and switches hitsounds.
|
||||
if(istype(M))
|
||||
if(M.dna.check_mutation(HULK))
|
||||
M << "<span class='warning'>You lack the grace to wield this.</span>"
|
||||
|
||||
Reference in New Issue
Block a user