Merge remote-tracking branch 'Upstream/master' into TGUI-3.0

This commit is contained in:
Artur
2020-07-14 16:15:48 +03:00
19 changed files with 100 additions and 57 deletions

View File

@@ -0,0 +1,4 @@
// Reaction priorities, higher makes it checked first. Otherwise, it goes based on reaction temperature requirements.
#define CHEMICAL_REACTION_PRIORITY_DEFAULT 100
#define CHEMICAL_REACTION_PRIORITY_SMOKE 1000

View File

@@ -125,3 +125,11 @@ GLOBAL_VAR_INIT(cmp_field, "name")
if(A.ui_category == B.ui_category)
return sorttext(A.name, B.name)
return sorttext(A.ui_category, B.ui_category)
/proc/cmp_chemical_reactions_default(datum/chemical_reaction/A, datum/chemical_reaction/B)
if(A.priority != B.priority)
return B.priority - A.priority
else if(A.is_cold_recipe)
return A.required_temp - B.required_temp //return coldest
else
return B.required_temp - A.required_temp //return hottest

View File

@@ -81,7 +81,7 @@
if(N.new_character)
log_manifest(N.ckey,N.new_character.mind,N.new_character)
if(ishuman(N.new_character))
manifest_inject(N.new_character, N.client)
manifest_inject(N.new_character, N.client, N.client.prefs)
CHECK_TICK
/datum/datacore/proc/manifest_modify(name, assignment)
@@ -197,7 +197,7 @@
return dat
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C, datum/preferences/prefs)
set waitfor = FALSE
var/static/list/show_directions = list(SOUTH, WEST)
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
@@ -260,7 +260,7 @@
M.fields["alg_d"] = "No allergies have been detected in this patient."
M.fields["cdi"] = "None"
M.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
M.fields["notes"] = H.get_trait_string(medical)
M.fields["notes"] = "Trait information as of shift start: [H.get_trait_string(medical)]<br>[prefs.medical_records]"
medical += M
//Security Record
@@ -270,7 +270,7 @@
S.fields["criminal"] = "None"
S.fields["mi_crim"] = list()
S.fields["ma_crim"] = list()
S.fields["notes"] = "No notes."
S.fields["notes"] = prefs.security_records || "No notes."
security += S
//Locked Record

View File

@@ -165,6 +165,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
var/custom_tongue = "default" //if your tongue is to be something other than your races
/// Security record note section
var/security_records
/// Medical record note section
var/medical_records
var/list/custom_names = list()
var/preferred_ai_core_display = "Blue"
var/prefered_security_department = SEC_DEPT_RANDOM
@@ -340,6 +345,24 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Custom job preferences:</b><BR>"
dat += "<a href='?_src_=prefs;preference=ai_core_icon;task=input'><b>Preferred AI Core Display:</b> [preferred_ai_core_display]</a><br>"
dat += "<a href='?_src_=prefs;preference=sec_dept;task=input'><b>Preferred Security Department:</b> [prefered_security_department]</a><BR></td>"
dat += "<br>Records</b><br>"
dat += "<br><a href='?_src_=prefs;preference=security_records;task=input'><b>Security Records</b></a><br>"
if(length_char(security_records) <= 40)
if(!length(security_records))
dat += "\[...\]"
else
dat += "[security_records]"
else
dat += "[TextPreview(security_records)]...<BR>"
dat += "<br><a href='?_src_=prefs;preference=medical_records;task=input'><b>Medical Records</b></a><br>"
if(length_char(medical_records) <= 40)
if(!length(medical_records))
dat += "\[...\]<br>"
else
dat += "[medical_records]"
else
dat += "[TextPreview(medical_records)]...<BR>"
dat += "</tr></table>"
//Character Appearance
@@ -1646,6 +1669,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
if("security_records")
var/rec = stripped_multiline_input(usr, "Set your security record note section. This should be IC!", "Security Records", html_decode(security_records), MAX_FLAVOR_LEN, TRUE)
if(!isnull(rec))
security_records = rec
if("medical_records")
var/rec = stripped_multiline_input(usr, "Set your medical record note section. This should be IC!", "Security Records", html_decode(medical_records), MAX_FLAVOR_LEN, TRUE)
if(!isnull(rec))
medical_records = rec
if("flavor_text")
var/msg = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Flavor Text", html_decode(features["flavor_text"]), MAX_FLAVOR_LEN, TRUE)
if(!isnull(msg))

View File

