This commit is contained in:
Putnam
2020-01-09 19:09:38 -08:00
487 changed files with 6417 additions and 6467 deletions

View File

@@ -28,7 +28,7 @@
"g" = (
/obj/structure/reagent_dispensers/water_cooler{
name = "punch cooler";
reagent_id = "bacchus_blessing"
reagent_id = /datum/reagent/consumable/ethanol/bacchus_blessing
},
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/wood{

View File

@@ -3410,7 +3410,7 @@
"lq" = (
/obj/structure/table,
/obj/item/reagent_containers/glass/beaker{
list_reagents = list("sacid" = 50)
list_reagents = list(/datum/reagent/toxin/acid = 50)
},
/obj/item/paper/crumpled/bloody/ruins/thederelict/unfinished,
/obj/item/pen,

View File

@@ -50,9 +50,7 @@
/area/survivalpod)
"l" = (
/obj/structure/tubes,
/obj/structure/chair/comfy/black{
dir = 8
},
/obj/machinery/recharge_station,
/turf/open/floor/pod,
/area/survivalpod)
"m" = (

View File

@@ -67,8 +67,7 @@
layer = 3
},
/obj/machinery/door/window/survival_pod{
dir = 1;
icon_state = "windoor"
dir = 1
},
/turf/open/floor/carpet/black,
/area/survivalpod)
@@ -133,7 +132,6 @@
/area/survivalpod)
"u" = (
/obj/machinery/door/window/survival_pod{
icon_state = "windoor";
dir = 1
},
/turf/open/floor/carpet/black,
@@ -169,10 +167,10 @@
/area/survivalpod)
"y" = (
/obj/structure/sink/kitchen{
icon_state = "sink_alt";
dir = 4;
pixel_x = -13
},
/obj/machinery/recharge_station/upgraded,
/turf/open/floor/carpet/black,
/area/survivalpod)
"z" = (

View File

@@ -268,6 +268,10 @@
/obj/structure/fans/tiny,
/turf/open/floor/carpet/black,
/area/survivalpod)
"T" = (
/obj/machinery/recharge_station/fullupgrade,
/turf/open/floor/carpet/black,
/area/survivalpod)
(1,1,1) = {"
a
@@ -287,7 +291,7 @@ b
f
q
s
x
T
y
D
F

View File

@@ -130,33 +130,24 @@
#define NECK (1<<11)
#define FULL_BODY (~0)
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
#define NORMAL_STYLE 0
#define ALT_STYLE 1
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
#define NO_FEMALE_UNIFORM 0
#define FEMALE_UNIFORM_FULL 1
#define FEMALE_UNIFORM_TOP 2
//flags for alternate styles: These are hard sprited so don't set this if you didn't put the effort in
#define NORMAL_STYLE 0
#define ALT_STYLE 1
#define NORMAL_SUIT_STYLE 0
#define DIGITIGRADE_SUIT_STYLE 1
//Tauric Specific suits
#define NOT_TAURIC 0
#define SNEK_TAURIC 1
#define PAW_TAURIC 2
#define HOOF_TAURIC 3
//Helmets/masks for muzzles or beaks
#define NORMAL_FACED 0
#define MUZZLE_FACED 1
#define BEAKED_FACED 2
//flags for outfits that have mutantrace variants (try not to use this): Currently only needed if you're trying to add tight fitting bootyshorts
#define NO_MUTANTRACE_VARIATION 0
#define MUTANTRACE_VARIATION 1
//flags for outfits that have mutantrace variants: These are hard sprited too.
#define STYLE_DIGITIGRADE (1<<0) //jumpsuits, suits and shoes
#define STYLE_MUZZLE (1<<1) //hats or masks
#define STYLE_SNEK_TAURIC (1<<2) //taur-friendly suits
#define STYLE_PAW_TAURIC (1<<3)
#define STYLE_HOOF_TAURIC (1<<4)
#define STYLE_ALL_TAURIC (STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC|STYLE_HOOF_TAURIC)
//digitigrade legs settings.
#define NOT_DIGITIGRADE 0
#define FULL_DIGITIGRADE 1
#define SQUISHED_DIGITIGRADE 2

View File

@@ -47,6 +47,7 @@
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.
#define INIT_ORDER_FAIL2TOPIC 22
#define INIT_ORDER_TITLE 20
#define INIT_ORDER_GARBAGE 19
#define INIT_ORDER_DBCORE 18

View File

@@ -78,7 +78,6 @@
if (CONFIG_GET(flag/log_manifest))
WRITE_LOG(GLOB.world_manifest_log, "[ckey] \\ [body.real_name] \\ [mind.assigned_role] \\ [mind.special_role ? mind.special_role : "NONE"] \\ [latejoin ? "LATEJOIN":"ROUNDSTART"]")
/proc/log_say(text)
if (CONFIG_GET(flag/log_say))
WRITE_LOG(GLOB.world_game_log, "SAY: [text]")
@@ -121,7 +120,6 @@
if (CONFIG_GET(flag/log_vote))
WRITE_LOG(GLOB.world_game_log, "VOTE: [text]")
/proc/log_topic(text)
WRITE_LOG(GLOB.world_game_log, "TOPIC: [text]")
@@ -141,6 +139,9 @@
if (CONFIG_GET(flag/log_job_debug))
WRITE_LOG(GLOB.world_job_debug_log, "JOB: [text]")
/proc/log_subsystem(subsystem, text)
WRITE_LOG(GLOB.subsystem_log, "[subsystem]: [text]")
/* Log to both DD and the logfile. */
/proc/log_world(text)
#ifdef USE_CUSTOM_ERROR_HANDLER

View File

@@ -43,6 +43,13 @@
var/static/blacklisted_areas = typecacheof(list(
/area/space,
))
if(creator)
if(creator.create_area_cooldown >= world.time)
to_chat(creator, "<span class='warning'>You're trying to create a new area a little too fast.</span>")
return
creator.create_area_cooldown = world.time + 10
var/list/turfs = detect_room(get_turf(creator), area_or_turf_fail_types)
if(!turfs)
to_chat(creator, "<span class='warning'>The new area must be completely airtight and not a part of a shuttle.</span>")

View File

@@ -97,6 +97,9 @@ GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
return sorttext(B.sample_object.name, A.sample_object.name)
/proc/cmp_reagents_asc(datum/reagent/a, datum/reagent/b)
return sorttext(initial(b.name),initial(a.name))
/proc/cmp_quirk_asc(datum/quirk/A, datum/quirk/B)
var/a_sign = num2sign(initial(A.value) * -1)
var/b_sign = num2sign(initial(B.value) * -1)

View File

@@ -61,26 +61,6 @@ GLOBAL_LIST_EMPTY(latejoiners) //CIT CHANGE - All latejoining people, for traito
var/mob/M = i
M.update_config_movespeed()
GLOBAL_LIST_INIT(noodle_taurs, list(
"Naga",
"Tentacle"
))
GLOBAL_LIST_INIT(paw_taurs, list(
"Fox",
"Wolf",
"Otie",
"Drake",
"Lab",
"Shepherd",
"Husky",
"Eevee",
"Panther",
"Horse",
"Cow",
"Tiger"
))
//blood types
GLOBAL_LIST_INIT(regular_bloods,list(
"O-",

View File

@@ -30,6 +30,8 @@ GLOBAL_VAR(world_virus_log)
GLOBAL_PROTECT(world_virus_log)
GLOBAL_VAR(world_map_error_log)
GLOBAL_PROTECT(world_map_error_log)
GLOBAL_VAR(subsystem_log)
GLOBAL_PROTECT(subsystem_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)

View File

@@ -236,7 +236,6 @@
if(!(M.config_tag in modes)) // ensure each mode is added only once
modes += M.config_tag
mode_names[M.config_tag] = M.name
probabilities[M.config_tag] = M.probability
mode_reports[M.config_tag] = M.generate_report()
if(probabilities[M.config_tag]>0)
mode_false_report_weight[M.config_tag] = M.false_report_weight
@@ -342,6 +341,9 @@
if(probabilities[M.config_tag]<=0)
qdel(M)
continue
if(M.config_tag in SSvote.stored_modetier_results && SSvote.stored_modetier_results[M.config_tag] < Get(/datum/config_entry/number/dropped_modes))
qdel(M)
continue
if(min_pop[M.config_tag])
M.required_players = min_pop[M.config_tag]
if(max_pop[M.config_tag])

View File

@@ -0,0 +1,19 @@
/datum/config_entry/number/fail2topic_rate_limit
config_entry_value = 10 //deciseconds
/datum/config_entry/number/fail2topic_max_fails
config_entry_value = 5
/datum/config_entry/string/fail2topic_rule_name
config_entry_value = "_dd_fail2topic"
protection = CONFIG_ENTRY_LOCKED //affects physical server configuration, no touchies!!
/datum/config_entry/flag/fail2topic_enabled
config_entry_value = TRUE
/datum/config_entry/number/topic_max_size
config_entry_value = 8192
/datum/config_entry/keyed_list/topic_rate_limit_whitelist
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG

View File

@@ -378,9 +378,9 @@
/datum/config_entry/keyed_list/box_random_engine
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
value_mode = VALUE_MODE_NUM
lowercase = FALSE
splitter = "-"
splitter = ","
/datum/config_entry/number/auto_transfer_delay
config_entry_value = 72000
@@ -394,3 +394,9 @@
/datum/config_entry/flag/allow_clockwork_marauder_on_station
config_entry_value = TRUE
/datum/config_entry/flag/modetier_voting
config_entry_value = TRUE
/datum/config_entry/number/dropped_modes
config_entry_value = 3

View File

@@ -54,7 +54,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/static/restart_clear = 0
var/static/restart_timeout = 0
var/static/restart_count = 0
var/static/random_seed
//current tick limit, assigned before running a subsystem.
@@ -69,7 +69,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if(!random_seed)
random_seed = (TEST_RUN_PARAMETER in world.params) ? 29051994 : rand(1, 1e9)
rand_seed(random_seed)
var/list/_subsystems = list()
subsystems = _subsystems
if (Master != src)

View File

@@ -155,6 +155,8 @@
if(SS_SLEEPING)
state = SS_PAUSING
/datum/controller/subsystem/proc/subsystem_log(msg)
return log_subsystem(name, msg)
//used to initialize the subsystem AFTER the map has loaded
/datum/controller/subsystem/Initialize(start_timeofday)
@@ -162,7 +164,7 @@
var/time = (REALTIMEOFDAY - start_timeofday) / 10
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
to_chat(world, "<span class='boldannounce'>[msg]</span>")
log_world(msg)
log_subsystem("INIT", msg)
return time
//hook for printing stats to the "MC" statuspanel for admins to see performance and related stats etc.

View File

@@ -0,0 +1,113 @@
SUBSYSTEM_DEF(fail2topic)
name = "Fail2Topic"
init_order = INIT_ORDER_FAIL2TOPIC
flags = SS_BACKGROUND
runlevels = ALL
var/list/rate_limiting = list()
var/list/fail_counts = list()
var/list/active_bans = list()
var/rate_limit
var/max_fails
var/rule_name
var/enabled = FALSE
/datum/controller/subsystem/fail2topic/Initialize(timeofday)
rate_limit = CONFIG_GET(number/fail2topic_rate_limit)
max_fails = CONFIG_GET(number/fail2topic_max_fails)
rule_name = CONFIG_GET(string/fail2topic_rule_name)
enabled = CONFIG_GET(flag/fail2topic_enabled)
DropFirewallRule() // Clear the old bans if any still remain
if (world.system_type == UNIX && enabled)
enabled = FALSE
subsystem_log("DISABLED - UNIX systems are not supported.")
if(!enabled)
flags |= SS_NO_FIRE
can_fire = FALSE
return ..()
/datum/controller/subsystem/fail2topic/fire()
while (rate_limiting.len)
var/ip = rate_limiting[1]
var/last_attempt = rate_limiting[ip]
if (world.time - last_attempt > rate_limit)
rate_limiting -= ip
fail_counts -= ip
if (MC_TICK_CHECK)
return
/datum/controller/subsystem/fail2topic/Shutdown()
DropFirewallRule()
/datum/controller/subsystem/fail2topic/proc/IsRateLimited(ip)
var/last_attempt = rate_limiting[ip]
var/static/datum/config_entry/keyed_list/topic_rate_limit_whitelist/cached_whitelist_entry
if(!istype(cached_whitelist_entry))
cached_whitelist_entry = CONFIG_GET(keyed_list/topic_rate_limit_whitelist)
if(istype(cached_whitelist_entry))
if(cached_whitelist_entry.config_entry_value[ip])
return FALSE
if (active_bans[ip])
return TRUE
rate_limiting[ip] = world.time
if (isnull(last_attempt))
return FALSE
if (world.time - last_attempt > rate_limit)
fail_counts -= ip
return FALSE
else
var/failures = fail_counts[ip]
if (isnull(failures))
fail_counts[ip] = 1
return TRUE
else if (failures > max_fails)
BanFromFirewall(ip)
return TRUE
else
fail_counts[ip] = failures + 1
return TRUE
/datum/controller/subsystem/fail2topic/proc/BanFromFirewall(ip)
if (!enabled)
return
active_bans[ip] = world.time
fail_counts -= ip
rate_limiting -= ip
. = shell("netsh advfirewall firewall add rule name=\"[rule_name]\" dir=in interface=any action=block remoteip=[ip]")
if (.)
subsystem_log("Failed to ban [ip]. Exit code: [.].")
else if (isnull(.))
subsystem_log("Failed to invoke shell to ban [ip].")
else
subsystem_log("Banned [ip].")
/datum/controller/subsystem/fail2topic/proc/DropFirewallRule()
if (!enabled)
return
active_bans = list()
. = shell("netsh advfirewall firewall delete rule name=\"[rule_name]\"")
if (.)
subsystem_log("Failed to drop firewall rule. Exit code: [.].")
else if (isnull(.))
subsystem_log("Failed to invoke shell for firewall rule drop.")
else
subsystem_log("Firewall rule dropped.")

View File

@@ -221,6 +221,12 @@ SUBSYSTEM_DEF(ticker)
var/init_start = world.timeofday
//Create and announce mode
var/list/datum/game_mode/runnable_modes
if(SSvote.mode && (SSvote.mode == "roundtype" || SSvote.mode == "dynamic" || SSvote.mode == "mode tiers"))
SSvote.result()
SSpersistence.SaveSavedVotes()
for(var/client/C in SSvote.voting)
C << browse(null, "window=vote;can_close=0")
SSvote.reset()
if(GLOB.master_mode == "random" || GLOB.master_mode == "secret")
runnable_modes = config.get_runnable_modes()
@@ -484,9 +490,10 @@ SUBSYSTEM_DEF(ticker)
SSticker.modevoted = TRUE
var/dynamic = CONFIG_GET(flag/dynamic_voting)
if(dynamic)
SSvote.initiate_vote("dynamic","server",hideresults=TRUE,votesystem=SCORE_VOTING,forced=TRUE,vote_time = 2 MINUTES)
SSvote.initiate_vote("dynamic","server",hideresults=TRUE,votesystem=SCORE_VOTING,forced=TRUE,vote_time = 20 MINUTES)
else
SSvote.initiate_vote("roundtype","server",hideresults=TRUE,votesystem=PLURALITY_VOTING,forced=TRUE, vote_time = 2 MINUTES)
SSvote.initiate_vote("roundtype","server",hideresults=TRUE,votesystem=PLURALITY_VOTING,forced=TRUE, \
vote_time = (CONFIG_GET(flag/modetier_voting) ? 1 MINUTES : 20 MINUTES))
/datum/controller/subsystem/ticker/Recover()
current_state = SSticker.current_state

View File

@@ -15,6 +15,7 @@ SUBSYSTEM_DEF(vote)
var/vote_system = PLURALITY_VOTING
var/question = null
var/list/choices = list()
var/list/scores = list()
var/list/choice_descs = list() // optional descriptions
var/list/voted = list()
var/list/voting = list()
@@ -26,6 +27,8 @@ SUBSYSTEM_DEF(vote)
var/list/stored_gamemode_votes = list() //Basically the last voted gamemode is stored here for end-of-round use.
var/list/stored_modetier_results = list() // The aggregated tier list of the modes available in secret.
/datum/controller/subsystem/vote/fire() //called by master_controller
if(mode)
if(end_time < world.time)
@@ -33,7 +36,8 @@ SUBSYSTEM_DEF(vote)
SSpersistence.SaveSavedVotes()
for(var/client/C in voting)
C << browse(null, "window=vote;can_close=0")
reset()
if(end_time < world.time) // result() can change this
reset()
else if(next_pop < world.time)
var/datum/browser/client_popup
for(var/client/C in voting)
@@ -54,6 +58,7 @@ SUBSYSTEM_DEF(vote)
choice_descs.Cut()
voted.Cut()
voting.Cut()
scores.Cut()
obfuscated = FALSE //CIT CHANGE - obfuscated votes
remove_action_buttons()
@@ -116,10 +121,8 @@ SUBSYSTEM_DEF(vote)
var/opposite_pref = d[j][i]
if(pref_number>opposite_pref)
p[i][j] = d[i][j]
p[j][i] = 0
else
p[i][j] = 0
p[j][i] = d[i][j]
for(var/i in 1 to choices.len)
for(var/j in 1 to choices.len)
if(i != j)
@@ -180,6 +183,22 @@ SUBSYSTEM_DEF(vote)
score.Cut(median_pos,median_pos+1)
choices[score_name]++
/datum/controller/subsystem/vote/proc/calculate_scores(var/blackbox_text)
var/list/scores_by_choice = list()
for(var/choice in choices)
scores_by_choice[choice] = list()
for(var/ckey in voted)
var/list/this_vote = voted[ckey]
for(var/choice in this_vote)
sorted_insert(scores_by_choice[choice],this_vote[choice],/proc/cmp_numeric_asc)
var/middle_score = round(GLOB.vote_score_options.len/2,1)
for(var/score_name in scores_by_choice)
var/list/score = scores_by_choice[score_name]
for(var/S in score)
scores[score_name] += S-middle_score
SSblackbox.record_feedback("nested tally","voting",scores[score_name],list(blackbox_text,"Total scores",score_name))
/datum/controller/subsystem/vote/proc/announce_result()
var/vote_title_text
var/text
@@ -234,6 +253,8 @@ SUBSYSTEM_DEF(vote)
var/admintext = "Obfuscated results"
if(vote_system == RANKED_CHOICE_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes (impossible in ranked choice) but the score determined by the schulze method of voting, so the numbers will look weird!"
else if(vote_system == SCORE_VOTING)
admintext += "\nIt should be noted that this is not a raw tally of votes but the number of runoffs done by majority judgement!"
for(var/i=1,i<=choices.len,i++)
var/votes = choices[choices[i]]
admintext += "\n<b>[choices[i]]:</b> [votes]"
@@ -252,6 +273,12 @@ SUBSYSTEM_DEF(vote)
SSticker.save_mode(.)
message_admins("The gamemode has been voted for, and has been changed to: [GLOB.master_mode]")
log_admin("Gamemode has been voted for and switched to: [GLOB.master_mode].")
if(CONFIG_GET(flag/modetier_voting))
reset()
started_time = 0
initiate_vote("mode tiers","server",hideresults=FALSE,votesystem=RANKED_CHOICE_VOTING,forced=TRUE, vote_time = 30 MINUTES)
to_chat(world,"<b>The vote will end right as the round starts.</b>")
return .
if("restart")
if(. == "Restart Round")
restart = 1
@@ -262,6 +289,8 @@ SUBSYSTEM_DEF(vote)
restart = 1
else
GLOB.master_mode = .
if("mode tiers")
stored_modetier_results = choices.Copy()
if("dynamic")
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started.
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
@@ -382,6 +411,13 @@ SUBSYSTEM_DEF(vote)
choices |= M
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("secret", "extended")
if("mode tiers")
var/list/modes_to_add = config.votable_modes
var/list/probabilities = CONFIG_GET(keyed_list/probability)
for(var/tag in modes_to_add)
if(probabilities[tag] <= 0)
modes_to_add -= tag
choices.Add(modes_to_add)
if("dynamic")
for(var/T in config.storyteller_cache)
var/datum/dynamic_storyteller/S = T

View File

@@ -947,21 +947,25 @@
if(A.reagents)
var/chosen_id
var/list/reagent_options = sortList(GLOB.chemical_reagents_list)
switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID"))
if("Enter ID")
switch(alert(usr, "Choose a method.", "Add Reagents", "Search", "Choose from a list", "I'm feeling lucky"))
if("Search")
var/valid_id
while(!valid_id)
chosen_id = stripped_input(usr, "Enter the ID of the reagent you want to add.")
if(!chosen_id) //Get me out of here!
chosen_id = input(usr, "Enter the ID of the reagent you want to add.", "Search reagents") as null|text
if(isnull(chosen_id)) //Get me out of here!
break
for(var/ID in reagent_options)
if(ID == chosen_id)
valid_id = 1
if(!ispath(text2path(chosen_id)))
chosen_id = pick_closest_path(chosen_id, make_types_fancy(subtypesof(/datum/reagent)))
if(ispath(chosen_id))
valid_id = TRUE
else
valid_id = TRUE
if(!valid_id)
to_chat(usr, "<span class='warning'>A reagent with that ID doesn't exist!</span>")
if("Choose ID")
chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in reagent_options
if("Choose from a list")
chosen_id = input(usr, "Choose a reagent to add.", "Choose a reagent.") as null|anything in subtypesof(/datum/reagent)
if("I'm feeling lucky")
chosen_id = pick(subtypesof(/datum/reagent))
if(chosen_id)
var/amount = input(usr, "Choose the amount to add.", "Choose the amount.", A.reagents.maximum_volume) as num
if(amount)

View File

@@ -103,7 +103,7 @@
if(!(spread_flags & DISEASE_SPREAD_AIRBORNE) && !force_spread)
return
if(affected_mob.reagents.has_reagent("spaceacillin") || (affected_mob.satiety > 0 && prob(affected_mob.satiety/10)))
if(affected_mob.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) || (affected_mob.satiety > 0 && prob(affected_mob.satiety/10)))
return
var/spread_range = 2

View File

@@ -36,37 +36,41 @@
// The order goes from easy to cure to hard to cure. Keep in mind that sentient diseases pick two cures from tier 6 and up, ensure they wont react away in bodies.
var/static/list/advance_cures = list(
list( // level 1
"copper", "silver", "iodine", "iron", "carbon"
/datum/reagent/copper, /datum/reagent/silver, /datum/reagent/iodine, /datum/reagent/iron, /datum/reagent/carbon
),
list( // level 2
"potassium", "ethanol", "lithium", "silicon", "bromine"
/datum/reagent/potassium, /datum/reagent/consumable/ethanol, /datum/reagent/lithium,
/datum/reagent/silicon, /datum/reagent/bromine
),
list( // level 3
"sodiumchloride", "sugar", "orangejuice", "tomatojuice", "milk"
/datum/reagent/consumable/sodiumchloride, /datum/reagent/consumable/sugar, /datum/reagent/consumable/orangejuice,
/datum/reagent/consumable/tomatojuice, /datum/reagent/consumable/milk
),
list( //level 4
"spaceacillin", "salglu_solution", "epinephrine", "charcoal"
/datum/reagent/medicine/spaceacillin, /datum/reagent/medicine/salglu_solution,
/datum/reagent/medicine/epinephrine, /datum/reagent/medicine/charcoal
),
list( //level 5
"oil", "synaptizine", "mannitol", "space_drugs", "cryptobiolin"
/datum/reagent/oil, /datum/reagent/medicine/synaptizine, /datum/reagent/medicine/mannitol,
/datum/reagent/drug/space_drugs, /datum/reagent/cryptobiolin
),
list( // level 6
"phenol", "inacusiate", "oculine", "antihol"
/datum/reagent/phenol, /datum/reagent/medicine/inacusiate, /datum/reagent/medicine/oculine, /datum/reagent/medicine/antihol
),
list( // level 7
"leporazine", "mindbreaker", "corazone"
/datum/reagent/medicine/leporazine, /datum/reagent/toxin/mindbreaker, /datum/reagent/medicine/corazone
),
list( // level 8
"pax", "happiness", "ephedrine"
/datum/reagent/pax, /datum/reagent/drug/happiness, /datum/reagent/medicine/ephedrine
),
list( // level 9
"lipolicide", "sal_acid"
/datum/reagent/toxin/lipolicide, /datum/reagent/medicine/sal_acid
),
list( // level 10
"haloperidol", "aranesp", "diphenhydramine"
/datum/reagent/medicine/haloperidol, /datum/reagent/drug/aranesp, /datum/reagent/medicine/diphenhydramine
),
list( //level 11
"modafinil", "anacea"
/datum/reagent/medicine/modafinil, /datum/reagent/toxin/anacea
)
)

View File

@@ -138,7 +138,7 @@ Bonus
var/get_damage = rand(15,21) * power
M.adjustOxyLoss(get_damage)
if(paralysis)
M.reagents.add_reagent_list(list("pancuronium" = 3, "sodium_thiopental" = 3))
M.reagents.add_reagent_list(list(/datum/reagent/toxin/pancuronium = 3, /datum/reagent/toxin/sodium_thiopental = 3))
return 1
/datum/symptom/asphyxiation/proc/Asphyxiate_death(mob/living/M, datum/disease/advance/A)

View File

@@ -156,7 +156,7 @@ Bonus
M.adjust_fire_stacks(get_stacks)
M.adjustFireLoss(get_stacks/2)
if(chems)
M.reagents.add_reagent("clf3", 2 * power)
M.reagents.add_reagent(/datum/reagent/clf3, 2 * power)
return 1
/datum/symptom/alkali/proc/Alkali_fire_stage_5(mob/living/M, datum/disease/advance/A)
@@ -164,5 +164,5 @@ Bonus
M.adjust_fire_stacks(get_stacks)
M.adjustFireLoss(get_stacks)
if(chems)
M.reagents.add_reagent_list(list("napalm" = 4 * power, "clf3" = 4 * power))
M.reagents.add_reagent_list(list(/datum/reagent/napalm = 4 * power, /datum/reagent/clf3 = 4 * power))
return 1

View File

@@ -124,7 +124,7 @@ Bonus
var/get_damage = rand(6,10)
M.adjustBruteLoss(get_damage)
if(chems)
M.reagents.add_reagent_list(list("heparin" = 2, "lipolicide" = 2))
M.reagents.add_reagent_list(list(/datum/reagent/toxin/heparin = 2, /datum/reagent/toxin/lipolicide = 2))
if(zombie)
M.reagents.add_reagent("romerol", 1)
M.reagents.add_reagent(/datum/reagent/romerol, 1)
return 1

View File

@@ -117,8 +117,9 @@
power = 2
/datum/symptom/heal/chem/Heal(mob/living/M, datum/disease/advance/A, actual_power)
for(var/datum/reagent/R in M.reagents.reagent_list) //Not just toxins!
M.reagents.remove_reagent(R.id, actual_power)
for(var/E in M.reagents.reagent_list) //Not just toxins!
var/datum/reagent/R = E
M.reagents.remove_reagent(R.type, actual_power)
if(food_conversion)
M.nutrition += 0.3
if(prob(2))
@@ -329,11 +330,11 @@
if(M.fire_stacks < 0)
M.fire_stacks = min(M.fire_stacks + 1 * absorption_coeff, 0)
. += power
if(M.reagents.has_reagent("holywater"))
M.reagents.remove_reagent("holywater", 0.5 * absorption_coeff)
if(M.reagents.has_reagent(/datum/reagent/water/holywater))
M.reagents.remove_reagent(/datum/reagent/water/holywater, 0.5 * absorption_coeff)
. += power * 0.75
else if(M.reagents.has_reagent("water"))
M.reagents.remove_reagent("water", 0.5 * absorption_coeff)
else if(M.reagents.has_reagent(/datum/reagent/water))
M.reagents.remove_reagent(/datum/reagent/water, 0.5 * absorption_coeff)
. += power * 0.5
/datum/symptom/heal/water/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
@@ -392,7 +393,7 @@
plasmamount = environment.gases[/datum/gas/plasma]
if(plasmamount && plasmamount > GLOB.meta_gas_visibility[/datum/gas/plasma]) //if there's enough plasma in the air to see
. += power * 0.5
if(M.reagents.has_reagent("plasma"))
if(M.reagents.has_reagent(/datum/reagent/toxin/plasma))
. += power * 0.75
/datum/symptom/heal/plasma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)

View File

@@ -44,10 +44,10 @@
if(A.stage >= 4)
M.drowsyness = max(0, M.drowsyness - 2)
if(M.reagents.has_reagent("mindbreaker"))
M.reagents.remove_reagent("mindbreaker", 5)
if(M.reagents.has_reagent("histamine"))
M.reagents.remove_reagent("histamine", 5)
if(M.reagents.has_reagent(/datum/reagent/toxin/mindbreaker))
M.reagents.remove_reagent(/datum/reagent/toxin/mindbreaker, 5)
if(M.reagents.has_reagent(/datum/reagent/toxin/histamine))
M.reagents.remove_reagent(/datum/reagent/toxin/histamine, 5)
M.hallucination = max(0, M.hallucination - 10)
if(A.stage >= 5)

View File

@@ -5,7 +5,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Ethanol"
cures = list("ethanol")
cures = list(/datum/reagent/consumable/ethanol)
agent = "Excess Lepidopticides"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate butterflies."

View File

@@ -5,7 +5,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Sugar"
cures = list("sugar")
cures = list(/datum/reagent/consumable/sugar)
agent = "Apidae Infection"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate bees."

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Mannitol"
cures = list("mannitol")
cures = list(/datum/reagent/medicine/mannitol)
agent = "Cryptococcus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
cure_chance = 15//higher chance to cure, since two reagents are required

View File

@@ -2,7 +2,7 @@
name = "The Cold"
max_stages = 3
cure_text = "Rest & Spaceacillin"
cures = list("spaceacillin")
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "XY-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
permeability_mod = 0.5

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Common Cold Anti-bodies & Spaceacillin"
cures = list("spaceacillin")
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "ICE9-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated the subject will slow, as if partly frozen."

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Mutadone"
cures = list("mutadone")
cures = list(/datum/reagent/medicine/mutadone)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
agent = "S4E1 retrovirus"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
cures = list("synaptizine","sulfur")
cures = list(/datum/reagent/medicine/synaptizine,/datum/reagent/sulfur)
agent = "Gravitokinetic Bipotential SADS-"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated death will occur."

View File

@@ -3,7 +3,7 @@
max_stages = 3
spread_text = "Airborne"
cure_text = "Spaceacillin"
cures = list("spaceacillin")
cures = list(/datum/reagent/medicine/spaceacillin)
cure_chance = 10
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)

View File

@@ -3,7 +3,7 @@
max_stages = 3
spread_text = "Airborne"
cure_text = "Spaceacillin & Anti-bodies to the common flu"
cures = list("spaceacillin")
cures = list(/datum/reagent/medicine/spaceacillin)
cure_chance = 10
agent = "1nqu1s1t10n flu virion"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Synaptizine & Sulfur"
cures = list("synaptizine","sulfur")
cures = list(/datum/reagent/medicine/synaptizine,/datum/reagent/sulfur)
cure_chance = 15//higher chance to cure, since two reagents are required
agent = "Gravitokinetic Bipotential SADS+"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -58,7 +58,7 @@
H.visible_message("<span class='userdanger'>[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping!</span>")
H.adjustStaminaLoss(60)
H.set_heartattack(TRUE)
H.reagents.add_reagent("corazone", 3) // To give the victim a final chance to shock their heart before losing consciousness
H.reagents.add_reagent(/datum/reagent/medicine/corazone, 3) // To give the victim a final chance to shock their heart before losing consciousness
cure()
else

View File

@@ -3,7 +3,7 @@
max_stages = 4
spread_text = "Airborne"
cure_text = "Iron"
cures = list("iron")
cures = list(/datum/reagent/iron)
agent = "Fukkos Miracos"
viable_mobtypes = list(/mob/living/carbon/human)
disease_flags = CAN_CARRY|CAN_RESIST|CURABLE

View File

@@ -5,7 +5,7 @@
spread_flags = DISEASE_SPREAD_SPECIAL
disease_flags = CURABLE
cure_text = "Holy Water."
cures = list("holywater")
cures = list(/datum/reagent/water/holywater)
cure_chance = 20
agent = "Avian Vengence"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -3,7 +3,7 @@
max_stages = 4
spread_text = "Airborne"
cure_text = "Banana products, especially banana bread."
cures = list("banana")
cures = list(/datum/reagent/consumable/banana)
cure_chance = 75
agent = "H0NI<42 Virus"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -17,7 +17,7 @@
..()
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
if(prob(40))
cures = list("mutadone")
cures = list(/datum/reagent/medicine/mutadone)
else
restcure = 1

View File

@@ -4,7 +4,7 @@
spread_text = "On contact"
spread_flags = DISEASE_SPREAD_BLOOD | DISEASE_SPREAD_CONTACT_SKIN | DISEASE_SPREAD_CONTACT_FLUIDS
cure_text = "Chick Chicky Boom!"
cures = list("plasma")
cures = list(/datum/reagent/toxin/plasma)
agent = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 1

View File

@@ -93,7 +93,7 @@
/datum/disease/transformation/jungle_fever
name = "Jungle Fever"
cure_text = "Death."
cures = list("adminordrazine")
cures = list(/datum/reagent/medicine/adminordrazine)
spread_text = "Monkey Bites"
spread_flags = DISEASE_SPREAD_SPECIAL
viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human)
@@ -156,7 +156,7 @@
name = "Robotic Transformation"
cure_text = "An injection of copper."
cures = list("copper")
cures = list(/datum/reagent/copper)
cure_chance = 5
agent = "R2D2 Nanomachines"
desc = "This disease, actually acute nanomachine infection, converts the victim into a cyborg."
@@ -189,7 +189,7 @@
name = "Xenomorph Transformation"
cure_text = "Spaceacillin & Glycerol"
cures = list("spaceacillin", "glycerol")
cures = list(/datum/reagent/medicine/spaceacillin, /datum/reagent/glycerol)
cure_chance = 5
agent = "Rip-LEY Alien Microbes"
desc = "This disease changes the victim into a xenomorph."
@@ -218,7 +218,7 @@
/datum/disease/transformation/slime
name = "Advanced Mutation Transformation"
cure_text = "frost oil"
cures = list("frostoil")
cures = list(/datum/reagent/consumable/frostoil)
cure_chance = 80
agent = "Advanced Mutation Toxin"
desc = "This highly concentrated extract converts anything into more of itself."
@@ -247,7 +247,7 @@
/datum/disease/transformation/corgi
name = "The Barkening"
cure_text = "Death"
cures = list("adminordrazine")
cures = list(/datum/reagent/medicine/adminordrazine)
agent = "Fell Doge Majicks"
desc = "This disease transforms the victim into a corgi."
severity = DISEASE_SEVERITY_BIOHAZARD
@@ -272,7 +272,7 @@
/datum/disease/transformation/morph
name = "Gluttony's Blessing"
cure_text = "nothing"
cures = list("adminordrazine")
cures = list(/datum/reagent/medicine/adminordrazine)
agent = "Gluttony's Blessing"
desc = "A 'gift' from somewhere terrible."
stage_prob = 20
@@ -289,7 +289,7 @@
/datum/disease/transformation/gondola
name = "Gondola Transformation"
cure_text = "Condensed Capsaicin, ingested or injected." //getting pepper sprayed doesn't help
cures = list("condensedcapsaicin") //beats the hippie crap right out of your system
cures = list(/datum/reagent/consumable/condensedcapsaicin) //beats the hippie crap right out of your system
cure_chance = 80
stage_prob = 5
agent = "Tranquility"
@@ -310,17 +310,17 @@
if (prob(5))
affected_mob.emote("smile")
if (prob(20))
affected_mob.reagents.add_reagent_list(list("pax" = 5))
affected_mob.reagents.add_reagent(/datum/reagent/pax, 5)
if(3)
if (prob(5))
affected_mob.emote("smile")
if (prob(20))
affected_mob.reagents.add_reagent_list(list("pax" = 5))
affected_mob.reagents.add_reagent(/datum/reagent/pax, 5)
if(4)
if (prob(5))
affected_mob.emote("smile")
if (prob(20))
affected_mob.reagents.add_reagent_list(list("pax" = 5))
affected_mob.reagents.add_reagent(/datum/reagent/pax, 5)
if (prob(2))
to_chat(affected_mob, "<span class='danger'>You let go of what you were holding.</span>")
var/obj/item/I = affected_mob.get_active_held_item()

