Files
CHOMPStation2/code/game/objects/effects/effect_system_ch.dm
Shadowfire b2dfb35c54 So this is Christmas...
Made fake presents for decoration purposes
Made fake snowfall effect for mood
Made advanced presents that have randomized size and shape, will have a bigger selection of possible gifts in update along with a rare chaos version that will have it's own smaller but much powerful items!
Made new id sprites and access cards for casino medical/security/engineering
Took the old girl out back and put her down, sorry Casino Ferry, you served us all well!

And a big big rework and remapping of casino and disabled it from round start to ease up on processing, sorry kids. No snooping the goods from now on!
2020-12-15 01:43:30 +01:00

88 lines
2.2 KiB
Plaintext

/////////////////////////////////////////////
// Confetti and Glitter
// Uses same system as smoke so can have directional travel
/////////////////////////////////////////////
/obj/effect/effect/confetti
name = "confetti"
icon = 'icons/effects/effects_ch.dmi'
icon_state = "confetti"
opacity = 0
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
var/time_to_live = 500
/obj/effect/effect/confetti/New()
..()
if(time_to_live)
spawn (time_to_live)
if(!QDELETED(src))
qdel(src)
//make confetti on ground cleanable decal to spawn
/datum/effect/effect/system/confetti_spread
var/total_confetti = 0 // To stop it being spammed and lagging!
var/direction
var/confetti_type = /obj/effect/effect/confetti
/datum/effect/effect/system/confetti_spread/set_up(n = 5, c = 0, loca, direct)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/confetti_spread/start(var/I)
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_confetti > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/confetti/confetti = new confetti_type(src.location)
src.total_confetti++
if(I)
confetti.color = I //Allows us to do differently colored confetti
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(confetti,direction)
spawn(confetti.time_to_live*0.75+rand(10,30))
if (confetti) qdel(confetti)
src.total_confetti--
/////////////////////////////////////////////
// Snow fall
// Permanent mood snow
/////////////////////////////////////////////
/obj/effect/effect/snow
name = "light snowfall"
icon = 'icons/effects/weather.dmi'
icon_state = "snowfall_light"
layer = 4.2
opacity = 0
anchored = 0.0
mouse_opacity = 0
/obj/effect/effect/snow/medium
name = "medium snowfall"
icon_state = "snowfall_med"
/obj/effect/effect/snow/heavy
name = "heavy snowfall"
icon_state = "snowfall_heavy"