The Supplypod Renaissance Part 3: Admins can add shrapnel to supplypods (#51957)

* test


get code up to speed


finished?


polish


fixes mergies

* tgui
This commit is contained in:
Emmanuel S
2020-07-06 16:23:34 +03:00
committed by GitHub
parent 2d6c10c1ad
commit 6a4c79ac3c
7 changed files with 41 additions and 3 deletions
+4 -2
View File
@@ -47,7 +47,7 @@
var/mob/living/shooter
/datum/component/pellet_cloud/Initialize(projectile_type=/obj/item/shrapnel, magnitude=5)
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent))
if(!isammocasing(parent) && !isgrenade(parent) && !islandmine(parent) && !issupplypod(parent))
return COMPONENT_INCOMPATIBLE
if(magnitude < 1)
@@ -58,7 +58,7 @@
if(isammocasing(parent))
num_pellets = magnitude
else if(isgrenade(parent) || islandmine(parent))
else if(isgrenade(parent) || islandmine(parent) || issupplypod(parent))
radius = magnitude
/datum/component/pellet_cloud/Destroy(force, silent)
@@ -77,6 +77,8 @@
RegisterSignal(parent, COMSIG_GRENADE_PRIME, .proc/create_blast_pellets)
else if(islandmine(parent))
RegisterSignal(parent, COMSIG_MINE_TRIGGERED, .proc/create_blast_pellets)
else if(issupplypod(parent))
RegisterSignal(parent, COMSIG_SUPPLYPOD_LANDED, .proc/create_blast_pellets)
/datum/component/pellet_cloud/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_PELLET_CLOUD_INIT, COMSIG_GRENADE_PRIME, COMSIG_GRENADE_ARMED, COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_UNCROSSED, COMSIG_MINE_TRIGGERED, COMSIG_ITEM_DROPPED))