View File

@@ -4,7 +4,7 @@
max_stages = 5
spread_text = "Airborne"
cure_text = "Spaceacillin & salbutamol"
cures = list("spaceacillin", "salbutamol")
cures = list(/datum/reagent/medicine/spaceacillin, /datum/reagent/medicine/salbutamol)
agent = "Fungal Tubercle bacillus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
cure_chance = 5//like hell are you getting out of hell

View File

@@ -3,7 +3,7 @@
max_stages = 4
spread_text = "Airborne"
cure_text = "The Manly Dorf"
cures = list("manlydorf")
cures = list(/datum/reagent/consumable/ethanol/manly_dorf)
cure_chance = 100
agent = "Rincewindus Vulgaris"
viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -0,0 +1,60 @@
/datum/element/wuv //D'awwwww
element_flags = ELEMENT_BESPOKE
id_arg_index = 2
//the for the me emote proc call when petted.
var/pet_emote
//whether the emote is visible or audible
var/pet_type
//same as above, except when harmed. "You are going into orbit, you stupid mutt!"
var/punt_emote
//same as pet_type
var/punt_type
//mood typepath for the moodlet signal when petted.
var/pet_moodlet
//same as above but for harm
var/punt_moodlet
/datum/element/wuv/Attach(datum/target, pet, pet_t, pet_mood, punt, punt_t, punt_mood)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE
pet_emote = pet
pet_type = pet_t
punt_emote = punt
punt_type = punt_t
pet_moodlet = pet_mood
punt_moodlet = punt_mood
RegisterSignal(target, COMSIG_MOB_ATTACK_HAND, .proc/on_attack_hand)
/datum/element/wuv/proc/on_attack_hand(datum/source, mob/user)
var/mob/living/L = source
if(L.stat == DEAD)
return
//we want to delay the effect to be displayed after the mob is petted, not before.
switch(user.a_intent)
if(INTENT_HARM, INTENT_DISARM)
addtimer(CALLBACK(src, .proc/kick_the_dog, source, user), 1)
if(INTENT_HELP)
addtimer(CALLBACK(src, .proc/pet_the_dog, source, user), 1)
/datum/element/wuv/proc/pet_the_dog(mob/target, mob/user)
if(!QDELETED(target) || !QDELETED(user) || target.stat != CONSCIOUS)
return
new /obj/effect/temp_visual/heart(target.loc)
if(pet_emote)
target.emote("me", pet_type, pet_emote)
if(pet_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1)) //prevents unlimited happiness petting park exploit.
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, pet_moodlet, target)
/datum/element/wuv/proc/kick_the_dog(mob/target, mob/user)
if(!QDELETED(target) || !QDELETED(user) || target.stat != CONSCIOUS)
return
if(punt_emote)
target.emote("me", punt_type, punt_emote)
if(punt_moodlet && !CHECK_BITFIELD(target.flags_1, HOLOGRAM_1))
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, target, punt_moodlet, target)

