Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into remove-sleeps
This commit is contained in:
@@ -2516,19 +2516,101 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
color = "#FFFFFF"
|
||||
boozepwr = 35
|
||||
quality = DRINK_GOOD
|
||||
taste_description = "a delightful softened punch"
|
||||
glass_icon_state = "godfather"
|
||||
glass_name = "Godfather"
|
||||
glass_desc = "A classic from old Italy and enjoyed by gangsters, pray the orange peel doesnt end up in your mouth."
|
||||
taste_description = "bad coding"
|
||||
can_synth = FALSE
|
||||
var/list/names = list("null fruit" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit.
|
||||
var/list/tastes = list("bad coding" = 1) //List of tastes. See above.
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/consumable/ethanol/godmother
|
||||
name = "Godmother"
|
||||
description = "A twist on a classic, liked more by mature women."
|
||||
boozepwr = 50
|
||||
color = "#E68F00"
|
||||
quality = DRINK_GOOD
|
||||
taste_description = "sweetness and a zesty twist"
|
||||
glass_icon_state = "godmother"
|
||||
glass_name = "Godmother"
|
||||
glass_desc = "A lovely fresh smelling cocktail, a true Sicilian delight."
|
||||
/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)
|
||||
names = data["names"]
|
||||
tastes = data["tastes"]
|
||||
boozepwr = data["boozepwr"]
|
||||
color = data["color"]
|
||||
generate_data_info(data)
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine/on_merge(list/data, amount)
|
||||
var/diff = (amount/volume)
|
||||
if(diff < 1)
|
||||
color = BlendRGB(color, data["color"], diff/2) //The percentage difference over two, so that they take average if equal.
|
||||
else
|
||||
color = BlendRGB(color, data["color"], (1/diff)/2) //Adjust so it's always blending properly.
|
||||
var/oldvolume = volume-amount
|
||||
|
||||
var/list/cachednames = data["names"]
|
||||
for(var/name in names | cachednames)
|
||||
names[name] = ((names[name] * oldvolume) + (cachednames[name] * amount)) / volume
|
||||
|
||||
var/list/cachedtastes = data["tastes"]
|
||||
for(var/taste in tastes | cachedtastes)
|
||||
tastes[taste] = ((tastes[taste] * oldvolume) + (cachedtastes[taste] * amount)) / volume
|
||||
|
||||
boozepwr *= oldvolume
|
||||
var/newzepwr = data["boozepwr"] * amount
|
||||
boozepwr += newzepwr
|
||||
boozepwr /= volume //Blending boozepwr to volume.
|
||||
generate_data_info(data)
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
|
||||
var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
|
||||
var/list/primary_tastes = list()
|
||||
var/list/secondary_tastes = list()
|
||||
glass_name = "glass of [name]"
|
||||
glass_desc = description
|
||||
for(var/taste in tastes)
|
||||
switch(tastes[taste])
|
||||
if(minimum_percent*2 to INFINITY)
|
||||
primary_tastes += taste
|
||||
if(minimum_percent to minimum_percent*2)
|
||||
secondary_tastes += taste
|
||||
|
||||
var/minimum_name_percent = 0.35
|
||||
name = ""
|
||||
var/list/names_in_order = sortTim(names, /proc/cmp_numeric_dsc, TRUE)
|
||||
var/named = FALSE
|
||||
for(var/fruit_name in names)
|
||||
if(names[fruit_name] >= minimum_name_percent)
|
||||
name += "[fruit_name] "
|
||||
named = TRUE
|
||||
if(named)
|
||||
name += "wine"
|
||||
else
|
||||
name = "mixed [names_in_order[1]] wine"
|
||||
|
||||
var/alcohol_description
|
||||
switch(boozepwr)
|
||||
if(120 to INFINITY)
|
||||
alcohol_description = "suicidally strong"
|
||||
if(90 to 120)
|
||||
alcohol_description = "rather strong"
|
||||
if(70 to 90)
|
||||
alcohol_description = "strong"
|
||||
if(40 to 70)
|
||||
alcohol_description = "rich"
|
||||
if(20 to 40)
|
||||
alcohol_description = "mild"
|
||||
if(0 to 20)
|
||||
alcohol_description = "sweet"
|
||||
else
|
||||
alcohol_description = "watery" //How the hell did you get negative boozepwr?
|
||||
|
||||
var/list/fruits = list()
|
||||
if(names_in_order.len <= 3)
|
||||
fruits = names_in_order
|
||||
else
|
||||
for(var/i in 1 to 3)
|
||||
fruits += names_in_order[i]
|
||||
fruits += "other plants"
|
||||
var/fruit_list = english_list(fruits)
|
||||
description = "A [alcohol_description] wine brewed from [fruit_list]."
|
||||
|
||||
var/flavor = ""
|
||||
if(!primary_tastes.len)
|
||||
primary_tastes = list("[alcohol_description] alcohol")
|
||||
flavor += english_list(primary_tastes)
|
||||
if(secondary_tastes.len)
|
||||
flavor += ", with a hint of "
|
||||
flavor += english_list(secondary_tastes)
|
||||
taste_description = flavor
|
||||
if(holder.my_atom)
|
||||
holder.my_atom.on_reagent_change()
|
||||
|
||||
@@ -524,10 +524,9 @@
|
||||
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume*2 SECONDS)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot)
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
|
||||
lowertemp.set_temperature(max( min(lowertemp.return_temperature()-2000,lowertemp.return_temperature() / 2) ,0))
|
||||
var/datum/gas_mixture/lowertemp = T.return_air()
|
||||
lowertemp.set_temperature(max( min(lowertemp.return_temperature()-2000,lowertemp.return_temperature() / 2) ,TCMB))
|
||||
lowertemp.react(src)
|
||||
T.assume_air(lowertemp)
|
||||
qdel(hotspot)
|
||||
|
||||
/datum/reagent/consumable/enzyme
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
R.stun(20)
|
||||
R.reveal(100)
|
||||
R.adjustHealth(50)
|
||||
sleep(20)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(round(multiplier/48,1),get_turf(holder.my_atom)))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
@@ -433,20 +432,24 @@
|
||||
var/T1 = multiplier * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
|
||||
var/T2 = multiplier * 50
|
||||
var/T3 = multiplier * 120
|
||||
sleep(5)
|
||||
var/added_delay = 0.5 SECONDS
|
||||
if(multiplier >= 75)
|
||||
tesla_zap(holder.my_atom, 7, T1, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T1), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(multiplier >= 40)
|
||||
tesla_zap(holder.my_atom, 7, T2, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T2), added_delay)
|
||||
added_delay += 1.5 SECONDS
|
||||
if(multiplier >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
|
||||
tesla_zap(holder.my_atom, 7, T3, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
addtimer(CALLBACK(src, .proc/zappy_zappy, holder, T3), added_delay)
|
||||
..()
|
||||
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/proc/zappy_zappy(datum/reagents/holder, power)
|
||||
if(QDELETED(holder.my_atom))
|
||||
return
|
||||
tesla_zap(holder.my_atom, 7, power, zap_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, TRUE)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/heat
|
||||
id = "teslium_lightning2"
|
||||
required_temp = 474
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
var/deletes_extract = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/proc/use_slime_core(datum/reagents/holder)
|
||||
SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type")
|
||||
if(deletes_extract)
|
||||
delete_extract(holder)
|
||||
@@ -232,8 +235,7 @@
|
||||
if(holder && holder.my_atom)
|
||||
var/turf/open/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
var/datum/gas/gastype = /datum/gas/nitrogen
|
||||
T.atmos_spawn_air("[initial(gastype.id)]=50;TEMP=2.7")
|
||||
T.atmos_spawn_air("n2=50;TEMP=2.7")
|
||||
|
||||
/datum/chemical_reaction/slime/slimefireproof
|
||||
name = "Slime Fireproof"
|
||||
@@ -570,8 +572,9 @@
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
|
||||
set waitfor = FALSE
|
||||
sleep(50)
|
||||
addtimer(CALLBACK(src, .proc/slime_stop, holder), 5 SECONDS)
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/proc/slime_stop(datum/reagents/holder)
|
||||
var/obj/item/slime_extract/sepia/extract = holder.my_atom
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
new /obj/effect/timestop(T, null, null, null)
|
||||
@@ -580,8 +583,7 @@
|
||||
var/mob/lastheld = get_mob_by_key(holder.my_atom.fingerprintslast)
|
||||
if(lastheld && !lastheld.equip_to_slot_if_possible(extract, SLOT_HANDS, disable_warning = TRUE))
|
||||
extract.forceMove(get_turf(lastheld))
|
||||
|
||||
..()
|
||||
use_slime_core(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/slimecamera
|
||||
name = "Slime Camera"
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
|
||||
var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
|
||||
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
|
||||
var/spray_delay = 3 //The amount of sleep() delay between each chempuff step.
|
||||
/// Amount of time it takes for a spray to completely travel.
|
||||
var/spray_delay = 8
|
||||
/// Last world.time of spray
|
||||
var/last_spray = 0
|
||||
/// Spray cooldown
|
||||
@@ -72,58 +73,20 @@
|
||||
if((last_spray + spray_cooldown) > world.time)
|
||||
return
|
||||
var/range = clamp(get_dist(src, A), 1, current_range)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
|
||||
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
|
||||
if(stream_mode)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
puff_reagent_left = 1
|
||||
else
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
|
||||
D.color = mix_color_from_reagents(D.reagents.reagent_list)
|
||||
var/wait_step = CEILING(spray_delay * INVERSE(range), world.tick_lag)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src), stream_mode, wait_step, range, stream_mode? 1 : range)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
log_reagent("SPRAY: [key_name(usr)] fired [src] ([REF(src)]) [COORD(T)] at [A] ([REF(A)]) [COORD(A)] (chempuff: [D.reagents.log_list()])")
|
||||
var/wait_step = max(round(2+ spray_delay * INVERSE(range)), 2)
|
||||
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
|
||||
if(stream_mode)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
else
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
|
||||
D.color = mix_color_from_reagents(D.reagents.reagent_list)
|
||||
last_spray = world.time
|
||||
INVOKE_ASYNC(src, .proc/do_spray, A, wait_step, D, range, puff_reagent_left)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/do_spray(atom/A, wait_step, obj/effect/decal/chempuff/D, range, puff_reagent_left)
|
||||
var/range_left = range
|
||||
for(var/i=0, i<range, i++)
|
||||
range_left--
|
||||
step_towards(D,A)
|
||||
sleep(wait_step)
|
||||
|
||||
for(var/atom/T in get_turf(D))
|
||||
if(T == D || T.invisibility) //we ignore the puff itself and stuff below the floor
|
||||
continue
|
||||
if(puff_reagent_left <= 0)
|
||||
break
|
||||
|
||||
if(stream_mode)
|
||||
if(ismob(T))
|
||||
var/mob/M = T
|
||||
if(!M.lying || !range_left)
|
||||
D.reagents.reaction(M, VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
else if(!range_left)
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
else
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
if(ismob(T))
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left > 0 && (!stream_mode || !range_left))
|
||||
D.reagents.reaction(get_turf(D), VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left <= 0) // we used all the puff so we delete it.
|
||||
qdel(D)
|
||||
return
|
||||
qdel(D)
|
||||
D.run_puff(A)
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(mob/user)
|
||||
stream_mode = !stream_mode
|
||||
@@ -207,7 +170,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
volume = 40
|
||||
stream_range = 4
|
||||
spray_delay = 1
|
||||
spray_delay = 2
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list(/datum/reagent/consumable/condensedcapsaicin = 40)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user