Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions __DEFINES/setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,8 @@ var/list/weekend_days = list("Friday", "Saturday", "Sunday")
#define PS_CULT_SMOKE2 "Cult Smoke2"
#define PS_CULT_SMOKE_BOX "Cult Smoke Box"
#define PS_PILLAR_BEACON "Pillar Beacon"
#define PS_OCCULT_TEST_LARGE "Occult Test Large"
#define PS_OCCULT_TEST_SMALL "Occult Test Small"
#define PS_CULT_HALO "Cult Halo"
#define PS_SPACE_RUNES "Space Runes"
#define PS_NARSIEHASRISEN1 "Nar-SieHasRisen1"
Expand All @@ -2013,6 +2015,7 @@ var/list/weekend_days = list("Friday", "Saturday", "Sunday")

//Particles variable defines
#define PVAR_SPAWNING "spawning"
#define PVAR_COUNT "count"
#define PVAR_POSITION "position"
#define PVAR_VELOCITY "velocity"
#define PVAR_ICON_STATE "icon_state"
Expand Down
30 changes: 30 additions & 0 deletions code/game/objects/effects/particles_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
switch(adjustment)
if (PVAR_SPAWNING)
holder.particles.spawning = new_value
if (PVAR_COUNT)
holder.particles.count = new_value
if (PVAR_POSITION)
holder.particles.position = new_value
if (PVAR_VELOCITY)
Expand Down Expand Up @@ -177,6 +179,8 @@ var/list/particle_string_to_type = list(
PS_CULT_SMOKE2 = /particles/cult_smoke/alt,
PS_CULT_SMOKE_BOX = /particles/cult_smoke/box,
PS_PILLAR_BEACON = /particles/pillar_beacon,
PS_OCCULT_TEST_LARGE = /particles/occult_blood_test,
PS_OCCULT_TEST_SMALL = /particles/occult_blood_test/small,
PS_CULT_HALO = /particles/cult_halo,
PS_SPACE_RUNES = /particles/space_runes,
PS_NARSIEHASRISEN1 = /particles/narsie_has_risen,
Expand Down Expand Up @@ -368,6 +372,32 @@ var/list/particle_string_to_type = list(

plane = ABOVE_LIGHTING_PLANE


//OCCULT_BLOOD_TEST
/particles/occult_blood_test
width = 64
height = 96
count = 0
spawning = 2

lifespan = 3 SECONDS
fade = 0.3 SECONDS
icon = 'icons/effects/effects_particles.dmi'
icon_state = "occult_test_flame_large"
position = generator("box", list(-1,-1), list(1,1))
velocity = list(0,2)
friction = 0.3
drift = generator("box", list(-0.3,-0.35), list(0.3,0.35))

appearance_flags = RESET_COLOR
plane = ABOVE_LIGHTING_PLANE

/particles/occult_blood_test/small
icon_state = "occult_test_flame_small"
velocity = list(0,1.5)
friction = 0.4
drift = generator("box", list(-0.25,-0.35), list(0.25,0.35))

//CULT HALO
/particles/cult_halo
width = 32
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/Chemistry-Holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ trans_to_atmos(var/datum/gas_mixture/target, var/amount=1, var/multiplier=1, var
for (var/datum/reagent/current_reagent in reagent_list)
if(! (current_reagent.flags & CHEMFLAG_NOTREMOVABLE))
var/amt = (get_reagent_amount(current_reagent.id)*transfer_frac) + transfer_flat
total_transfered += trans_id_to(target, current_reagent.id, amt)
total_transfered += trans_id_to(target, current_reagent.id, amt)
return total_transfered

/datum/reagents/proc/metabolize(var/mob/living/M, var/alien)
Expand Down Expand Up @@ -566,7 +566,7 @@ trans_to_atmos(var/datum/gas_mixture/target, var/amount=1, var/multiplier=1, var
my_atom.visible_message("<span class='notice'>[bicon(my_atom)] The solution begins to bubble.</span>")
C.log_reaction(src, created_volume)
if(!(my_atom.flags & SILENTCONTAINER))
playsound(my_atom, 'sound/effects/bubbles.ogg', 80, 1)
playsound(my_atom, C.reaction_sound, 80, 1)

C.on_reaction(src, created_volume)
if(C.react_discretely)
Expand Down
37 changes: 36 additions & 1 deletion code/modules/reagents/Chemistry-Recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

var/data = null

var/reaction_sound = 'sound/effects/bubbles.ogg'


/datum/chemical_reaction/proc/log_reaction(var/datum/reagents/holder, var/amt)
var/datum/log_controller/I = investigations[I_CHEMS]
Expand Down Expand Up @@ -698,6 +700,7 @@
result = SODIUMCHLORIDE
result_amount = 5
quiet = TRUE
reaction_sound = 'sound/effects/occult_blood_test.ogg'

/datum/chemical_reaction/occult_blood_test/on_reaction(var/datum/reagents/holder, var/created_volume)
for(var/datum/reagent/blood/B in holder.reagent_list)
Expand All @@ -709,6 +712,7 @@
var/red_flames = 0
var/orange_flames = 0
var/datum/faction/bloodcult/cult = find_active_faction_by_type(/datum/faction/bloodcult)

for (var/datum/role/R in cult.members)
var/mob/L = R.antag.current
if (isliving(L) && !L.isDead())
Expand All @@ -717,13 +721,44 @@
red_flames++//human or construct on the current Z level
else
orange_flames++//either a shade or on another Z level

holder.my_atom.add_particles(PS_CULT_SMOKE)
holder.my_atom.add_particles(PS_CULT_SMOKE2)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 1, PS_CULT_SMOKE)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 1, PS_CULT_SMOKE2)
holder.my_atom.adjust_particles(PVAR_PLANE, OBJ_PLANE, PS_CULT_SMOKE)
holder.my_atom.adjust_particles(PVAR_PLANE, OBJ_PLANE, PS_CULT_SMOKE2)
holder.my_atom.adjust_particles(PVAR_SCALE, 1, PS_CULT_SMOKE)
holder.my_atom.adjust_particles(PVAR_SCALE, 1, PS_CULT_SMOKE2)

if (red_flames)
holder.my_atom.add_particles(PS_OCCULT_TEST_LARGE)
holder.my_atom.adjust_particles(PVAR_COUNT, red_flames, PS_OCCULT_TEST_LARGE)
T.visible_message("<span class='notice'>You count <font color='red'><b>[(red_flames > 1) ? "[red_flames] distinct" : "a single"]</b></font> bright red flame[(red_flames > 1) ? "s":""].</span>")

if (orange_flames)
holder.my_atom.add_particles(PS_OCCULT_TEST_SMALL)
holder.my_atom.adjust_particles(PVAR_COUNT, orange_flames, PS_OCCULT_TEST_SMALL)
T.visible_message("<span class='notice'>[red_flames ? "As well as" : "You count"] <font color='orange'><b>[(orange_flames > 1) ? "[orange_flames] distinct" : "a single"]</b></font> dim orange flame[(orange_flames > 1) ? "s":""].</span>")
playsound(T, 'sound/effects/bubbles.ogg', 80, 1)

playsound(T, reaction_sound, (10 * red_flames) + (5 * orange_flames), 1)
T.hotspot_expose(500 * red_flames + 100 * orange_flames, SMALL_FLAME)
holder.remove_reagent(BLOOD, 5)

spawn(20)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0, PS_OCCULT_TEST_LARGE)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0, PS_OCCULT_TEST_SMALL)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0.3, PS_CULT_SMOKE)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0.3, PS_CULT_SMOKE2)
sleep(10)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0, PS_CULT_SMOKE)
holder.my_atom.adjust_particles(PVAR_SPAWNING, 0, PS_CULT_SMOKE2)
sleep(10)
holder.my_atom.remove_particles(PS_OCCULT_TEST_LARGE)
holder.my_atom.remove_particles(PS_OCCULT_TEST_SMALL)
holder.my_atom.remove_particles(PS_CULT_SMOKE)
holder.my_atom.remove_particles(PS_CULT_SMOKE2)

return

T.visible_message("<span class='notice'>[bicon(holder.my_atom)] The salts dissolve into the blood without so much as a reaction.</span>")
Expand Down
Binary file modified icons/effects/effects_particles.dmi
Binary file not shown.
Binary file added sound/effects/occult_blood_test.ogg
Binary file not shown.
Loading