View File

@@ -525,7 +525,7 @@
if(!objective)
to_chat(usr,"Invalid objective.")
return
//qdel(objective) Needs cleaning objective destroys
qdel(objective) //TODO: Needs cleaning objective destroys (whatever that means)
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")

View File

@@ -23,10 +23,13 @@
mood_change = 3
timeout = 3000
/datum/mood_event/pet_corgi
description = "<span class='nicegreen'>Corgis are adorable! I can't stop petting them!</span>\n"
mood_change = 3
timeout = 3000
/datum/mood_event/pet_animal
description = "<span class='nicegreen'>Animals are adorable! I can't stop petting them!</span>\n"
mood_change = 2
timeout = 5 MINUTES
/datum/mood_event/pet_animal/add_effects(mob/animal)
description = "<span class='nicegreen'>\The [animal.name] is adorable! I can't stop petting [animal.p_them()]!</span>\n"
/datum/mood_event/honk
description = "<span class='nicegreen'>Maybe clowns aren't so bad after all. Honk!</span>\n"

View File

@@ -88,7 +88,7 @@
var/obj/result_obj = new result(container)
for (var/obj/O in (container.contents-result_obj))
if (O.reagents)
O.reagents.del_reagent("nutriment")
O.reagents.del_reagent(/datum/reagent/consumable/nutriment)
O.reagents.update_total()
O.reagents.trans_to(result_obj, O.reagents.total_volume)
qdel(O)

View File

@@ -8,29 +8,29 @@
/datum/map_template/ruin/station/box/engine
id = "engine_sm"
suffix = "Box/Engine/engine_sm.dmm"
name = "Engine SM"
name = "Box SM"
/datum/map_template/ruin/station/box/engine/onebythree
id = "engine_sm_1x3"
suffix = "Box/Engine/engine_sm_1x3.dmm"
name = "Engine SM 1x3"
name = "Box SM 1x3"
/datum/map_template/ruin/station/box/engine/fivebyfive
id = "engine_sm_5x5"
suffix = "Box/Engine/engine_sm_5x5.dmm"
name = "Engine SM 5x5"
name = "Box SM 5x5"
/datum/map_template/ruin/station/box/engine/threesm
id = "engine_sm_3x"
suffix = "Box/Engine/engine_sm_3x.dmm"
name = "Engine SM 3x"
name = "Box SM 3x"
/datum/map_template/ruin/station/box/engine/singulo
id = "engine_singulo"
suffix = "Box/Engine/engine_singulo.dmm"
name = "Engine Singulo"
name = "Box Singulo"
/datum/map_template/ruin/station/box/engine/tesla
id = "engine_tesla"
suffix = "Box/Engine/engine_tesla.dmm"
name = "Engine Tesla"
name = "Box Tesla"

View File

