Skip to content

Commit

Permalink
Claymores & Mine Tweaks (shiptest-ss13#2988)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

TODO:

- [x] Actually implement claymores (should we let players have
them?)(Cargo?)

- [x] Remove weird sprite shim I made when world icons are merged, add
world icons to mines

- [x] Sprites (this time we actually need them since the placeholder
ones are tgmc & I didn't ask for permission)

Adds Mines that explode when an object passes in front of them & fire an
ammo casing in that direction.
Adds claymores as an implemented example of this- short range, shreds
people at point blank.
Adds World Icons to normal Mines

I had to do some tweaking behind the scenes to implement mobless casing
firing- but I'm pleased to say that fire_casing() can now deal
emotionally with being handed a null user.

Also minorly tweaks explosion devastation, so heavy explosions can only
strip tiles that have already been damaged
You can still immediately strip tiles with devastating explosions
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
FRONT TOWARDS ENEMY
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
add: Directional Mines, implemented as Claymores.
add: Mines now have World Icons
balance: explosions now only strip to space when a tile is already
damaged
fix: Prox mines explode from slightly further away & no longer activate
through walls.
fix: Multiple mines can no longer be stacked on a tile
code: fire_casing() can now be called by non-mobs, allowing objects to
shoot casings.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Sun-Soaked authored and MrCat15352 committed Dec 27, 2024
1 parent d1198f2 commit 5c70528
Show file tree
Hide file tree
Showing 9 changed files with 292 additions and 49 deletions.
13 changes: 10 additions & 3 deletions code/datums/components/pellet_cloud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@


/datum/component/pellet_cloud/proc/create_casing_pellets(obj/item/ammo_casing/shell, atom/target, mob/living/user, fired_from, randomspread, spread, zone_override, params, distro)
shooter = user
if(user)
shooter = user
else
shooter = fired_from
var/targloc = get_turf(target)
if(!zone_override)
zone_override = shooter.zone_selected
Expand All @@ -106,8 +109,12 @@
RegisterSignal(shell.BB, COMSIG_PROJECTILE_SELF_ON_HIT, PROC_REF(pellet_hit))
RegisterSignal(shell.BB, list(COMSIG_PROJECTILE_RANGE_OUT, COMSIG_PARENT_QDELETING), PROC_REF(pellet_range))
pellets += shell.BB
if(!shell.throw_proj(target, targloc, shooter, params, spread))
return
if(user)
if(!shell.throw_proj(target, targloc, shooter, params, spread))
return
else
if(!shell.throw_proj(target, targloc, null, params, spread, shooter))
return
if(i != num_pellets)
shell.newshot()

Expand Down
Loading

0 comments on commit 5c70528

Please sign in to comment.