@@ -515,6 +515,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Quirks
S["all_quirks"] >> all_quirks
//Records
S["security_records"] >> security_records
S["medical_records"] >> medical_records
//Citadel code
S["feature_genitals_use_skintone"] >> features["genitals_use_skintone"]
S["feature_mcolor2"] >> features["mcolor2"]
@@ -698,6 +702,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
custom_speech_verb = sanitize_inlist(custom_speech_verb, GLOB.speech_verbs, "default")
custom_tongue = sanitize_inlist(custom_tongue, GLOB.roundstart_tongues, "default")
security_records = copytext(security_records, 1, MAX_FLAVOR_LEN)
medical_records = copytext(medical_records, 1, MAX_FLAVOR_LEN)
features["flavor_text"] = copytext(features["flavor_text"], 1, MAX_FLAVOR_LEN)
features["silicon_flavor_text"] = copytext(features["silicon_flavor_text"], 1, MAX_FLAVOR_LEN)
features["ooc_notes"] = copytext(features["ooc_notes"], 1, MAX_FLAVOR_LEN)
@@ -762,6 +769,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["species"] , pref_species.id)
WRITE_FILE(S["custom_speech_verb"] , custom_speech_verb)
WRITE_FILE(S["custom_tongue"] , custom_tongue)
// records
WRITE_FILE(S["security_records"] , security_records)
WRITE_FILE(S["medical_records"] , medical_records)
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
WRITE_FILE(S["feature_lizard_tail"] , features["tail_lizard"])
WRITE_FILE(S["feature_human_tail"] , features["tail_human"])

View File

@@ -514,6 +514,8 @@
outputs = list("volume used" = IC_PINTYPE_NUMBER,"self reference" = IC_PINTYPE_SELFREF,"temperature" = IC_PINTYPE_NUMBER)
spawn_flags = IC_SPAWN_RESEARCH
var/heater_coefficient = 0.1
var/max_temp = 1000
var/min_temp = 2.7
/obj/item/integrated_circuit/reagent/storage/heater/on_data_written()
if(get_pin_data(IC_INPUT, 2))
@@ -531,7 +533,7 @@
/obj/item/integrated_circuit/reagent/storage/heater/process()
if(power_draw_idle)
var/target_temperature = get_pin_data(IC_INPUT, 1)
var/target_temperature = clamp(get_pin_data(IC_INPUT, 1), min_temp, max_temp)
if(reagents.chem_temp > target_temperature)
reagents.chem_temp += min(-1, (target_temperature - reagents.chem_temp) * heater_coefficient)
if(reagents.chem_temp < target_temperature)
@@ -795,4 +797,4 @@
..()
if(istype(loc,/obj/item/integrated_circuit/input/beaker_connector))
var/obj/item/integrated_circuit/input/beaker_connector/current_circuit = loc
current_circuit.push_vol()
current_circuit.push_vol()

View File

@@ -398,7 +398,7 @@
humanc = character //Let's retypecast the var to be human,
if(humanc) //These procs all expect humans
GLOB.data_core.manifest_inject(humanc)
GLOB.data_core.manifest_inject(humanc, humanc.client, humanc.client.prefs)
if(SSshuttle.arrivals)
SSshuttle.arrivals.QueueAnnounce(humanc, rank)
else

View File

@@ -463,17 +463,10 @@
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && meets_temp_requirement && can_special_react)
possible_reactions += C
sortTim(possible_reactions, /proc/cmp_chemical_reactions_default, FALSE)
if(possible_reactions.len)
var/datum/chemical_reaction/selected_reaction = possible_reactions[1]
//select the reaction with the most extreme temperature requirements
for(var/V in possible_reactions)
var/datum/chemical_reaction/competitor = V
if(selected_reaction.is_cold_recipe)
if(competitor.required_temp <= selected_reaction.required_temp)
selected_reaction = competitor
else
if(competitor.required_temp >= selected_reaction.required_temp) //will return with the hotter reacting first.
selected_reaction = competitor
var/list/cached_required_reagents = selected_reaction.required_reagents//update reagents list
var/list/cached_results = selected_reaction.results//resultant chemical list
var/special_react_result = selected_reaction.check_special_react(src)

View File

@@ -5,6 +5,9 @@
var/list/required_reagents = new/list()
var/list/required_catalysts = new/list()
/// Higher is higher priority, determines which order reactions are checked.
var/priority = CHEMICAL_REACTION_PRIORITY_DEFAULT
// Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things
var/required_container = null // the exact container path required for the reaction to happen
var/required_other = 0 // an integer required for the reaction to happen

View File

@@ -280,6 +280,7 @@
/datum/chemical_reaction/smoke_powder
name = "smoke_powder"
id = /datum/reagent/smoke_powder
priority = CHEMICAL_REACTION_PRIORITY_SMOKE
results = list(/datum/reagent/smoke_powder = 3)
required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/phosphorus = 1)

View File