@@ -99,6 +99,12 @@
id = "Mesmerize"
alert_type = /obj/screen/alert/status_effect/mesmerized
/datum/status_effect/no_combat_mode/mesmerize/on_apply()
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
/datum/status_effect/no_combat_mode/mesmerize/on_remove()
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
/obj/screen/alert/status_effect/mesmerized
name = "Mesmerized"
desc = "You cant tear your sight from who is in front of you...Their gaze is simply too enthralling.."
@@ -302,7 +308,7 @@
/datum/status_effect/cultghost/tick()
if(owner.reagents)
owner.reagents.del_reagent("holywater") //can't be deconverted
owner.reagents.del_reagent(/datum/reagent/water/holywater) //can't be deconverted
/datum/status_effect/crusher_mark
id = "crusher_mark"

View File

@@ -289,7 +289,7 @@
medical_record_text = "Patient suffers from acute Reality Dissociation Syndrome and experiences vivid hallucinations."
/datum/quirk/insanity/on_process()
if(quirk_holder.reagents.has_reagent("mindbreaker"))
if(quirk_holder.reagents.has_reagent(/datum/reagent/toxin/mindbreaker))
quirk_holder.hallucination = 0
return
if(prob(2)) //we'll all be mad soon enough

View File

@@ -122,6 +122,15 @@
gain_text = "<span class='notice'>You feel like exposing yourself to the world.</span>"
lose_text = "<span class='notice'>Indecent exposure doesn't sound as charming to you anymore.</span>"
/datum/quirk/coldblooded
name = "Cold-blooded"
desc = "Your body doesn't create its own internal heat, requiring external heat regulation."
value = 0
medical_record_text = "Patient is ectothermic."
mob_trait = TRAIT_COLDBLOODED
gain_text = "<span class='notice'>You feel cold-blooded.</span>"
lose_text = "<span class='notice'>You feel more warm-blooded.</span>"
/datum/quirk/alcohol_intolerance
name = "Alcohol Intolerance"
desc = "You take toxin damage from alcohol rather than getting drunk."

View File

@@ -25,16 +25,16 @@
var/key_valid
var/require_comms_key = FALSE
/datum/world_topic/proc/TryRun(list/input)
/datum/world_topic/proc/TryRun(list/input, addr)
key_valid = config && (CONFIG_GET(string/comms_key) == input["key"])
if(require_comms_key && !key_valid)
return "Bad Key"
input -= "key"
. = Run(input)
. = Run(input, addr)
if(islist(.))
. = list2params(.)
/datum/world_topic/proc/Run(list/input)
/datum/world_topic/proc/Run(list/input, addr)
CRASH("Run() not implemented for [type]!")
// TOPICS
@@ -43,7 +43,7 @@
keyword = "ping"
log = FALSE
/datum/world_topic/ping/Run(list/input)
/datum/world_topic/ping/Run(list/input, addr)
. = 0
for (var/client/C in GLOB.clients)
++.
@@ -52,7 +52,7 @@
keyword = "playing"
log = FALSE
/datum/world_topic/playing/Run(list/input)
/datum/world_topic/playing/Run(list/input, addr)
return GLOB.player_list.len
/datum/world_topic/pr_announce
@@ -60,7 +60,7 @@
require_comms_key = TRUE
var/static/list/PRcounts = list() //PR id -> number of times announced this round
/datum/world_topic/pr_announce/Run(list/input)
/datum/world_topic/pr_announce/Run(list/input, addr)
var/list/payload = json_decode(input["payload"])
var/id = "[payload["pull_request"]["id"]]"
if(!PRcounts[id])
@@ -78,14 +78,14 @@
keyword = "Ahelp"
require_comms_key = TRUE
/datum/world_topic/ahelp_relay/Run(list/input)
/datum/world_topic/ahelp_relay/Run(list/input, addr)
relay_msg_admins("<span class='adminnotice'><b><font color=red>HELP: </font> [input["source"]] [input["message_sender"]]: [input["message"]]</b></span>")
/datum/world_topic/comms_console
keyword = "Comms_Console"
require_comms_key = TRUE
/datum/world_topic/comms_console/Run(list/input)
/datum/world_topic/comms_console/Run(list/input, addr)
minor_announce(input["message"], "Incoming message from [input["message_sender"]]")
for(var/obj/machinery/computer/communications/CM in GLOB.machines)
CM.overrideCooldown()
@@ -94,17 +94,17 @@
keyword = "News_Report"
require_comms_key = TRUE
/datum/world_topic/news_report/Run(list/input)
/datum/world_topic/news_report/Run(list/input, addr)
minor_announce(input["message"], "Breaking Update From [input["message_sender"]]")
/datum/world_topic/server_hop
keyword = "server_hop"
/datum/world_topic/server_hop/Run(list/input)
/datum/world_topic/server_hop/Run(list/input, addr)
var/expected_key = input[keyword]
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == expected_key)
if(O.client)
if(O.client?.address == addr)
new /obj/screen/splash(O.client, TRUE)
break
@@ -112,14 +112,14 @@
keyword = "adminmsg"
require_comms_key = TRUE
/datum/world_topic/adminmsg/Run(list/input)
/datum/world_topic/adminmsg/Run(list/input, addr)
return IrcPm(input[keyword], input["msg"], input["sender"])
/datum/world_topic/namecheck
keyword = "namecheck"
require_comms_key = TRUE
/datum/world_topic/namecheck/Run(list/input)
/datum/world_topic/namecheck/Run(list/input, addr)
//Oh this is a hack, someone refactor the functionality out of the chat command PLS
var/datum/tgs_chat_command/namecheck/NC = new
var/datum/tgs_chat_user/user = new
@@ -131,13 +131,13 @@
keyword = "adminwho"
require_comms_key = TRUE
/datum/world_topic/adminwho/Run(list/input)
/datum/world_topic/adminwho/Run(list/input, addr)
return ircadminwho()
/datum/world_topic/status
keyword = "status"
/datum/world_topic/status/Run(list/input)
/datum/world_topic/status/Run(list/input, addr)
. = list()
.["version"] = GLOB.game_version
.["mode"] = "hidden" //CIT CHANGE - hides the gamemode in topic() calls to prevent meta'ing the gamemode

View File

@@ -9,6 +9,8 @@
var/list/vassal_allowed_antags = list(/datum/antagonist/brother, /datum/antagonist/traitor, /datum/antagonist/traitor/internal_affairs, /datum/antagonist/survivalist, \
/datum/antagonist/rev, /datum/antagonist/nukeop, /datum/antagonist/pirate, /datum/antagonist/cult, /datum/antagonist/abductee)
// The antags you're allowed to be if turning Vassal.
/proc/isvamp(mob/living/M)
return istype(M) && M.mind && M.mind.has_antag_datum(/datum/antagonist/bloodsucker)
/datum/game_mode/bloodsucker
name = "bloodsucker"

View File

@@ -8,7 +8,7 @@
spray_range = 1
stream_range = 1
volume = 30
list_reagents = list("lube" = 30)
list_reagents = list(/datum/reagent/lube = 30)
//COMBAT CLOWN SHOES
//Clown shoes with combat stats and noslip. Of course they still squeak.
@@ -165,7 +165,7 @@
customfoodfilling = FALSE
seed = null
tastes = list("explosives" = 10)
list_reagents = list("vitamin" = 1)
list_reagents = list(/datum/reagent/consumable/nutriment/vitamin = 1)
/obj/item/grown/bananapeel/bombanana
desc = "A peel from a banana. Why is it beeping?"

View File

@@ -14,14 +14,14 @@
circuit = /obj/item/circuitboard/machine/sleeper
req_access = list(ACCESS_CMO) //Used for reagent deletion and addition of non medicines
var/efficiency = 1
var/min_health = -25
var/min_health = 30
var/list/available_chems
var/controls_inside = FALSE
var/list/possible_chems = list(
list("epinephrine", "morphine", "salbutamol", "bicaridine", "kelotane"),
list("oculine","inacusiate"),
list("antitoxin", "mutadone", "mannitol", "pen_acid"),
list("omnizine")
list(/datum/reagent/medicine/epinephrine, /datum/reagent/medicine/morphine, /datum/reagent/medicine/salbutamol, /datum/reagent/medicine/bicaridine, /datum/reagent/medicine/kelotane),
list(/datum/reagent/medicine/oculine,/datum/reagent/medicine/inacusiate),
list(/datum/reagent/medicine/antitoxin, /datum/reagent/medicine/mutadone, /datum/reagent/medicine/mannitol, /datum/reagent/medicine/pen_acid),
list(/datum/reagent/medicine/omnizine)
)
var/list/chem_buttons //Used when emagged to scramble which chem is used, eg: antitoxin -> morphine
var/scrambled_chems = FALSE //Are chem buttons scrambled? used as a warning
@@ -106,7 +106,7 @@
return
if(is_operational() && occupant)
var/datum/reagent/R = pick(reagents.reagent_list)
inject_chem(R.id, occupant)
inject_chem(R.type, occupant)
open_machine()
//Is this too much?
if(severity == EMP_HEAVY)
@@ -217,9 +217,9 @@
for(var/chem in available_chems)
var/datum/reagent/R = reagents.has_reagent(chem)
R = GLOB.chemical_reagents_list[chem]
data["synthchems"] += list(list("name" = R.name, "id" = R.id, "synth_allowed" = synth_allowed(chem)))
data["synthchems"] += list(list("name" = R.name, "id" = R.type, "synth_allowed" = synth_allowed(chem)))
for(var/datum/reagent/R in reagents.reagent_list)
data["chems"] += list(list("name" = R.name, "id" = R.id, "vol" = R.volume, "purity" = R.purity, "allowed" = chem_allowed(R.id)))
data["chems"] += list(list("name" = R.name, "id" = R.type, "vol" = R.volume, "purity" = R.purity, "allowed" = chem_allowed(R.type)))
data["occupant"] = list()
var/mob/living/mob_occupant = occupant
@@ -289,23 +289,23 @@
open_machine()
. = TRUE
if("inject")
var/chem = params["chem"]
var/chem = text2path(params["chem"])
var/amount = text2num(params["volume"])
if(!is_operational() || !mob_occupant)
if(!is_operational() || !mob_occupant || isnull(chem))
return
if(mob_occupant.health < min_health && chem != "epinephrine")
if(mob_occupant.health < min_health && chem != /datum/reagent/medicine/epinephrine)
return
if(inject_chem(chem, usr, amount))
. = TRUE
if(scrambled_chems && prob(5))
to_chat(usr, "<span class='warning'>Chemical system re-route detected, results may not be as expected!</span>")
if("synth")
var/chem = params["chem"]
var/chem = text2path(params["chem"])
if(!is_operational())
return
reagents.add_reagent(chem_buttons[chem], 10) //other_purity = 0.75 for when the mechanics are in
if("purge")
var/chem = params["chem"]
var/chem = text2path(params["chem"])
if(allowed(usr))
if(!is_operational())
return
@@ -342,7 +342,7 @@
if(!mob_occupant || !mob_occupant.reagents)
return
var/amount = mob_occupant.reagents.get_reagent_amount(chem) + 10 <= 20 * efficiency
var/occ_health = mob_occupant.health > min_health || chem == "epinephrine"
var/occ_health = mob_occupant.health > min_health || chem == /datum/reagent/medicine/epinephrine
return amount && occ_health
/obj/machinery/sleeper/proc/synth_allowed(chem)

View File

@@ -123,15 +123,15 @@
if(reagents.total_volume >= reagents.maximum_volume || !bag || !bag.reagents.total_volume)
beep_stop_pumping()
return
var/blood_amount = bag.reagents.get_reagent_amount("blood")
var/blood_amount = bag.reagents.get_reagent_amount(/datum/reagent/blood)
//monitor the machine and blood bag's reagents storage.
var/amount = min(blood_amount, min(transfer_amount, reagents.maximum_volume - reagents.total_volume))
if(!amount)
beep_stop_pumping()
return
var/bonus = bag.blood_type == "SY" ? 0 : 5 * efficiency //no infinite loops using synthetics.
reagents.add_reagent("syntheticblood", amount + bonus)
bag.reagents.remove_reagent("blood", amount)
reagents.add_reagent(/datum/reagent/blood/synthetics, amount + bonus)
bag.reagents.remove_reagent(/datum/reagent/blood, amount)
update_icon()
if(filling)

View File

@@ -155,6 +155,8 @@
mess = TRUE
update_icon()
return FALSE
if(isvamp(clonemind)) //If the mind is a bloodsucker
return FALSE
attempting = TRUE //One at a time!!
countdown.start()

View File

@@ -88,7 +88,7 @@
occupant_status += "</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [viable_occupant.health]%;' class='progressFill good'></div></div><div class='statusValue'>[viable_occupant.health] %</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Radiation Level:</div><div class='progressBar'><div style='width: [viable_occupant.radiation/(RAD_MOB_SAFE/100)]%;' class='progressFill bad'></div></div><div class='statusValue'>[viable_occupant.radiation/(RAD_MOB_SAFE/100)] %</div></div>"
var/rejuvenators = viable_occupant.reagents.get_reagent_amount("potass_iodide")
var/rejuvenators = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide)
occupant_status += "<div class='line'><div class='statusLabel'>Rejuvenators:</div><div class='progressBar'><div style='width: [round((rejuvenators / REJUVENATORS_MAX) * 100)]%;' class='progressFill highlight'></div></div><div class='statusValue'>[rejuvenators] units</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Unique Enzymes :</div><div class='statusValue'><span class='highlight'>[viable_occupant.dna.unique_enzymes]</span></div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Last Operation:</div><div class='statusValue'>[last_change ? last_change : "----"]</div></div>"
@@ -342,9 +342,9 @@
current_screen = href_list["text"]
if("rejuv")
if(viable_occupant && viable_occupant.reagents)
var/potassiodide_amount = viable_occupant.reagents.get_reagent_amount("potass_iodide")
var/potassiodide_amount = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide)
var/can_add = max(min(REJUVENATORS_MAX - potassiodide_amount, REJUVENATORS_INJECT), 0)
viable_occupant.reagents.add_reagent("potass_iodide", can_add)
viable_occupant.reagents.add_reagent(/datum/reagent/medicine/potass_iodide, can_add)
if("setbufferlabel")
var/text = sanitize(input(usr, "Input a new label:", "Input an Text", null) as text|null)
if(num && text)

View File

