mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
port minebots to basic mobs and add some behavior (#29319)
* port minebots to basic mobs and add some behavior * remove unused define * update is_blocked_turf usage * fix radio, goldgrub, and armor upgrade * standardize blackboard names * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * lewc review * whoops * Apply suggestions from code review Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
co-authored by
Luc
PollardTheDragon
parent
586e2e6c4d
commit
e63415a483
@@ -161,7 +161,7 @@
|
||||
"<span class='danger'>You fire [src]!</span>",
|
||||
"<span class='danger'>You hear \a [fire_sound_text]!</span>"
|
||||
)
|
||||
if(chambered.muzzle_flash_effect)
|
||||
if(chambered?.muzzle_flash_effect)
|
||||
var/obj/effect/temp_visual/target_angled/muzzle_flash/effect = new chambered.muzzle_flash_effect(get_turf(src), target, muzzle_flash_time)
|
||||
effect.alpha = min(255, muzzle_strength * 255)
|
||||
if(chambered.muzzle_flash_color)
|
||||
|
||||
@@ -328,10 +328,10 @@
|
||||
message_admins("User attempted to install a modkit into a kinetic accelerator while it is installed in an accelerator. Could be a double click, or an exploit attempt.")
|
||||
return FALSE
|
||||
if(minebot_upgrade)
|
||||
if(minebot_exclusive && !istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
if(minebot_exclusive && !istype(KA.loc, /mob/living/basic/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is only rated for minebot use.</span>")
|
||||
return FALSE
|
||||
else if(istype(KA.loc, /mob/living/simple_animal/hostile/mining_drone))
|
||||
else if(istype(KA.loc, /mob/living/basic/mining_drone))
|
||||
to_chat(user, "<span class='notice'>The modkit you're trying to install is not rated for minebot use.</span>")
|
||||
return FALSE
|
||||
if(denied_type)
|
||||
|
||||
@@ -610,5 +610,22 @@
|
||||
|
||||
return FALSE
|
||||
|
||||
/// Fire a projectile from this atom at another atom
|
||||
/atom/proc/fire_projectile(projectile_type, atom/target, sound, firer, list/ignore_targets = list())
|
||||
if(!isnull(sound))
|
||||
playsound(src, sound, vol = 100, vary = TRUE)
|
||||
|
||||
var/turf/startloc = get_turf(src)
|
||||
var/obj/item/projectile/bullet = new projectile_type(startloc)
|
||||
bullet.starting = startloc
|
||||
bullet.firer = firer || src
|
||||
bullet.firer_source_atom = src
|
||||
bullet.yo = target.y - startloc.y
|
||||
bullet.xo = target.x - startloc.x
|
||||
bullet.original = target
|
||||
bullet.preparePixelProjectile(target, src)
|
||||
bullet.fire()
|
||||
return bullet
|
||||
|
||||
#undef MOVES_HITSCAN
|
||||
#undef MUZZLE_EFFECT_PIXEL_INCREMENT
|
||||
|
||||
Reference in New Issue
Block a user