Allows Blobs to "Capture" nukes instead of delete them (#17469)

* adds captured nuke tiles

* updates

* cleans up the code a bit

* Apply suggestions from code review

Co-authored-by: Farie82 <farie82@users.noreply.github.com>

* removes uneeded code

* Update code/game/gamemodes/nuclear/nuclearbomb.dm

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

Co-authored-by: Farie82 <farie82@users.noreply.github.com>
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Sirryan2002
2022-03-24 12:14:18 +00:00
committed by GitHub
co-authored by Farie82 AffectedArc07
parent 835c125a5b
commit 5851c0f2da
5 changed files with 39 additions and 2 deletions
@@ -0,0 +1,28 @@
/obj/structure/blob/captured_nuke //alternative to blob just straight up destroying nukes
name = "blob captured nuke"
icon_state = "blob"
desc = "A Nuclear Warhead tangled in blob tendrils pulsating with a horrific green glow."
max_integrity = 100
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 65, ACID = 90)
point_return = 0
/obj/structure/blob/captured_nuke/Initialize(mapload, obj/machinery/nuclearbomb/N)
. = ..()
START_PROCESSING(SSobj, src)
N?.forceMove(src)
/obj/structure/blob/captured_nuke/update_icon()
..()
cut_overlays()
var/image/nuke_overlay = image('icons/mob/blob.dmi', "blob_nuke_overlay")
nuke_overlay.appearance_flags = RESET_COLOR
add_overlay(nuke_overlay)
/obj/structure/blob/captured_nuke/Destroy()
for(var/obj/machinery/nuclearbomb/O in contents)
O.forceMove(loc)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/structure/blob/captured_nuke/Life(seconds, times_fired)
obj_integrity = min(max_integrity, obj_integrity + 1)
-1
View File
@@ -201,7 +201,6 @@
/obj/structure/blob/proc/adjustcolors(a_color)
if(a_color)
color = a_color
return
/obj/structure/blob/examine(mob/user)
. = ..()
+10 -1
View File
@@ -415,7 +415,16 @@ GLOBAL_VAR(bomb_set)
if(timing) //boom
INVOKE_ASYNC(src, .proc/explode)
return
qdel(src)
//if no boom then we need to let the blob capture our nuke
var/turf/T = get_turf(src)
if(!T)
return
if(locate(/obj/structure/blob) in T)
return
var/obj/structure/blob/captured_nuke/N = new(T, src)
N.overmind = B.overmind
N.adjustcolors(B.color)
/obj/machinery/nuclearbomb/zap_act(power, zap_flags)
. = ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

+1
View File
@@ -542,6 +542,7 @@
#include "code\game\gamemodes\blob\powers.dm"
#include "code\game\gamemodes\blob\theblob.dm"
#include "code\game\gamemodes\blob\blobs\blob_mobs.dm"
#include "code\game\gamemodes\blob\blobs\captured_nuke.dm"
#include "code\game\gamemodes\blob\blobs\core.dm"
#include "code\game\gamemodes\blob\blobs\factory.dm"
#include "code\game\gamemodes\blob\blobs\node.dm"