@@ -7,26 +7,51 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
icon_state = "tdoppler"
density = TRUE
var/integrated = FALSE
var/list_limit = 100
var/cooldown = 10
var/next_announce = 0
var/max_dist = 150
verb_say = "states coldly"
var/list/message_log = list()
/obj/machinery/doppler_array/Initialize()
. = ..()
GLOB.doppler_arrays += src
/obj/machinery/doppler_array/ComponentInitialize()
. = ..()
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE,null,null,CALLBACK(src,.proc/rot_message))
/obj/machinery/doppler_array/Destroy()
GLOB.doppler_arrays -= src
return ..()
/obj/machinery/doppler_array/examine(mob/user)
/obj/machinery/doppler_array/ui_interact(mob/user)
. = ..()
. += "<span class='notice'>Its dish is facing to the [dir2text(dir)].</span>"
if(stat)
return FALSE
/obj/machinery/doppler_array/process()
return PROCESS_KILL
var/list/dat = list()
for(var/i in 1 to LAZYLEN(message_log))
dat += "Log recording #[i]: [message_log[i]]<br/><br>"
dat += "<A href='?src=[REF(src)];delete_log=1'>Delete logs</A><br>"
dat += "<hr>"
dat += "<A href='?src=[REF(src)];refresh=1'>(Refresh)</A><br>"
dat += "</body></html>"
var/datum/browser/popup = new(user, "computer", name, 400, 500)
popup.set_content(dat.Join(" "))
popup.open()
/obj/machinery/doppler_array/Topic(href, href_list)
if(..())
return
if(href_list["delete_log"])
LAZYCLEARLIST(message_log)
if(href_list["refresh"])
updateUsrDialog()
updateUsrDialog()
return
/obj/machinery/doppler_array/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/wrench))
@@ -46,15 +71,18 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
to_chat(user, "<span class='notice'>You adjust [src]'s dish to face to the [dir2text(dir)].</span>")
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
/obj/machinery/doppler_array/proc/sense_explosion(turf/epicenter,devastation_range,heavy_impact_range,light_impact_range,
took,orig_dev_range,orig_heavy_range,orig_light_range)
/obj/machinery/doppler_array/proc/sense_explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range,
took, orig_dev_range, orig_heavy_range, orig_light_range)
if(stat & NOPOWER)
return FALSE
var/turf/zone = get_turf(src)
if(zone.z != epicenter.z)
return FALSE
if(next_announce > world.time)
return FALSE
next_announce = world.time + cooldown
var/distance = get_dist(epicenter, zone)
var/direct = get_dir(zone, epicenter)
@@ -80,8 +108,19 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
else
for(var/message in messages)
say(message)
if(LAZYLEN(message_log) > list_limit)
say("Storage buffer is full! Clearing buffers...")
LAZYCLEARLIST(message_log)
LAZYADD(message_log, messages.Join(" "))
return TRUE
/obj/machinery/doppler_array/examine(mob/user)
. = ..()
. += "<span class='notice'>Its dish is facing to the [dir2text(dir)].</span>"
/obj/machinery/doppler_array/process()
return PROCESS_KILL
/obj/machinery/doppler_array/power_change()
if(stat & BROKEN)
icon_state = "[initial(icon_state)]-broken"

View File

@@ -256,7 +256,6 @@
return
return ..()
/obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(.) //damage received

View File

@@ -89,7 +89,7 @@
selected_category = href_list["category"]
if(href_list["disposeI"]) //Get rid of a reagent incase you add the wrong one by mistake
reagents.del_reagent(href_list["disposeI"])
reagents.del_reagent(text2path(href_list["disposeI"]))
if(href_list["make"])
@@ -100,10 +100,10 @@
return
var/synth_cost = being_built.reagents_list["synthflesh"]*prod_coeff
var/synth_cost = being_built.reagents_list[/datum/reagent/medicine/synthflesh]*prod_coeff
var/power = max(2000, synth_cost/5)
if(reagents.has_reagent("synthflesh", being_built.reagents_list["synthflesh"]*prod_coeff))
if(reagents.has_reagent(/datum/reagent/medicine/synthflesh, being_built.reagents_list[/datum/reagent/medicine/synthflesh]*prod_coeff))
busy = TRUE
use_power(power)
flick("limbgrower_fill",src)
@@ -117,8 +117,8 @@
return
/obj/machinery/limbgrower/proc/build_item()
if(reagents.has_reagent("synthflesh", being_built.reagents_list["synthflesh"]*prod_coeff)) //sanity check, if this happens we are in big trouble
reagents.remove_reagent("synthflesh",being_built.reagents_list["synthflesh"]*prod_coeff)
if(reagents.has_reagent(/datum/reagent/medicine/synthflesh, being_built.reagents_list[/datum/reagent/medicine/synthflesh]*prod_coeff)) //sanity check, if this happens we are in big trouble
reagents.remove_reagent(/datum/reagent/medicine/synthflesh, being_built.reagents_list[/datum/reagent/medicine/synthflesh]*prod_coeff)
var/buildpath = being_built.build_path
if(ispath(buildpath, /obj/item/bodypart)) //This feels like spatgheti code, but i need to initilise a limb somehow
build_limb(buildpath)
@@ -198,7 +198,7 @@
for(var/datum/reagent/R in reagents.reagent_list)
dat += "[R.name]: [R.volume]"
dat += "<A href='?src=[REF(src)];disposeI=[R.id]'>Purge</A><BR>"
dat += "<A href='?src=[REF(src)];disposeI=[R]'>Purge</A><BR>"
dat += "</div>"
return dat
@@ -208,12 +208,12 @@
return dat
/obj/machinery/limbgrower/proc/can_build(datum/design/D)
return (reagents.has_reagent("synthflesh", D.reagents_list["synthflesh"]*prod_coeff)) //Return whether the machine has enough synthflesh to produce the design
return (reagents.has_reagent(/datum/reagent/medicine/synthflesh, D.reagents_list[/datum/reagent/medicine/synthflesh]*prod_coeff)) //Return whether the machine has enough synthflesh to produce the design
/obj/machinery/limbgrower/proc/get_design_cost(datum/design/D)
var/dat
if(D.reagents_list["synthflesh"])
dat += "[D.reagents_list["synthflesh"] * prod_coeff] Synthetic flesh "
dat += "[D.reagents_list[/datum/reagent/medicine/synthflesh] * prod_coeff] Synthetic flesh "
return dat
/obj/machinery/limbgrower/emag_act(mob/user)

View File

@@ -18,6 +18,28 @@
. = ..()
update_icon()
/obj/machinery/recharge_station/upgraded
/obj/machinery/recharge_station/upgraded/Initialize()
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/machine/cyborgrecharger(null)
component_parts += new /obj/item/stock_parts/capacitor/super(null)
component_parts += new /obj/item/stock_parts/manipulator/pico(null)
component_parts += new /obj/item/stock_parts/cell/hyper(null)
RefreshParts()
/obj/machinery/recharge_station/fullupgrade
/obj/machinery/recharge_station/fullupgrade/Initialize()
. = ..()
component_parts = list()
component_parts += new /obj/item/circuitboard/machine/cyborgrecharger(null)
component_parts += new /obj/item/stock_parts/capacitor/quadratic(null)
component_parts += new /obj/item/stock_parts/manipulator/femto(null)
component_parts += new /obj/item/stock_parts/cell/bluespace(null)
RefreshParts()
/obj/machinery/recharge_station/RefreshParts()
recharge_speed = 0
repairs = 0

View File

@@ -191,11 +191,11 @@
if(!R || !patient || !SG || !(SG in chassis.equipment))
return 0
var/to_inject = min(R.volume, inject_amount)
if(to_inject && patient.reagents.get_reagent_amount(R.id) + to_inject <= inject_amount*2)
if(to_inject && patient.reagents.get_reagent_amount(R.type) + to_inject <= inject_amount*2)
occupant_message("Injecting [patient] with [to_inject] units of [R.name].")
log_message("Injecting [patient] with [to_inject] units of [R.name].")
log_combat(chassis.occupant, patient, "injected", "[name] ([R] - [to_inject] units)")
SG.reagents.trans_id_to(patient,R.id,to_inject)
SG.reagents.trans_id_to(patient,R.type,to_inject)
update_equip_info()
return
@@ -228,8 +228,8 @@
M.AdjustStun(-80)
M.AdjustKnockdown(-80)
M.AdjustUnconscious(-80)
if(M.reagents.get_reagent_amount("epinephrine") < 5)
M.reagents.add_reagent("epinephrine", 5)
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
chassis.use_power(energy_drain)
update_equip_info()
@@ -259,7 +259,7 @@
. = ..()
create_reagents(max_volume, NO_REACT)
syringes = new
known_reagents = list("epinephrine"="Epinephrine","charcoal"="Charcoal")
known_reagents = list(/datum/reagent/medicine/epinephrine = "Epinephrine", /datum/reagent/medicine/charcoal = "Charcoal")
processed_reagents = new
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/detach()
@@ -330,8 +330,7 @@
if(M.can_inject(null, 1))
if(mechsyringe.reagents)
for(var/datum/reagent/A in mechsyringe.reagents.reagent_list)
R += A.id + " ("
R += num2text(A.volume) + "),"
R += "[A.name] ([num2text(A.volume)]"
mechsyringe.icon_state = initial(mechsyringe.icon_state)
mechsyringe.icon = initial(mechsyringe.icon)
mechsyringe.reagents.reaction(M, INJECT)
@@ -445,7 +444,7 @@
var/output
for(var/datum/reagent/R in reagents.reagent_list)
if(R.volume > 0)
output += "[R]: [round(R.volume,0.001)] - <a href=\"?src=[REF(src)];purge_reagent=[R.id]\">Purge Reagent</a><br />"
output += "[R]: [round(R.volume,0.001)] - <a href=\"?src=[REF(src)];purge_reagent=[R.type]\">Purge Reagent</a><br />"
if(output)
output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - <a href=\"?src=[REF(src)];purge_all=1\">Purge All</a>"
return output || "None"
@@ -481,7 +480,7 @@
return 0
occupant_message("Analyzing reagents...")
for(var/datum/reagent/R in A.reagents.reagent_list)
if(R.can_synth && add_known_reagent(R.id,R.name))
if(R.can_synth && add_known_reagent(R.type,R.name))
occupant_message("Reagent analyzed, identified as [R.name] and added to database.")
send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form())
occupant_message("Analyzis complete.")

View File

@@ -171,7 +171,7 @@
/obj/item/mecha_parts/mecha_equipment/extinguisher/Initialize()
. = ..()
create_reagents(1000)
reagents.add_reagent("water", 1000)
reagents.add_reagent(/datum/reagent/water, 1000)
/obj/item/mecha_parts/mecha_equipment/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch.
if(!action_checks(target) || get_dist(chassis, target)>3)

View File

@@ -286,10 +286,10 @@
/obj/mecha/proc/mech_toxin_damage(mob/living/target)
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
if(target.reagents)
if(target.reagents.get_reagent_amount("cryptobiolin") + force < force*2)
target.reagents.add_reagent("cryptobiolin", force/2)
if(target.reagents.get_reagent_amount("toxin") + force < force*2)
target.reagents.add_reagent("toxin", force/2.5)
if(target.reagents.get_reagent_amount(/datum/reagent/cryptobiolin) + force < force*2)
target.reagents.add_reagent(/datum/reagent/cryptobiolin, force/2)
if(target.reagents.get_reagent_amount(/datum/reagent/toxin) + force < force*2)
target.reagents.add_reagent(/datum/reagent/toxin, force/2.5)
/obj/mecha/mech_melee_attack(obj/mecha/M)

View File

@@ -9,7 +9,7 @@
/obj/effect/decal/cleanable/blood/gibs/xeno
color = BLOOD_COLOR_XENO
gibs_reagent_id = "liquidxenogibs"
gibs_reagent_id = /datum/reagent/liquidgibs/xeno
gibs_bloodtype = "X*"
/obj/effect/decal/cleanable/blood/gibs/xeno/Initialize(mapload, list/datum/disease/diseases)

View File

@@ -6,7 +6,7 @@
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
mergeable_decal = FALSE
var/body_colors = "#e3ba84" //a default color just in case.
var/gibs_reagent_id = "liquidgibs"
var/gibs_reagent_id = /datum/reagent/liquidgibs
var/gibs_bloodtype = "A+"
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
@@ -120,7 +120,6 @@
//Lizards
/obj/effect/decal/cleanable/blood/gibs/human/lizard
body_colors = "117720"
gibs_reagent_id = "liquidgibs"
gibs_bloodtype = "L"
/obj/effect/decal/cleanable/blood/gibs/human/lizard/Initialize(mapload, list/datum/disease/diseases)
@@ -148,7 +147,7 @@
// Slime Gibs
/obj/effect/decal/cleanable/blood/gibs/slime
desc = "They look gooey and gruesome."
gibs_reagent_id = "liquidslimegibs"
gibs_reagent_id = /datum/reagent/liquidgibs/slime
gibs_bloodtype = "GEL"
/obj/effect/decal/cleanable/blood/gibs/slime/Initialize(mapload, list/datum/disease/diseases)
@@ -187,7 +186,7 @@
/obj/effect/decal/cleanable/blood/gibs/synth
desc = "They look sludgy and disgusting."
gibs_reagent_id = "liquidsyntheticgibs"
gibs_reagent_id = /datum/reagent/liquidgibs/synth
gibs_bloodtype = "SY"
/obj/effect/decal/cleanable/blood/gibs/synth/Initialize(mapload, list/datum/disease/diseases)
@@ -198,7 +197,7 @@
/obj/effect/decal/cleanable/blood/gibs/ipc
desc = "They look sharp yet oozing."
body_colors = "00ff00"
gibs_reagent_id = "liquidoilgibs"
gibs_reagent_id = /datum/reagent/liquidgibs/oil
gibs_bloodtype = "HF"
/obj/effect/decal/cleanable/blood/gibs/ipc/Initialize(mapload, list/datum/disease/diseases)

View File

