mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
-You can now target non-dense objects with a projectile.
-Added bullet_acts for computers, canisters and windoors. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4953 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -159,6 +159,12 @@
|
|||||||
healthcheck()
|
healthcheck()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(Proj.damage)
|
||||||
|
src.health -= round(Proj.damage / 2)
|
||||||
|
healthcheck()
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj)
|
/obj/machinery/portable_atmospherics/canister/meteorhit(var/obj/O as obj)
|
||||||
src.health = 0
|
src.health = 0
|
||||||
healthcheck()
|
healthcheck()
|
||||||
|
|||||||
@@ -48,6 +48,11 @@
|
|||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|
||||||
|
bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(prob(Proj.damage))
|
||||||
|
set_broken()
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
blob_act()
|
blob_act()
|
||||||
if (prob(75))
|
if (prob(75))
|
||||||
|
|||||||
@@ -134,6 +134,21 @@
|
|||||||
src.operating = 0
|
src.operating = 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/door/window/proc/take_damage(var/damage)
|
||||||
|
src.health = max(0, src.health - damage)
|
||||||
|
if (src.health <= 0)
|
||||||
|
new /obj/item/weapon/shard(src.loc)
|
||||||
|
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||||
|
CC.amount = 2
|
||||||
|
src.density = 0
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/machinery/door/window/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
if(Proj.damage)
|
||||||
|
take_damage(round(Proj.damage / 2))
|
||||||
|
..()
|
||||||
|
|
||||||
//When an object is thrown at the window
|
//When an object is thrown at the window
|
||||||
/obj/machinery/door/window/hitby(AM as mob|obj)
|
/obj/machinery/door/window/hitby(AM as mob|obj)
|
||||||
|
|
||||||
@@ -145,14 +160,7 @@
|
|||||||
else
|
else
|
||||||
tforce = AM:throwforce
|
tforce = AM:throwforce
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||||
src.health = max(0, src.health - tforce)
|
take_damage(tforce)
|
||||||
if (src.health <= 0)
|
|
||||||
new /obj/item/weapon/shard(src.loc)
|
|
||||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
|
||||||
CC.amount = 2
|
|
||||||
src.density = 0
|
|
||||||
del(src)
|
|
||||||
return
|
|
||||||
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
O.emp_act(severity)
|
O.emp_act(severity)
|
||||||
|
|
||||||
|
|
||||||
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this
|
afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)//TODO: go over this
|
||||||
if(flag) return //we're placing gun on a table or in backpack
|
if(flag) return //we're placing gun on a table or in backpack
|
||||||
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
playsound(user, fire_sound, 50, 1)
|
playsound(user, fire_sound, 50, 1)
|
||||||
user.visible_message("\red [user.name] fires the [src.name]!", "\red You fire the [src.name]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
user.visible_message("\red [user.name] fires the [src.name]!", "\red You fire the [src.name]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||||
|
|
||||||
in_chamber.original = targloc
|
in_chamber.original = target
|
||||||
in_chamber.loc = get_turf(user)
|
in_chamber.loc = get_turf(user)
|
||||||
in_chamber.starting = get_turf(user)
|
in_chamber.starting = get_turf(user)
|
||||||
user.next_move = world.time + 4
|
user.next_move = world.time + 4
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
var/yo = null
|
var/yo = null
|
||||||
var/xo = null
|
var/xo = null
|
||||||
var/current = null
|
var/current = null
|
||||||
var/turf/original = null // the original turf clicked
|
var/atom/original = null // the original target clicked
|
||||||
var/turf/starting = null // the projectile's starting turf
|
var/turf/starting = null // the projectile's starting turf
|
||||||
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
||||||
|
|
||||||
@@ -139,10 +139,9 @@
|
|||||||
return
|
return
|
||||||
step_towards(src, current)
|
step_towards(src, current)
|
||||||
sleep(1)
|
sleep(1)
|
||||||
if(!bumped)
|
if(!bumped && !isturf(original))
|
||||||
if(loc == original)
|
if(loc == get_turf(original))
|
||||||
for(var/mob/living/M in original)
|
if(!(original in permutated))
|
||||||
if(!(M in permutated))
|
Bump(original)
|
||||||
Bump(M)
|
sleep(1)
|
||||||
sleep(1)
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
|||||||
<li class="tweak">Making eggs is a little more expensive but secreting resin is cheaper. (Both cost 75 now)</li>
|
<li class="tweak">Making eggs is a little more expensive but secreting resin is cheaper. (Both cost 75 now)</li>
|
||||||
<li class="tweak">Aliens no longer have a random duration of stunning humans, it's a constant value now of the lower based value.</li>
|
<li class="tweak">Aliens no longer have a random duration of stunning humans, it's a constant value now of the lower based value.</li>
|
||||||
<li class="tweak">Acid is less random and will be more reliable. Don't bother aciding stuff more than once, as it will waste plasma.</li>
|
<li class="tweak">Acid is less random and will be more reliable. Don't bother aciding stuff more than once, as it will waste plasma.</li>
|
||||||
|
<li class="rscadd">You can now target non-dense items (such as facehuggers) with a gun.</li>
|
||||||
|
<li class="rscadd">You can now shoot canisters, computers and windoors to break them.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user