@@ -254,7 +254,6 @@
var/static/regex/clap_words = regex("clap|applaud")
var/static/regex/honk_words = regex("ho+nk") //hooooooonk
var/static/regex/multispin_words = regex("like a record baby|right round")
var/static/regex/orgasm_words = regex("cum|orgasm|climax|squirt|heyo") //CITADEL CHANGE
var/static/regex/dab_words = regex("dab|mood") //CITADEL CHANGE
var/static/regex/snap_words = regex("snap") //CITADEL CHANGE
var/static/regex/bwoink_words = regex("what the fuck are you doing|bwoink|hey you got a moment?") //CITADEL CHANGE
@@ -572,16 +571,6 @@
var/mob/living/L = V
L.SpinAnimation(speed = 10, loops = 5)
//CITADEL CHANGES
//ORGASM
else if((findtext(message, orgasm_words)))
cooldown = COOLDOWN_MEME
for(var/V in listeners)
var/mob/living/carbon/human/H = V
if(H.client && H.client.prefs && H.client.prefs.cit_toggles & HYPNO) // probably a redundant check but for good measure
H.mob_climax(forced_climax=TRUE)
//DAB
else if((findtext(message, dab_words)))
cooldown = COOLDOWN_DAMAGE
@@ -765,7 +754,6 @@
var/static/regex/forget_words = regex("forget|muddled|awake and forget")
var/static/regex/attract_words = regex("come here|come to me|get over here|attract")
//phase 2
var/static/regex/orgasm_words = regex("cum|orgasm|climax|squirt|heyo") //wah, lewd
var/static/regex/awoo_words = regex("howl|awoo|bark")
var/static/regex/nya_words = regex("nya|meow|mewl")
var/static/regex/sleep_words = regex("sleep|slumber|rest")
@@ -1092,28 +1080,6 @@
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, L, "<span class='notice'>You are drawn towards [user]!</b></span>"), 5)
to_chat(user, "<span class='notice'><i>You draw [L] towards you!</i></span>")
//teir 2
/* removed for now
//ORGASM
else if((findtext(message, orgasm_words)))
for(var/V in listeners)
var/mob/living/carbon/human/H = V
var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall)
if(E.phase > 1)
if(E.lewd) // probably a redundant check but for good measure
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, H, "<span class='love'>Your [E.enthrallGender] pushes you over the limit, overwhelming your body with pleasure.</b></span>"), 5)
H.mob_climax(forced_climax=TRUE)
H.SetStun(20)
E.resistanceTally = 0 //makes resistance 0, but resets arousal, resistance buildup is faster unaroused (massively so).
E.enthrallTally += power_multiplier
E.cooldown += 6
else
H.throw_at(get_step_towards(user,H), 3 * power_multiplier, 1 * power_multiplier)
*/
//awoo
else if((findtext(message, awoo_words)))
for(var/V in listeners)

View File

@@ -76,7 +76,7 @@
play_sound = pick(pred_digest)
//Pref protection!
if (!M.vore_flags & DIGESTABLE || M.vore_flags & ABSORBED)
if (!CHECK_BITFIELD(M.vore_flags, DIGESTABLE) || M.vore_flags & ABSORBED)
continue
//Person just died in guts!

View File

@@ -116,7 +116,7 @@
testing("[user] attempted to feed [prey] to [pred], via [lowertext(belly.name)] but it went wrong.")
return
if (!prey.vore_flags & DEVOURABLE)
if (!CHECK_BITFIELD(prey.vore_flags, DEVOURABLE))
to_chat(user, "This can't be eaten!")
return FALSE

View File

@@ -50,6 +50,17 @@
-->
<div class="commit sansserif">
<h2 class="date">13 July 2020</h2>
<h3 class="author">Linzolle updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">you can no longer vore and digest people regardless of vore preferences</li>
</ul>
<h3 class="author">Owai-Seek updated:</h3>
<ul class="changes bgimages16">
<li class="tweak">Trashbags can now hold most shoes, and organs.</li>
<li class="balance">You can no longer nest nuke disks or hold brains in the trash.</li>
</ul>
<h2 class="date">12 July 2020</h2>
<h3 class="author">DeltaFire15 updated:</h3>
<ul class="changes bgimages16">

View File

@@ -26344,3 +26344,9 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
people.
zeroisthebiggay:
- bugfix: a singular stray pixel
2020-07-13:
Linzolle:
- bugfix: you can no longer vore and digest people regardless of vore preferences
Owai-Seek:
- tweak: Trashbags can now hold most shoes, and organs.
- balance: You can no longer nest nuke disks or hold brains in the trash.

View File

@@ -1,5 +0,0 @@
author: "Owai-Seek"
delete-after: True
changes:
- tweak: "Trashbags can now hold most shoes, and organs."
- balance: "You can no longer nest nuke disks or hold brains in the trash."

View File

@@ -0,0 +1,4 @@
author: "silicons"
delete-after: True
changes:
- bugfix: "circuit reagent heaters are now sanitized for temperature from 2.7 to 1000."

View File

@@ -0,0 +1,4 @@
author: "silicons"
delete-after: True
changes:
- rscadd: "chemical reactions now are sorted by priority first and temperature second."

View File

@@ -123,6 +123,7 @@
#include "code\__DEFINES\_flags\item_flags.dm"
#include "code\__DEFINES\_flags\obj_flags.dm"
#include "code\__DEFINES\admin\keybindings.dm"
#include "code\__DEFINES\chemistry\reactions.dm"
#include "code\__DEFINES\combat\attack_types.dm"
#include "code\__DEFINES\combat\block.dm"
#include "code\__DEFINES\combat\block_parry.dm"