@@ -13,7 +13,7 @@
/obj/effect/decal/cleanable/ash/Initialize()
. = ..()
reagents.add_reagent("ash", 30)
reagents.add_reagent(/datum/reagent/ash, 30)
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
@@ -27,7 +27,7 @@
/obj/effect/decal/cleanable/ash/large/Initialize()
. = ..()
reagents.add_reagent("ash", 30) //double the amount of ash.
reagents.add_reagent(/datum/reagent/ash, 30) //double the amount of ash.
/obj/effect/decal/cleanable/glass
name = "tiny shards"
@@ -131,12 +131,10 @@
playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp
H.visible_message("<span class='alert'>[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.</span>")
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)
if (istype(R, /datum/reagent/consumable))
var/datum/reagent/consumable/nutri_check = R
if(nutri_check.nutriment_factor >0)
H.nutrition += nutri_check.nutriment_factor * nutri_check.volume
reagents.remove_reagent(nutri_check.id,nutri_check.volume)
for(var/datum/reagent/consumable/R in reagents.reagent_list)
if(R.nutriment_factor > 0)
H.nutrition += R.nutriment_factor * R.volume
reagents.del_reagent(R.type)
reagents.trans_to(H, reagents.total_volume)
qdel(src)

View File

@@ -13,7 +13,7 @@
/obj/effect/decal/cleanable/robot_debris/Initialize(mapload, list/datum/disease/diseases)
. = ..()
reagents.add_reagent("liquidoilgibs", 5)
reagents.add_reagent(/datum/reagent/liquidgibs, 5)
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
set waitfor = 0
@@ -53,8 +53,8 @@
/obj/effect/decal/cleanable/oil/Initialize()
. = ..()
reagents.add_reagent("oil", 30)
reagents.add_reagent("liquidoilgibs", 5)
reagents.add_reagent(/datum/reagent/oil, 30)
reagents.add_reagent(/datum/reagent/liquidgibs/oil, 5)
/obj/effect/decal/cleanable/oil/streak
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")

View File

@@ -55,7 +55,7 @@
var/obj/effect/decal/cleanable/plasma/P = (locate(/obj/effect/decal/cleanable/plasma) in get_turf(src))
if(!P)
P = new(loc)
P.reagents.add_reagent("stable_plasma", absorbed_plasma)
P.reagents.add_reagent(/datum/reagent/stable_plasma, absorbed_plasma)
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)

View File

@@ -435,7 +435,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
//------Station Rooms Landmarks------------//
/obj/effect/landmark/stationroom
var/list/template_names = list()
var/list/templates = list()
layer = BULLET_HOLE_LAYER
/obj/effect/landmark/stationroom/New()
@@ -452,11 +452,11 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
if(!T)
return FALSE
if(!template_name)
for(var/t in template_names)
for(var/t in templates)
if(!SSmapping.station_room_templates[t])
log_world("Station room spawner placed at ([T.x], [T.y], [T.z]) has invalid ruin name of \"[t]\" in its list")
template_names -= t
template_name = safepick(template_names)
templates -= t
template_name = pickweight(templates)
if(!template_name)
GLOB.stationroom_landmarks -= src
qdel(src)
@@ -474,10 +474,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
// The landmark for the Engine on Box
/obj/effect/landmark/stationroom/box/engine
template_names = list("Engine SM", "Engine Singulo", "Engine Tesla")
templates = list("Engine SM" = 3, "Engine Singulo" = 3, "Engine Tesla" = 3)
icon = 'icons/rooms/box/engine.dmi'
/obj/effect/landmark/stationroom/box/engine/New()
. = ..()
template_names = CONFIG_GET(keyed_list/box_random_engine)
templates = CONFIG_GET(keyed_list/box_random_engine)

View File

@@ -136,7 +136,7 @@
victim.put_in_hands(chainsaw, forced = TRUE)
chainsaw.attack_self(victim)
chainsaw.wield(victim)
victim.reagents.add_reagent("adminordrazine",25)
victim.reagents.add_reagent(/datum/reagent/medicine/adminordrazine,25)
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")
victim.client.color = pure_red

View File

@@ -52,7 +52,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/interaction_flags_item = INTERACT_ITEM_ATTACK_HAND_PICKUP
//Citadel Edit for digitigrade stuff
var/mutantrace_variation = NO_MUTANTRACE_VARIATION //Are there special sprites for specific situations? Don't use this unless you need to.
var/mutantrace_variation = NONE //Are there special sprites for specific situations? Don't use this unless you need to.
var/item_color = null //this needs deprecating, soonish

View File

@@ -182,7 +182,7 @@ RSF
to_chat(user, "Fabricating Cookie..")
var/obj/item/reagent_containers/food/snacks/cookie/S = new /obj/item/reagent_containers/food/snacks/cookie(T)
if(toxin)
S.reagents.add_reagent("chloralhydrate", 10)
S.reagents.add_reagent(/datum/reagent/toxin/chloralhydrate, 10)
if (iscyborg(user))
var/mob/living/silicon/robot/R = user
R.cell.charge -= 100

View File

@@ -68,7 +68,7 @@
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.add_reagent(/datum/reagent/colorful_reagent, 10)
L.reagents.reaction(L, TOUCH, 1)
// TODO maybe add some colorful vomit?
@@ -81,7 +81,7 @@
return (TOXLOSS|OXYLOSS)
else if(can_use(user) && !L)
user.visible_message("<span class='suicide'>[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.reagents.add_reagent("colorful_reagent", 1)
user.reagents.add_reagent(/datum/reagent/colorful_reagent, 1)
user.reagents.reaction(user, TOUCH, 1)
return TOXLOSS

View File

@@ -120,4 +120,4 @@
flags_1 = CONDUCT_1
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50, MAT_GLASS=50)
grind_results = list("iron" = 10, "silicon" = 10)
grind_results = list(/datum/reagent/iron = 10, /datum/reagent/silicon = 10)

View File

