Flashy flash and Gondola Pods

and cult effect addition, fixes CTF
This commit is contained in:
Poojawa
2018-09-21 02:48:17 -05:00
parent 8afac0b881
commit d231018a3a
52 changed files with 4004 additions and 723 deletions
@@ -20,12 +20,14 @@
name = "sparks"
icon_state = "sparks"
anchored = TRUE
light_range = 1
light_power = 1.3
light_range = MINIMUM_USEFUL_LIGHT_RANGE
light_color = LIGHT_COLOR_FIRE
/obj/effect/particle_effect/sparks/Initialize()
. = ..()
flick("sparks", src) // replay the animation
playsound(src.loc, "sparks", 100, 1)
playsound(src, "sparks", 100, TRUE)
var/turf/T = loc
if(isturf(T))
T.hotspot_expose(300,5)
+26
View File
@@ -40,6 +40,10 @@
density = TRUE
layer = FLY_LAYER
/obj/effect/supplypod_selector
icon_state = "supplypod_selector"
layer = FLY_LAYER
//Makes a tile fully lit no matter what
/obj/effect/fullbright
icon = 'icons/effects/alphacolors.dmi'
@@ -66,3 +70,25 @@
/obj/effect/abstract/marker/at
name = "active turf marker"
/obj/effect/dummy/lighting_obj
name = "lighting fx obj"
desc = "Tell a coder if you're seeing this."
icon_state = "nothing"
light_color = "#FFFFFF"
light_range = MINIMUM_USEFUL_LIGHT_RANGE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
. = ..()
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
if(_duration)
QDEL_IN(src, _duration)
/obj/effect/dummy/lighting_obj/moblight
name = "mob lighting fx"
/obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, _color, _range, _power, _duration)
. = ..()
if(!ismob(loc))
return INITIALIZE_HINT_QDEL
@@ -4,13 +4,17 @@
item_state = "flashbang"
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
var/flashbang_range = 7 //how many tiles away the mob will be stunned.
/obj/item/grenade/flashbang/prime()
update_mob()
var/flashbang_turf = get_turf(src)
if(!flashbang_turf)
return
for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf))
do_sparks(rand(5, 9), FALSE, src)
playsound(flashbang_turf, 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
new /obj/effect/dummy/lighting_obj (flashbang_turf, LIGHT_COLOR_WHITE, (flashbang_range + 2), 4, 2)
for(var/mob/living/M in get_hearers_in_view(flashbang_range, flashbang_turf))
bang(get_turf(M), M)
qdel(src)
@@ -18,7 +22,6 @@
if(M.stat == DEAD) //They're dead!
return
M.show_message("<span class='warning'>BANG</span>", 2)
playsound(loc, 'sound/weapons/flashbang.ogg', 100, 1)
var/distance = max(0,get_dist(get_turf(src),T))
//Flash
@@ -1,156 +0,0 @@
//The "BDPtarget" temp visual is created by the expressconsole, which in turn makes two things: a falling droppod animation, and the droppod itself.
#define POD_STANDARD 0
#define POD_BLUESPACE 1
#define POD_CENTCOM 2
//------------------------------------SUPPLY POD-------------------------------------//
/obj/structure/closet/supplypod
name = "Supply Drop Pod"
desc = "A Nanotrasen supply drop pod."
icon = 'icons/obj/2x2.dmi'
icon_state = "supplypod"
pixel_x = -16//2x2 sprite
pixel_y = -5
layer = TABLE_LAYER//so that the crate inside doesn't appear underneath
allow_objects = TRUE
allow_dense = TRUE
delivery_icon = null
can_weld_shut = FALSE
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 90, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
anchored = TRUE
anchorable = FALSE
var/datum/supply_order/SupplyOrder
var/atom/other_delivery
/obj/structure/closet/supplypod/bluespacepod
name = "Bluespace Drop Pod"
desc = "A Nanotrasen Bluespace drop pod. Teleports back to CentCom after delivery."
icon_state = "bluespacepod"
/obj/structure/closet/supplypod/bluespacepod/centcompod
name = "CentCom Drop Pod"
desc = "A Nanotrasen Bluespace drop pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."
icon_state = "centcompod"
/obj/structure/closet/supplypod/Initialize(mapload, SO)
. = ..()
if(istype(SO, /datum/supply_order))
SupplyOrder = SO//uses Supply Order passed from expressconsole into BDPtarget
else
other_delivery = SO//if the object is not a supply order, we force the object in the pod
addtimer(CALLBACK(src, .proc/open), 30)//open 3seconds after appearing
/obj/structure/closet/supplypod/update_icon()
cut_overlays()
if (opened)
add_overlay("[icon_state]_open")
else
add_overlay("[icon_state]_door")
/obj/structure/closet/supplypod/bluespacepod/tool_interact(obj/item/W, mob/user)
return TRUE
/obj/structure/closet/supplypod/toggle(mob/living/user)
return
/obj/structure/closet/supplypod/open()
var/turf/T = get_turf(src)
opened = TRUE
if(SupplyOrder)
SupplyOrder.generate(T)//not called during populateContents as supplyorder generation requires a turf
if(other_delivery)
new other_delivery(T)
update_icon()
playsound(src, open_sound, 15, 1, -3)
if(istype(src,/obj/structure/closet/supplypod/bluespacepod))
addtimer(CALLBACK(src, .proc/sparks), 30)//if bluespace, then 3 seconds after opening, make some sparks and delete
/obj/structure/closet/supplypod/proc/sparks()//sparks cant be called from addtimer
do_sparks(5, TRUE, src)
qdel(src)//no need for QDEL_IN if we already have a timer
/obj/structure/closet/supplypod/Destroy()//make some sparks b4 deletion
QDEL_NULL(SupplyOrder)
return ..()
//------------------------------------FALLING SUPPLY POD-------------------------------------//
/obj/effect/temp_visual/DPfall
icon = 'icons/obj/2x2.dmi'
pixel_x = -16
pixel_y = -5
pixel_z = 200
desc = "Get out of the way!"
layer = FLY_LAYER//that wasnt flying, that was falling with style!
randomdir = FALSE
icon_state = "supplypod_falling"
/obj/effect/temp_visual/DPfall/Initialize(dropLocation, podID)
if (podID == POD_STANDARD)
icon_state = "supplypod_falling"
name = "Supply Drop Pod"
else if (podID == POD_BLUESPACE)
icon_state = "bluespacepod_falling"
name = "Bluespace Drop Pod"
else
icon_state = "centcompod_falling"
name = "CentCom Drop Pod"
. = ..()
//------------------------------------TEMPORARY_VISUAL-------------------------------------//
/obj/effect/DPtarget
icon = 'icons/mob/actions/actions_items.dmi'
icon_state = "sniper_zoom"
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
light_range = 2
var/obj/effect/temp_visual/fallingPod
/obj/effect/DPtarget/Initialize(mapload, SO, podID)
. = ..()
var/delayTime = 17 //We're forcefully adminspawned, make it faster
switch(podID)
if(POD_STANDARD)
delayTime = 30
if(POD_BLUESPACE)
delayTime = 15
if(POD_CENTCOM) //Admin smite, even faster.
delayTime = 5//speedy delivery
addtimer(CALLBACK(src, .proc/beginLaunch, SO, podID), delayTime)//standard pods take 3 seconds to come in, bluespace pods take 1.5
/obj/effect/DPtarget/proc/beginLaunch(SO, podID)
fallingPod = new /obj/effect/temp_visual/DPfall(drop_location(), podID)
animate(fallingPod, pixel_z = 0, time = 3, easing = LINEAR_EASING)//make and animate a falling pod
addtimer(CALLBACK(src, .proc/endLaunch, SO, podID), 3, TIMER_CLIENT_TIME)//fall 0.3seconds
/obj/effect/DPtarget/proc/endLaunch(SO, podID)
if(podID == POD_STANDARD)
new /obj/structure/closet/supplypod(drop_location(), SO)//pod is created
explosion(src,0,0,2, flame_range = 3) //less advanced equipment than bluespace pod, so larger explosion when landing
else if(podID == POD_BLUESPACE)
new /obj/structure/closet/supplypod/bluespacepod(drop_location(), SO)//pod is created
explosion(src,0,0,2, flame_range = 1) //explosion and camshake (shoutout to @cyberboss)
else if(podID == POD_CENTCOM)
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)//CentCom supplypods dont create explosions; instead they directly deal 40 fire damage to people on the turf
var/turf/T = get_turf(src)
playsound(src, "explosion", 80, 1)
new /obj/effect/hotspot(T)
T.hotspot_expose(700, 50, 1)//same as fireball
for(var/mob/living/M in T.contents)
M.adjustFireLoss(40)
else //We're buildmoded or directly spawned, blow them up damnit.
new /obj/structure/closet/supplypod/bluespacepod/centcompod(drop_location(), SO)
explosion(src, 0, 0, 2, flame_range = 3)
qdel(src)
/obj/effect/DPtarget/Destroy()
QDEL_NULL(fallingPod)//delete falling pod after animation's over
return ..()
//------------------------------------UPGRADES-------------------------------------//
/obj/item/disk/cargo/bluespace_pod
name = "Bluespace Drop Pod Upgrade"
desc = "This disk provides a firmware update to the Express Supply Console, granting the use of Nanotrasen's Bluespace Drop Pods to the supply department."
icon = 'icons/obj/module.dmi'
icon_state = "cargodisk"
item_state = "card-id"
w_class = WEIGHT_CLASS_SMALL