mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Compiles, and guns work™
This commit is contained in:
@@ -1982,4 +1982,21 @@
|
||||
. |= A.GetAccess()
|
||||
|
||||
/mob/living/carbon/human/is_mechanical()
|
||||
return ..() || (species.flags & ALL_RPARTS) != 0
|
||||
return ..() || (species.flags & ALL_RPARTS) != 0
|
||||
|
||||
/mob/living/carbon/human/can_use_guns(var/obj/item/weapon/gun/G)
|
||||
. = ..()
|
||||
|
||||
if(G.trigger_guard == TRIGGER_GUARD_NORMAL)
|
||||
if(HULK in mutations)
|
||||
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
|
||||
return 0
|
||||
if(species.flags & NOGUNS)
|
||||
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
|
||||
return 0
|
||||
|
||||
if(martial_art && martial_art.name == "The Sleeping Carp") //great dishonor to famiry
|
||||
to_chat(src, "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>")
|
||||
return 0
|
||||
|
||||
return .
|
||||
|
||||
@@ -46,7 +46,10 @@ emp_act
|
||||
if((P.embed && prob(20 + max(P.damage - armor, -10))))
|
||||
var/obj/item/weapon/shard/shrapnel/SP = new()
|
||||
(SP.name) = "[P.name] shrapnel"
|
||||
(SP.desc) = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
||||
if(P.ammo_casing && P.ammo_casing.caliber)
|
||||
(SP.desc) = "[SP.desc] It looks like it is a [P.ammo_casing.caliber] caliber round."
|
||||
else
|
||||
(SP.desc) = "[SP.desc] The round's caliber is unidentifiable."
|
||||
(SP.loc) = organ
|
||||
organ.embed(SP)
|
||||
|
||||
|
||||
@@ -693,7 +693,7 @@
|
||||
best = R
|
||||
if(istype(R, /obj/item/weapon/gun))
|
||||
var/obj/item/weapon/gun/G = R
|
||||
if(G.can_fire())
|
||||
if(G.can_shoot())
|
||||
best = R
|
||||
break // gun with ammo? screw the rest
|
||||
if(best && best != main_hand)
|
||||
@@ -727,22 +727,23 @@
|
||||
if(main_hand.force != 0)
|
||||
if(istype(main_hand,/obj/item/weapon/gun))
|
||||
var/obj/item/weapon/gun/G = main_hand
|
||||
if(G.special_check(src))
|
||||
if(G.can_trigger_gun(src))
|
||||
var/shouldFire = 1
|
||||
if(istype(main_hand, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/P = main_hand
|
||||
var/stunning = 0
|
||||
if(ispath(text2path(P.projectile_type), /obj/item/projectile/energy/electrode))
|
||||
stunning = 1
|
||||
for(var/A in P.ammo_type)
|
||||
if(ispath(A,/obj/item/ammo_casing/energy/electrode))
|
||||
stunning = 1
|
||||
var/mob/stunCheck = TARGET
|
||||
if(stunning && stunCheck.stunned)
|
||||
shouldFire = 0
|
||||
if(shouldFire)
|
||||
if(!G.process_chambered())
|
||||
G.click_empty(src)
|
||||
if(!G.can_shoot())
|
||||
G.shoot_with_empty_chamber(src)
|
||||
npcDrop(G, 1)
|
||||
else
|
||||
G.Fire(TARGET, src)
|
||||
G.process_fire(TARGET, src)
|
||||
else
|
||||
if(get_dist(src,TARGET) > 6)
|
||||
if(!walk2derpless(TARGET))
|
||||
@@ -871,4 +872,4 @@
|
||||
else
|
||||
A.stamp(S)
|
||||
custom_emote(2, "[pick("gibbers","drools","slobbers","claps wildly","spits")] as they stamp \the [A] with \a [S]!")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -855,3 +855,9 @@
|
||||
tally += 10
|
||||
|
||||
return tally
|
||||
|
||||
/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
|
||||
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
proj_sharp = 0
|
||||
proj_edge = 0
|
||||
|
||||
if(istype(P, /obj/item/projectile/beam/lightning)) //Stupid snowflake lightning gun.
|
||||
if(P.damage >= 200)
|
||||
src.dust()
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, armor)
|
||||
return P.on_hit(src, armor, def_zone)
|
||||
|
||||
@@ -403,7 +403,7 @@ Auto Patrol[]"},
|
||||
shoot_sound = 'sound/weapons/laser.ogg'
|
||||
if(emagged == 2)
|
||||
if(lasercolor)
|
||||
projectile = /obj/item/projectile/lasertag
|
||||
projectile = /obj/item/projectile/beam/lasertag
|
||||
else
|
||||
projectile = /obj/item/projectile/beam
|
||||
else
|
||||
@@ -411,9 +411,9 @@ Auto Patrol[]"},
|
||||
shoot_sound = 'sound/weapons/Taser.ogg'
|
||||
projectile = /obj/item/projectile/energy/electrode
|
||||
else if(lasercolor == "b")
|
||||
projectile = /obj/item/projectile/lasertag/blue
|
||||
projectile = /obj/item/projectile/beam/lasertag/bluetag
|
||||
else if(lasercolor == "r")
|
||||
projectile = /obj/item/projectile/lasertag/red
|
||||
projectile = /obj/item/projectile/beam/lasertag/redtag
|
||||
|
||||
/mob/living/simple_animal/bot/ed209/proc/shootAt(mob/target)
|
||||
if(lastfired && world.time - lastfired < shot_delay)
|
||||
@@ -491,10 +491,10 @@ Auto Patrol[]"},
|
||||
if(!disabled)
|
||||
var/lasertag_check = 0
|
||||
if((lasercolor == "b"))
|
||||
if(istype(Proj, /obj/item/projectile/lasertag/red))
|
||||
if(istype(Proj, /obj/item/projectile/beam/lasertag/redtag))
|
||||
lasertag_check++
|
||||
else if((lasercolor == "r"))
|
||||
if(istype(Proj, /obj/item/projectile/lasertag/blue))
|
||||
if(istype(Proj, /obj/item/projectile/beam/lasertag/bluetag))
|
||||
lasertag_check++
|
||||
if(lasertag_check)
|
||||
icon_state = "[lasercolor]ed2090"
|
||||
|
||||
@@ -65,9 +65,9 @@
|
||||
if ((O.client && !( O.blinded )))
|
||||
to_chat(O, "\red [src] launches a razor-sharp quill at [target]!")
|
||||
|
||||
var/obj/item/weapon/arrow/quill/Q = new(loc)
|
||||
Q.fingerprintslast = src.ckey
|
||||
Q.throw_at(target,10,30)
|
||||
//var/obj/item/weapon/arrow/quill/Q = new(loc)
|
||||
//Q.fingerprintslast = src.ckey
|
||||
//Q.throw_at(target,10,30)
|
||||
quills--
|
||||
|
||||
spawn(100)
|
||||
@@ -155,4 +155,4 @@
|
||||
desc = "A series of metallic lenses and chains."
|
||||
icon = 'icons/obj/clothing/hats.dmi'
|
||||
icon_state = "amp"
|
||||
item_state = "amp"
|
||||
item_state = "amp"
|
||||
|
||||
Reference in New Issue
Block a user