@@ -25,7 +25,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/smoketime = 5
w_class = WEIGHT_CLASS_TINY
heat = 1000
grind_results = list("phosphorus" = 2)
grind_results = list(/datum/reagent/phosphorus = 2)
/obj/item/match/process()
smoketime--
@@ -113,7 +113,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/lastHolder = null
var/smoketime = 300
var/chem_volume = 30
var/list/list_reagents = list("nicotine" = 15)
var/list/list_reagents = list(/datum/reagent/drug/nicotine = 15)
heat = 1000
/obj/item/clothing/mask/cigarette/suicide_act(mob/user)
@@ -169,15 +169,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
hitsound = 'sound/items/welder.ogg'
damtype = "fire"
force = 4
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
if(reagents.get_reagent_amount(/datum/reagent/toxin/plasma)) // the plasma explodes when exposed to fire
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
e.set_up(round(reagents.get_reagent_amount(/datum/reagent/toxin/plasma) / 2.5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return
if(reagents.get_reagent_amount("welding_fuel")) // the fuel explodes, too, but much less violently
if(reagents.get_reagent_amount(/datum/reagent/fuel)) // the fuel explodes, too, but much less violently
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("welding_fuel") / 5, 1), get_turf(src), 0, 0)
e.set_up(round(reagents.get_reagent_amount(/datum/reagent/fuel) / 5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return
@@ -268,29 +268,29 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/uplift
desc = "An Uplift Smooth brand cigarette."
list_reagents = list("nicotine" = 7.5, "menthol" = 7.5)
list_reagents = list(/datum/reagent/drug/nicotine = 7.5, /datum/reagent/consumable/menthol = 7.5)
/obj/item/clothing/mask/cigarette/robust
desc = "A Robust brand cigarette."
/obj/item/clothing/mask/cigarette/robustgold
desc = "A Robust Gold brand cigarette."
list_reagents = list("nicotine" = 15, "gold" = 1)
list_reagents = list(/datum/reagent/drug/nicotine = 15, /datum/reagent/gold = 1)
/obj/item/clothing/mask/cigarette/carp
desc = "A Carp Classic brand cigarette."
/obj/item/clothing/mask/cigarette/syndicate
desc = "An unknown brand cigarette."
list_reagents = list("nicotine" = 15, "omnizine" = 15)
list_reagents = list(/datum/reagent/drug/nicotine = 15, /datum/reagent/medicine/omnizine = 15)
/obj/item/clothing/mask/cigarette/shadyjims
desc = "A Shady Jim's Super Slims cigarette."
list_reagents = list("nicotine" = 15, "lipolicide" = 4, "ammonia" = 2, "plantbgone" = 1, "toxin" = 1.5)
list_reagents = list(/datum/reagent/drug/nicotine = 15, /datum/reagent/toxin/lipolicide = 4, /datum/reagent/ammonia = 2, /datum/reagent/toxin/plantbgone = 1, /datum/reagent/toxin = 1.5)
/obj/item/clothing/mask/cigarette/xeno
desc = "A Xeno Filtered brand cigarette."
list_reagents = list ("nicotine" = 20, "regen_jelly" = 15, "krokodil" = 4)
list_reagents = list (/datum/reagent/drug/nicotine = 20, /datum/reagent/medicine/regen_jelly = 15, /datum/reagent/drug/krokodil = 4)
// Rollies.
@@ -313,17 +313,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
src.pixel_y = rand(-5, 5)
/obj/item/clothing/mask/cigarette/rollie/nicotine
list_reagents = list("nicotine" = 15)
list_reagents = list(/datum/reagent/drug/nicotine = 15)
/obj/item/clothing/mask/cigarette/rollie/trippy
list_reagents = list("nicotine" = 15, "mushroomhallucinogen" = 35)
list_reagents = list(/datum/reagent/drug/nicotine = 15, /datum/reagent/drug/mushroomhallucinogen = 35)
starts_lit = TRUE
/obj/item/clothing/mask/cigarette/rollie/cannabis
list_reagents = list("space_drugs" = 15, "lipolicide" = 35)
list_reagents = list(/datum/reagent/drug/space_drugs = 15, /datum/reagent/toxin/lipolicide = 35)
/obj/item/clothing/mask/cigarette/rollie/mindbreaker
list_reagents = list("mindbreaker" = 35, "lipolicide" = 15)
list_reagents = list(/datum/reagent/toxin/mindbreaker = 35, /datum/reagent/toxin/lipolicide = 15)
/obj/item/cigbutt/roach
name = "roach"
@@ -377,7 +377,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = "cigbutt"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
grind_results = list("carbon" = 2)
grind_results = list(/datum/reagent/carbon = 2)
/obj/item/cigbutt/cigarbutt
name = "cigar butt"
@@ -506,7 +506,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
heat = 1500
resistance_flags = FIRE_PROOF
light_color = LIGHT_COLOR_FIRE
grind_results = list("iron" = 1, "welding_fuel" = 5, "oil" = 5)
grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/oil = 5)
/obj/item/lighter/Initialize()
. = ..()
@@ -665,7 +665,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
heat = 3000 //Blue flame!
light_color = LIGHT_COLOR_CYAN
overlay_state = "slime"
grind_results = list("iron" = 1, "welding_fuel" = 5, "pyroxadone" = 5)
grind_results = list(/datum/reagent/iron = 1, /datum/reagent/fuel = 5, /datum/reagent/medicine/pyroxadone = 5)
///////////
@@ -719,7 +719,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/vape/Initialize(mapload, param_color)
. = ..()
create_reagents(chem_volume, NO_REACT) // so it doesn't react until you light it
reagents.add_reagent("nicotine", 50)
reagents.add_reagent(/datum/reagent/drug/nicotine, 50)
if(!icon_state)
if(!param_color)
param_color = pick("red","blue","black","white","green","purple","yellow","orange")
@@ -810,14 +810,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM
reagents.reaction(C, INGEST, fraction)
if(!reagents.trans_to(C, REAGENTS_METABOLISM))
reagents.remove_any(REAGENTS_METABOLISM)
if(reagents.get_reagent_amount("welding_fuel"))
if(reagents.get_reagent_amount(/datum/reagent/fuel))
//HOT STUFF
C.fire_stacks = 2
C.IgniteMob()
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
if(reagents.get_reagent_amount(/datum/reagent/toxin/plasma)) // the plasma explodes when exposed to fire
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
e.set_up(round(reagents.get_reagent_amount(/datum/reagent/toxin/plasma) / 2.5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return

View File

@@ -12,7 +12,7 @@
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
materials = list(MAT_GLASS=1000)
w_class = WEIGHT_CLASS_SMALL
grind_results = list("silicon" = 20)
grind_results = list(/datum/reagent/silicon = 20)
var/build_path = null
/obj/item/circuitboard/proc/apply_default_parts(obj/machinery/M)

View File

@@ -23,7 +23,7 @@
throwforce = 0
throw_speed = 3
throw_range = 7
grind_results = list("lye" = 10)
grind_results = list(/datum/reagent/lye = 10)
var/cleanspeed = 50 //slower than mop
force_string = "robust... against germs"
@@ -180,4 +180,4 @@
name = "Canned Laughter"
desc = "Just looking at this makes you want to giggle."
icon_state = "laughter"
list_reagents = list("laughter" = 50)
list_reagents = list(/datum/reagent/consumable/laughter = 50)

View File

@@ -59,7 +59,7 @@
var/edible = TRUE // That doesn't mean eating it is a good idea
var/list/reagent_contents = list("nutriment" = 1)
var/list/reagent_contents = list(/datum/reagent/consumable/nutriment = 1)
// If the user can toggle the colour, a la vanilla spraycan
var/can_change_colour = FALSE
@@ -485,63 +485,63 @@
icon_state = "crayonred"
paint_color = "#DA0000"
item_color = "red"
reagent_contents = list("nutriment" = 1, "redcrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/red = 1)
/obj/item/toy/crayon/orange
icon_state = "crayonorange"
paint_color = "#FF9300"
item_color = "orange"
reagent_contents = list("nutriment" = 1, "orangecrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/orange = 1)
/obj/item/toy/crayon/yellow
icon_state = "crayonyellow"
paint_color = "#FFF200"
item_color = "yellow"
reagent_contents = list("nutriment" = 1, "yellowcrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/yellow = 1)
/obj/item/toy/crayon/green
icon_state = "crayongreen"
paint_color = "#A8E61D"
item_color = "green"
reagent_contents = list("nutriment" = 1, "greencrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/green = 1)
/obj/item/toy/crayon/blue
icon_state = "crayonblue"
paint_color = "#00B7EF"
item_color = "blue"
reagent_contents = list("nutriment" = 1, "bluecrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/blue = 1)
/obj/item/toy/crayon/purple
icon_state = "crayonpurple"
paint_color = "#DA00FF"
item_color = "purple"
reagent_contents = list("nutriment" = 1, "purplecrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/purple = 1)
/obj/item/toy/crayon/black
icon_state = "crayonblack"
paint_color = "#1C1C1C" //Not completely black because total black looks bad. So Mostly Black.
item_color = "black"
reagent_contents = list("nutriment" = 1, "blackcrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/black = 1)
/obj/item/toy/crayon/white
icon_state = "crayonwhite"
paint_color = "#FFFFFF"
item_color = "white"
reagent_contents = list("nutriment" = 1, "whitecrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/white = 1)
/obj/item/toy/crayon/mime
icon_state = "crayonmime"
desc = "A very sad-looking crayon."
paint_color = "#FFFFFF"
item_color = "mime"
reagent_contents = list("nutriment" = 1, "invisiblecrayonpowder" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent/crayonpowder/invisible = 1)
charges = -1
/obj/item/toy/crayon/rainbow
icon_state = "crayonrainbow"
paint_color = "#FFF000"
item_color = "rainbow"
reagent_contents = list("nutriment" = 1, "colorful_reagent" = 1)
reagent_contents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent = 1)
drawtype = RANDOM_ANY // just the default starter.
charges = -1
@@ -621,7 +621,7 @@
can_change_colour = TRUE
gang = TRUE //Gang check is true for all things upon the honored hierarchy of spraycans, except those that are FALSE.
reagent_contents = list("welding_fuel" = 1, "ethanol" = 1)
reagent_contents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol = 1)
pre_noise = TRUE
post_noise = FALSE
@@ -778,7 +778,7 @@
volume_multiplier = 25
charges = 100
reagent_contents = list("clf3" = 1)
reagent_contents = list(/datum/reagent/clf3 = 1)
actually_paints = FALSE
paint_color = "#000000"
@@ -791,7 +791,7 @@
use_overlays = FALSE
gang = FALSE
reagent_contents = list("lube" = 1, "banana" = 1)
reagent_contents = list(/datum/reagent/lube = 1, /datum/reagent/consumable/banana = 1)
volume_multiplier = 5
/obj/item/toy/crayon/spraycan/lubecan/isValidSurface(surface)
@@ -811,7 +811,7 @@
pre_noise = FALSE
post_noise = FALSE
reagent_contents = list("nothing" = 1, "mutetoxin" = 1)
reagent_contents = list(/datum/reagent/consumable/nothing = 1, /datum/reagent/toxin/mutetoxin = 1)
/obj/item/toy/crayon/spraycan/gang
charges = 20 // Charges back to 20, which is the default value for them.

View File

@@ -700,10 +700,10 @@ GLOBAL_LIST_EMPTY(PDAs)
U << browse(null, "window=pda")
return
/obj/item/pda/proc/remove_id()
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
/obj/item/pda/proc/remove_id(mob/user)
if(issilicon(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return
do_remove_id(usr)
do_remove_id(user)
/obj/item/pda/proc/do_remove_id(mob/user)
if(!id)
@@ -827,23 +827,23 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/create_message(mob/living/U, obj/item/pda/P)
send_message(U,list(P))
/obj/item/pda/AltClick()
/obj/item/pda/AltClick(mob/user)
. = ..()
if(id)
remove_id()
remove_id(user)
playsound(src, 'sound/machines/terminal_eject_disc.ogg', 50, 1)
else
remove_pen()
remove_pen(user)
playsound(src, 'sound/machines/button4.ogg', 50, 1)
return TRUE
/obj/item/pda/CtrlClick()
/obj/item/pda/CtrlClick(mob/user)
..()
if(isturf(loc)) //stops the user from dragging the PDA by ctrl-clicking it.
return
remove_pen()
remove_pen(user)
/obj/item/pda/verb/verb_toggle_light()
set category = "Object"
@@ -857,7 +857,7 @@ GLOBAL_LIST_EMPTY(PDAs)
set src in usr
if(id)
remove_id()
remove_id(usr)
else
to_chat(usr, "<span class='warning'>This PDA does not have an ID in it!</span>")
@@ -896,7 +896,7 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/id_check(mob/user, obj/item/card/id/I)
if(!I)
if(id && (src in user.contents))
remove_id()
remove_id(user)
return TRUE
else
var/obj/item/card/id/C = user.get_active_held_item()

View File

@@ -12,7 +12,8 @@
var/cleaning = FALSE
var/cleaning_cycles = 10
var/patient_laststat = null
var/list/injection_chems = list("antitoxin", "epinephrine", "salbutamol", "bicaridine", "kelotane")
var/list/injection_chems = list(/datum/reagent/medicine/antitoxin, /datum/reagent/medicine/epinephrine,
/datum/reagent/medicine/salbutamol, /datum/reagent/medicine/bicaridine, /datum/reagent/medicine/kelotane)
var/eject_port = "ingestion"
var/escape_in_progress = FALSE
var/message_cooldown
@@ -183,7 +184,7 @@
data["chem"] = list()
for(var/chem in injection_chems)
var/datum/reagent/R = GLOB.chemical_reagents_list[chem]
data["chem"] += list(list("name" = R.name, "id" = R.id))
data["chem"] += list(list("name" = R.name, "id" = R.type))
data["occupant"] = list()
var/mob/living/mob_occupant = patient
@@ -227,8 +228,8 @@
go_out(null, usr)
. = TRUE
if("inject")
var/chem = params["chem"]
if(!patient)
var/chem = text2path(params["chem"])
if(!patient || !chem)
return
inject_chem(chem, usr)
. = TRUE

View File

@@ -267,7 +267,7 @@
var/produce_heat = 1500
heat = 1000
light_color = LIGHT_COLOR_FLARE
grind_results = list("sulfur" = 15)
grind_results = list(/datum/reagent/sulfur = 15)
/obj/item/flashlight/flare/New()
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
@@ -430,7 +430,7 @@
color = LIGHT_COLOR_GREEN
icon_state = "glowstick"
item_state = "glowstick"
grind_results = list("phenol" = 15, "hydrogen" = 10, "oxygen" = 5) //Meth-in-a-stick
grind_results = list(/datum/reagent/phenol = 15, /datum/reagent/hydrogen = 10, /datum/reagent/oxygen = 5) //Meth-in-a-stick
rad_flags = RAD_NO_CONTAMINATE
var/fuel = 0

View File

@@ -262,7 +262,7 @@ SLIME SCANNER
temp_message += " <span class='info'>Subject has abnormal brain fuctions.</span>"
//Astrogen shenanigans
if(H.reagents.has_reagent("astral"))
if(H.reagents.has_reagent(/datum/reagent/fermi/astral))
if(H.mind)
temp_message += " <span class='danger'>Warning: subject may be possesed.</span>"
else
@@ -465,19 +465,18 @@ SLIME SCANNER
else
msg += "<span class='notice'>Subject is not addicted to any reagents.</span>\n"
if(M.reagents.has_reagent("fermiTox"))
var/datum/reagent/fermiTox = M.reagents.has_reagent("fermiTox")
switch(fermiTox.volume)
if(5 to 10)
msg += "<span class='notice'>Subject contains a low amount of toxic isomers.</span>\n"
if(10 to 25)
msg += "<span class='danger'>Subject contains toxic isomers.</span>\n"
if(25 to 50)
msg += "<span class='danger'>Subject contains a substantial amount of toxic isomers.</span>\n"
if(50 to 95)
msg += "<span class='danger'>Subject contains a high amount of toxic isomers.</span>\n"
if(95 to INFINITY)
msg += "<span class='danger'>Subject contains a extremely dangerous amount of toxic isomers.</span>\n"
var/datum/reagent/impure/fermiTox/F = M.reagents.has_reagent(/datum/reagent/impure/fermiTox)
switch(F?.volume)
if(5 to 10)
msg += "<span class='notice'>Subject contains a low amount of toxic isomers.</span>\n"
if(10 to 25)
msg += "<span class='danger'>Subject contains toxic isomers.</span>\n"
if(25 to 50)
msg += "<span class='danger'>Subject contains a substantial amount of toxic isomers.</span>\n"
if(50 to 95)
msg += "<span class='danger'>Subject contains a high amount of toxic isomers.</span>\n"
if(95 to INFINITY)
msg += "<span class='danger'>Subject contains a extremely dangerous amount of toxic isomers.</span>\n"
msg += "*---------*</span>"
to_chat(user, msg)
@@ -519,7 +518,7 @@ SLIME SCANNER
throw_range = 7
tool_behaviour = TOOL_ANALYZER
materials = list(MAT_METAL=30, MAT_GLASS=20)
grind_results = list("mercury" = 5, "iron" = 5, "silicon" = 5)
grind_results = list(/datum/reagent/mercury = 5, /datum/reagent/iron = 5, /datum/reagent/silicon = 5)
var/cooldown = FALSE
var/cooldown_time = 250
var/accuracy // 0 is the best accuracy.

View File

@@ -17,7 +17,7 @@
resistance_flags = FIRE_PROOF
var/max_water = 50
var/last_use = 1
var/chem = "water"
var/chem = /datum/reagent/water
var/safety = TRUE
var/refilling = FALSE
var/tanktype = /obj/structure/reagent_dispensers/watertank

View File

@@ -332,9 +332,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminium", 30)
B2.reagents.add_reagent("foaming_agent", 10)
B2.reagents.add_reagent("facid", 10)
B1.reagents.add_reagent(/datum/reagent/aluminium, 30)
B2.reagents.add_reagent(/datum/reagent/foaming_agent, 10)
B2.reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 10)
beakers += B1
beakers += B2
@@ -350,9 +350,9 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("aluminium", 75)
B2.reagents.add_reagent("smart_foaming_agent", 25)
B2.reagents.add_reagent("facid", 25)
B1.reagents.add_reagent(/datum/reagent/aluminium, 75)
B2.reagents.add_reagent(/datum/reagent/smart_foaming_agent, 25)
B2.reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 25)
beakers += B1
beakers += B2
@@ -368,9 +368,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("stable_plasma", 25)
B2.reagents.add_reagent("sacid", 25)
B1.reagents.add_reagent(/datum/reagent/phosphorus, 25)
B2.reagents.add_reagent(/datum/reagent/stable_plasma, 25)
B2.reagents.add_reagent(/datum/reagent/toxin/acid, 25)
beakers += B1
beakers += B2
@@ -386,10 +386,10 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("plantbgone", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent(/datum/reagent/toxin/plantbgone, 25)
B1.reagents.add_reagent(/datum/reagent/potassium, 25)
B2.reagents.add_reagent(/datum/reagent/phosphorus, 25)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 25)
beakers += B1
beakers += B2
@@ -405,9 +405,9 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("cleaner", 10)
B1.reagents.add_reagent(/datum/reagent/fluorosurfactant, 40)
B2.reagents.add_reagent(/datum/reagent/water, 40)
B2.reagents.add_reagent(/datum/reagent/space_cleaner, 10)
beakers += B1
beakers += B2
@@ -423,9 +423,9 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 40)
B2.reagents.add_reagent("water", 40)
B2.reagents.add_reagent("ez_clean", 60) //ensures a t h i c c distribution
B1.reagents.add_reagent(/datum/reagent/fluorosurfactant, 40)
B2.reagents.add_reagent(/datum/reagent/water, 40)
B2.reagents.add_reagent(/datum/reagent/space_cleaner/ez_clean, 60) //ensures a t h i c c distribution
beakers += B1
beakers += B2
@@ -442,10 +442,10 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("condensedcapsaicin", 60)
B1.reagents.add_reagent("potassium", 40)
B2.reagents.add_reagent("phosphorus", 40)
B2.reagents.add_reagent("sugar", 40)
B1.reagents.add_reagent(/datum/reagent/consumable/condensedcapsaicin, 60)
B1.reagents.add_reagent(/datum/reagent/potassium, 40)
B2.reagents.add_reagent(/datum/reagent/phosphorus, 40)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 40)
beakers += B1
beakers += B2
@@ -461,11 +461,11 @@
var/obj/item/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("facid", 290)
B1.reagents.add_reagent("potassium", 10)
B2.reagents.add_reagent("phosphorus", 10)
B2.reagents.add_reagent("sugar", 10)
B2.reagents.add_reagent("facid", 280)
B1.reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 290)
B1.reagents.add_reagent(/datum/reagent/potassium, 10)
B2.reagents.add_reagent(/datum/reagent/phosphorus, 10)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 10)
B2.reagents.add_reagent(/datum/reagent/toxin/acid/fluacid, 280)
beakers += B1
beakers += B2
@@ -481,10 +481,10 @@
var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent("colorful_reagent", 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent(/datum/reagent/colorful_reagent, 25)
B1.reagents.add_reagent(/datum/reagent/potassium, 25)
B2.reagents.add_reagent(/datum/reagent/phosphorus, 25)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 25)
beakers += B1
beakers += B2
@@ -493,7 +493,7 @@
name = "generic glitter grenade"
desc = "You shouldn't see this description."
stage = READY
var/glitter_type = "glitter"
var/glitter_type = /datum/reagent/glitter
/obj/item/grenade/chem_grenade/glitter/Initialize()
. = ..()
@@ -501,9 +501,9 @@
var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
B1.reagents.add_reagent(glitter_type, 25)
B1.reagents.add_reagent("potassium", 25)
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
B1.reagents.add_reagent(/datum/reagent/potassium, 25)
B2.reagents.add_reagent(/datum/reagent/phosphorus, 25)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 25)
beakers += B1
beakers += B2
@@ -511,17 +511,17 @@
/obj/item/grenade/chem_grenade/glitter/pink
name = "pink glitter bomb"
desc = "For that HOT glittery look."
glitter_type = "pink_glitter"
glitter_type = /datum/reagent/glitter/pink
/obj/item/grenade/chem_grenade/glitter/blue
name = "blue glitter bomb"
desc = "For that COOL glittery look."
glitter_type = "blue_glitter"
glitter_type = /datum/reagent/glitter/blue
/obj/item/grenade/chem_grenade/glitter/white
name = "white glitter bomb"
desc = "For that somnolent glittery look."
glitter_type = "white_glitter"
glitter_type = /datum/reagent/glitter/white
/obj/item/grenade/chem_grenade/clf3
name = "clf3 grenade"
@@ -533,10 +533,10 @@
var/obj/item/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("fluorosurfactant", 250)
B1.reagents.add_reagent("clf3", 50)
B2.reagents.add_reagent("water", 250)
B2.reagents.add_reagent("clf3", 50)
B1.reagents.add_reagent(/datum/reagent/fluorosurfactant, 250)
B1.reagents.add_reagent(/datum/reagent/clf3, 50)
B2.reagents.add_reagent(/datum/reagent/water, 250)
B2.reagents.add_reagent(/datum/reagent/clf3, 50)
beakers += B1
beakers += B2
@@ -551,13 +551,13 @@
var/obj/item/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("cryptobiolin", 75)
B1.reagents.add_reagent("water", 50)
B1.reagents.add_reagent("mutetoxin", 50)
B1.reagents.add_reagent("spore", 75)
B1.reagents.add_reagent("itching_powder", 50)
B2.reagents.add_reagent("fluorosurfactant", 150)
B2.reagents.add_reagent("mutagen", 150)
B1.reagents.add_reagent(/datum/reagent/cryptobiolin, 75)
B1.reagents.add_reagent(/datum/reagent/water, 50)
B1.reagents.add_reagent(/datum/reagent/toxin/mutetoxin, 50)
B1.reagents.add_reagent(/datum/reagent/toxin/spore, 75)
B1.reagents.add_reagent(/datum/reagent/toxin/itching_powder, 50)
B2.reagents.add_reagent(/datum/reagent/fluorosurfactant, 150)
B2.reagents.add_reagent(/datum/reagent/toxin/mutagen, 150)
beakers += B1
beakers += B2
@@ -571,11 +571,11 @@
var/obj/item/reagent_containers/glass/beaker/bluespace/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/bluespace/B2 = new(src)
B1.reagents.add_reagent("potassium", 50)
B1.reagents.add_reagent("phosphorus", 50)
B1.reagents.add_reagent("fungalspores", 200)
B2.reagents.add_reagent("blood", 250)
B2.reagents.add_reagent("sugar", 50)
B1.reagents.add_reagent(/datum/reagent/potassium, 50)
B1.reagents.add_reagent(/datum/reagent/phosphorus, 50)
B1.reagents.add_reagent(/datum/reagent/fungalspores, 200)
B2.reagents.add_reagent(/datum/reagent/blood, 250)
B2.reagents.add_reagent(/datum/reagent/consumable/sugar, 50)
beakers += B1
beakers += B2
@@ -591,8 +591,8 @@
var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("potassium", 100)
B2.reagents.add_reagent("holywater", 100)
B1.reagents.add_reagent(/datum/reagent/potassium, 100)
B2.reagents.add_reagent(/datum/reagent/water/holywater, 100)
beakers += B1
beakers += B2

View File

@@ -94,11 +94,11 @@
var/chem = pick(slime_chems)
var/amount = 5
if(chem == "lesser plasma") //In the rare case we get another rainbow.
chem = "plasma"
chem = /datum/reagent/toxin/plasma
amount = 4
if(chem == "holy water and uranium")
chem = "uranium"
reagents.add_reagent("holywater")
chem = /datum/reagent/uranium
reagents.add_reagent(/datum/reagent/water/holywater)
reagents.add_reagent(chem,amount)
/obj/effect/payload_spawner/random_slime/spawn_payload(type, numspawned)

View File

@@ -308,7 +308,7 @@
block_chance = 50
var/shield_icon = "shield-red"
/obj/item/nullrod/staff/worn_overlays(isinhands)
/obj/item/nullrod/staff/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = list()
if(isinhands)
. += mutable_appearance('icons/effects/effects.dmi', shield_icon, MOB_LAYER + 0.01)
@@ -789,7 +789,7 @@
praying = TRUE
if(do_after(user, 20, target = M))
M.reagents?.add_reagent("holywater", 5)
M.reagents?.add_reagent(/datum/reagent/water/holywater, 5)
to_chat(M, "<span class='notice'>[user]'s prayer to [deity_name] has eased your pain!</span>")
M.adjustToxLoss(-5, TRUE, TRUE)
M.adjustOxyLoss(-5)

View File

@@ -75,7 +75,7 @@
L.SetKnockdown(0)
L.SetSleeping(0)
L.SetUnconscious(0)
L.reagents.add_reagent("muscle_stimulant", CLAMP(5 - L.reagents.get_reagent_amount("muscle_stimulant"), 0, 5)) //If you don't have legs or get bola'd, tough luck!
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
/obj/item/hot_potato/examine(mob/user)

View File

@@ -33,7 +33,7 @@
/obj/item/implant/adrenalin/activate()
. = ..()
uses--
imp_in.do_adrenaline(150, TRUE, 0, 0, TRUE, list("inaprovaline" = 3, "synaptizine" = 10, "regen_jelly" = 10, "stimulants" = 10), "<span class='boldnotice'>You feel a sudden surge of energy!</span>")
imp_in.do_adrenaline(150, TRUE, 0, 0, TRUE, list(/datum/reagent/medicine/inaprovaline = 3, /datum/reagent/medicine/synaptizine = 10, /datum/reagent/medicine/regen_jelly = 10, /datum/reagent/medicine/stimulants = 10), "<span class='boldnotice'>You feel a sudden surge of energy!</span>")
to_chat(imp_in, "<span class='notice'>You feel a sudden surge of energy!</span>")
if(!uses)
qdel(src)

View File

@@ -41,10 +41,10 @@
if(forkload)
if(M == user)
M.visible_message("<span class='notice'>[user] eats a delicious forkful of omelette!</span>")
M.reagents.add_reagent(forkload.id, 1)
M.reagents.add_reagent(forkload.type, 1)
else
M.visible_message("<span class='notice'>[user] feeds [M] a delicious forkful of omelette!</span>")
M.reagents.add_reagent(forkload.id, 1)
M.reagents.add_reagent(forkload.type, 1)
icon_state = "fork"
forkload = null

View File

@@ -339,7 +339,7 @@
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file)
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
. = ..()
if(active)
if(isinhands)

View File

@@ -25,7 +25,7 @@
/obj/item/mop/proc/clean(turf/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1))
if(reagents.has_reagent(/datum/reagent/water, 1) || reagents.has_reagent(/datum/reagent/water/holywater, 1) || reagents.has_reagent(/datum/reagent/consumable/ethanol/vodka, 1) || reagents.has_reagent(/datum/reagent/space_cleaner, 1))
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
A.clean_blood()
for(var/obj/effect/O in A)
@@ -98,7 +98,7 @@
stamusage = 1
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
var/refill_reagent = /datum/reagent/water //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/mop/advanced/New()
..()

View File

@@ -98,7 +98,7 @@
/obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H)
H.adjustToxLoss(-15)
H.setOxyLoss(0)
H.reagents.add_reagent("inaprovaline", 5)
H.reagents.add_reagent(/datum/reagent/medicine/inaprovaline, 5)
/obj/item/banner/science
name = "sciencia banner"

View File

@@ -814,3 +814,93 @@
return
else
to_chat(user, "<span class='danger'>Your gripper cannot hold \the [target].</span>")
/obj/item/weapon/gripper/mining
name = "shelter capsule deployer"
desc = "A simple grasping tool for carrying and deploying shelter capsules."
icon_state = "gripper_mining"
can_hold = list(
/obj/item/survivalcapsule
)
/obj/item/weapon/gripper/mining/attack_self()
if(wrapped)
wrapped.forceMove(get_turf(wrapped))
wrapped.attack_self()
wrapped = null
return
/obj/item/gun/energy/plasmacutter/cyborg
name = "cyborg plasma cutter"
desc = "A basic variation of the plasma cutter, compressed into a cyborg chassis. Less effective than normal plasma cutters."
force = 15
ammo_type = list(/obj/item/ammo_casing/energy/plasma/weak)
can_charge = FALSE
selfcharge = EGUN_SELFCHARGE_BORG
cell_type = /obj/item/stock_parts/cell/secborg
charge_delay = 5
/obj/item/cyborg_clamp
name = "cyborg loading clamp"
desc = "Equipment for supply cyborgs. Lifts objects and loads them into cargo. Will not carry living beings."
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_clamp"
tool_behaviour = TOOL_RETRACTOR
item_flags = NOBLUDGEON
flags_1 = NONE
var/cargo_capacity = 8
var/cargo = list()
/obj/item/cyborg_clamp/attack(mob/M, mob/user, def_zone)
return
/obj/item/cyborg_clamp/afterattack(atom/movable/target, mob/user, proximity)
. = ..()
if(!proximity)
return FALSE
if(isobj(target))
var/obj/O = target
if(!O.anchored)
if(contents.len < cargo_capacity)
user.visible_message("[user] lifts [target] and starts to load it into its cargo compartment.")
O.anchored = TRUE
if(do_mob(user, O, 20))
for(var/mob/chump in target.GetAllContents())
to_chat(user, "<span class='warning'>Error: Living entity detected in [target]. Cannot load.</span>")
O.anchored = initial(O.anchored)
return
for(var/obj/item/disk/nuclear/diskie in target.GetAllContents())
to_chat(user, "<span class='warning'>Error: Nuclear class authorization device detected in [target]. Cannot load.</span>")
O.anchored = initial(O.anchored)
return
if(contents.len < cargo_capacity) //check both before and after
cargo += O
O.forceMove(src)
O.anchored = FALSE
to_chat(user, "<span class='notice'>[target] successfully loaded.</span>")
playsound(loc, 'sound/effects/bin_close.ogg', 50, 0)
else
to_chat(user, "<span class='warning'>Not enough room in cargo compartment! Maximum of [cargo_capacity] objects!</span>")
O.anchored = initial(O.anchored)
return
else
O.anchored = initial(O.anchored)
else
to_chat(user, "<span class='warning'>Not enough room in cargo compartment! Maximum of eight objects!</span>")
else
to_chat(user, "<span class='warning'>[target] is firmly secured!</span>")
/obj/item/cyborg_clamp/attack_self(mob/user)
var/obj/chosen_cargo = input(user, "Drop what?") as null|anything in cargo
if(!chosen_cargo)
return
chosen_cargo.forceMove(get_turf(chosen_cargo))
cargo -= chosen_cargo
user.visible_message("[user] unloads [chosen_cargo] from its cargo.")
playsound(loc, 'sound/effects/bin_close.ogg', 50, 0)
/obj/item/card/id/miningborg
name = "mining point card"
desc = "A robotic ID strip used for claiming and transferring mining points. Must be held in an active slot to transfer points."
access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
icon_state = "data_1"

View File

@@ -173,32 +173,64 @@
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
/obj/item/borg/upgrade/premiumka
name = "mining cyborg premium KA"
desc = "A premium kinetic accelerator replacement for the mining module's standard kinetic accelerator."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = list(/obj/item/robot_module/miner)
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
/obj/item/borg/upgrade/premiumka/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA in R.module)
for(var/obj/item/borg/upgrade/modkit/M in KA.modkits)
M.uninstall(src)
R.module.remove_module(KA, TRUE)
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
var/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg/PKA = new /obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg(R.module)
R.module.basic_modules += PKA
R.module.add_module(PKA, FALSE, TRUE)
/obj/item/borg/upgrade/soh/deactivate(mob/living/silicon/robot/R, user = usr)
/obj/item/borg/upgrade/premiumka/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/storage/bag/ore/holding/H in R.module)
R.module.remove_module(H, TRUE)
for(var/obj/item/gun/energy/kinetic_accelerator/premiumka/cyborg/PKA in R.module)
for(var/obj/item/borg/upgrade/modkit/M in PKA.modkits)
M.uninstall(src)
R.module.remove_module(PKA, TRUE)
var/obj/item/storage/bag/ore/cyborg/S = new (R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
var/obj/item/gun/energy/kinetic_accelerator/cyborg/KA = new (R.module)
R.module.basic_modules += KA
R.module.add_module(KA, FALSE, TRUE)
/obj/item/borg/upgrade/advcutter
name = "mining cyborg advanced plasma cutter"
desc = "An upgrade for the mining cyborgs plasma cutter, bringing it to advanced operation."
icon_state = "cyborg_upgrade3"
require_module = 1
module_type = list(/obj/item/robot_module/miner)
/obj/item/borg/upgrade/advcutter/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/gun/energy/plasmacutter/cyborg/C in R.module)
C.name = "advanced cyborg plasma cutter"
C.desc = "An improved version of the cyborg plasma cutter. Baring functionality identical to the standard hand held version."
C.icon_state = "adv_plasmacutter"
for(var/obj/item/ammo_casing/energy/plasma/weak/L in C.ammo_type)
L.projectile_type = /obj/item/projectile/plasma/adv
/obj/item/borg/upgrade/advcutter/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/gun/energy/plasmacutter/cyborg/C in R.module)
C.name = initial(name)
C.desc = initial(desc)
C.icon_state = initial(icon_state)
for(var/obj/item/ammo_casing/energy/plasma/weak/L in C.ammo_type)
L.projectile_type = initial(L.projectile_type)
/obj/item/borg/upgrade/tboh
name = "janitor cyborg trash bag of holding"
@@ -434,15 +466,15 @@
name = "medical cyborg expanded hypospray"
desc = "An upgrade to the Medical module's hypospray, allowing it \
to treat a wider range of conditions and problems."
additional_reagents = list("mannitol", "oculine", "inacusiate",
"mutadone", "haloperidol")
additional_reagents = list(/datum/reagent/medicine/mannitol, /datum/reagent/medicine/oculine, /datum/reagent/medicine/inacusiate,
/datum/reagent/medicine/mutadone, /datum/reagent/medicine/haloperidol)
/obj/item/borg/upgrade/hypospray/high_strength
name = "medical cyborg high-strength hypospray"
desc = "An upgrade to the Medical module's hypospray, containing \
stronger versions of existing chemicals."
additional_reagents = list("oxandrolone", "sal_acid", "rezadone",
"pen_acid")
additional_reagents = list(/datum/reagent/medicine/oxandrolone, /datum/reagent/medicine/sal_acid,
/datum/reagent/medicine/rezadone, /datum/reagent/medicine/pen_acid)
/obj/item/borg/upgrade/piercing_hypospray
name = "cyborg piercing hypospray"

Some files were not shown because too many files have changed in this diff Show More