Merge remote-tracking branch 'citadel/master' into colormates

This commit is contained in:
silicons
2020-12-12 01:56:37 -07:00
30 changed files with 1914 additions and 1694 deletions

View File

@@ -131,7 +131,7 @@
for(var/mob/living/mob in thunderdome)
qdel(mob) //Clear mobs
for(var/obj/obj in thunderdome)
if(!istype(obj, /obj/machinery/camera))
if(!istype(obj, /obj/machinery/camera) && !istype(obj, /obj/effect/abstract/proximity_checker))
qdel(obj) //Clear objects
var/area/template = locate(/area/tdome/arena_source)

View File

@@ -45,8 +45,12 @@
desc = "A solid wall of slightly twitching tendrils with a reflective glow."
damaged_desc = "A wall of twitching tendrils with a reflective glow."
icon_state = "blob_glow"
flags_1 = DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_SHINY
point_return = 8
max_integrity = 100
brute_resist = 1
explosion_block = 2
/obj/structure/blob/shield/reflective/check_projectile_ricochet(obj/item/projectile/P)
return PROJECTILE_RICOCHET_FORCE

View File

@@ -68,6 +68,10 @@
R.reaction(turfing ? target : target.loc, TOUCH, 1, 0)
if(!turfing)
R.trans_to(target, R.total_volume * (spill ? G.fluid_transfer_factor : 1))
overlay_fullscreen("flash", /obj/screen/fullscreen/flash) // To be more true to the hentai
clear_fullscreen("flash", 20)
G.last_orgasmed = world.time
R.clear_reagents()

View File

@@ -147,6 +147,14 @@
crate_name = "fuel tank crate"
crate_type = /obj/structure/closet/crate/large
/datum/supply_pack/materials/hightankfuel
name = "Large Fuel Tank Crate"
desc = "Contains a high-capacity fuel tank. Keep contents away from open flame."
cost = 2000
contains = list(/obj/structure/reagent_dispensers/fueltank/high)
crate_name = "high-capacity fuel tank crate"
crate_type = /obj/structure/closet/crate/large
/datum/supply_pack/materials/watertank
name = "Water Tank Crate"
desc = "Contains a tank of dihydrogen monoxide... sounds dangerous."

View File

@@ -179,7 +179,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
///loadout stuff
var/gear_points = 10
var/list/gear_categories
var/list/chosen_gear = list()
var/list/loadout_data = list()
var/loadout_slot = 1 //goes from 1 to MAXIMUM_LOADOUT_SAVES
var/gear_category
var/gear_subcategory
@@ -806,6 +807,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<br>"
if(3)
//calculate your gear points from the chosen item
gear_points = CONFIG_GET(number/initial_gear_points)
var/list/chosen_gear = loadout_data["SAVE_[loadout_slot]"]
if(chosen_gear)
for(var/loadout_item in chosen_gear)
var/loadout_item_path = loadout_item[LOADOUT_ITEM]
if(loadout_item_path)
var/datum/gear/loadout_gear = text2path(loadout_item_path)
if(loadout_gear)
gear_points -= initial(loadout_gear.cost)
else
chosen_gear = list()
dat += "<table align='center' width='100%'>"
dat += "<tr><td colspan=4><center><b><font color='[gear_points == 0 ? "#E62100" : "#CCDDFF"]'>[gear_points]</font> loadout points remaining.</b> \[<a href='?_src_=prefs;preference=gear;clear_loadout=1'>Clear Loadout</a>\]</center></td></tr>"
dat += "<tr><td colspan=4><center>You can only choose one item per category, unless it's an item that spawns in your backpack or hands.</center></td></tr>"
@@ -861,15 +875,27 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(donoritem && !gear.donator_ckey_check(user.ckey))
continue
var/class_link = ""
if(gear.type in chosen_gear)
var/list/loadout_item = has_loadout_gear(loadout_slot, "[gear.type]")
var/extra_color_data = ""
if(loadout_item)
class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=0'"
if(gear.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC)
extra_color_data += "<BR><a href='?_src_=prefs;preference=gear;loadout_color_polychromic=1;loadout_gear_name=[html_encode(gear.name)];'>Color</a>"
for(var/loadout_color in loadout_item[LOADOUT_COLOR])
extra_color_data += "<span style='border: 1px solid #161616; background-color: [loadout_color];'>&nbsp;&nbsp;&nbsp;</span>"
else
var/loadout_color_non_poly = "#FFFFFF"
if(length(loadout_item[LOADOUT_COLOR]))
loadout_color_non_poly = loadout_item[LOADOUT_COLOR][1]
extra_color_data += "<BR><a href='?_src_=prefs;preference=gear;loadout_color=1;loadout_gear_name=[html_encode(gear.name)];'>Color</a>"
extra_color_data += "<span style='border: 1px solid #161616; background-color: [loadout_color_non_poly];'>&nbsp;&nbsp;&nbsp;</span>"
else if(gear_points <= 0)
class_link = "style='white-space:normal;' class='linkOff'"
else if(donoritem)
class_link = "style='white-space:normal;background:#ebc42e;' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=1'"
else
class_link = "style='white-space:normal;' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=1'"
dat += "<tr style='vertical-align:top;'><td width=15%><a [class_link]>[name]</a></td>"
dat += "<tr style='vertical-align:top;'><td width=15%><a [class_link]>[name]</a>[extra_color_data]</td>"
dat += "<td width = 5% style='vertical-align:top'>[gear.cost]</td><td>"
if(islist(gear.restricted_roles))
if(gear.restricted_roles.len)
@@ -2609,8 +2635,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
current_tab = text2num(href_list["tab"])
if(href_list["preference"] == "gear")
if(href_list["clear_loadout"])
chosen_gear = list()
gear_points = CONFIG_GET(number/initial_gear_points)
loadout_data["SAVE_[loadout_slot]"] = list()
save_preferences()
if(href_list["select_category"])
gear_category = html_decode(href_list["select_category"])
@@ -2623,10 +2648,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(!G)
return
var/toggle = text2num(href_list["toggle_gear"])
if(!toggle && (G.type in chosen_gear))//toggling off and the item effectively is in chosen gear)
chosen_gear -= G.type
gear_points += initial(G.cost)
else if(toggle && (!(is_type_in_ref_list(G, chosen_gear))))
if(!toggle && has_loadout_gear(loadout_slot, "[G.type]"))//toggling off and the item effectively is in chosen gear)
remove_gear_from_loadout(loadout_slot, "[G.type]")
else if(toggle && !(has_loadout_gear(loadout_slot, "[G.type]")))
if(!is_loadout_slot_available(G.category))
to_chat(user, "<span class='danger'>You cannot take this loadout, as you've already chosen too many of the same category!</span>")
return
@@ -2634,8 +2658,46 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user, "<span class='danger'>This is an item intended for donator use only. You are not authorized to use this item.</span>")
return
if(gear_points >= initial(G.cost))
chosen_gear += G.type
gear_points -= initial(G.cost)
var/list/new_loadout_data = list(LOADOUT_ITEM = "[G.type]")
if(length(G.loadout_initial_colors))
new_loadout_data[LOADOUT_COLOR] = G.loadout_initial_colors
else
new_loadout_data[LOADOUT_COLOR] = list("#FFFFFF")
if(loadout_data["SAVE_[loadout_slot]"])
loadout_data["SAVE_[loadout_slot]"] += list(new_loadout_data) //double packed because it does the union of the CONTENTS of the lists
else
loadout_data["SAVE_[loadout_slot]"] = list(new_loadout_data) //double packed because you somehow had no save slot in your loadout?
if(href_list["loadout_color"])
var/name = html_decode(href_list["loadout_gear_name"])
var/datum/gear/G = GLOB.loadout_items[gear_category][gear_subcategory][name]
if(!G)
return
var/user_gear = has_loadout_gear(loadout_slot, "[G.type]")
if(!user_gear)
return
if(!length(user_gear[LOADOUT_COLOR]))
user_gear[LOADOUT_COLOR] = list("#FFFFFF")
var/current_color = user_gear[LOADOUT_COLOR][1]
var/new_color = input(user, "Polychromic options", "Choose Color", current_color) as color|null
user_gear[LOADOUT_COLOR][1] = sanitize_hexcolor(new_color, 6, TRUE, current_color)
if(href_list["loadout_color_polychromic"])
var/name = html_decode(href_list["loadout_gear_name"])
var/datum/gear/G = GLOB.loadout_items[gear_category][gear_subcategory][name]
if(!G)
return
var/user_gear = has_loadout_gear(loadout_slot, "[G.type]")
if(!user_gear)
return
var/list/color_options = list()
for(var/i=1, i<=length(G.loadout_initial_colors), i++)
color_options += "Color [i]"
var/color_to_change = input(user, "Polychromic options", "Recolor [name]") as null|anything in color_options
if(color_to_change)
var/color_index = text2num(copytext(color_to_change, 7))
var/current_color = user_gear[LOADOUT_COLOR][color_index]
var/new_color = input(user, "Polychromic options", "Choose [color_to_change] Color", current_color) as color|null
if(new_color)
user_gear[LOADOUT_COLOR][color_index] = sanitize_hexcolor(new_color, 6, TRUE, current_color)
ShowChoices(user)
return 1
@@ -2853,8 +2915,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
/datum/preferences/proc/is_loadout_slot_available(slot)
var/list/L
LAZYINITLIST(L)
for(var/i in chosen_gear)
var/datum/gear/G = i
for(var/i in loadout_data["SAVE_[loadout_slot]"])
var/datum/gear/G = i[LOADOUT_ITEM]
var/occupied_slots = L[initial(G.category)] ? L[initial(G.category)] + 1 : 1
LAZYSET(L, initial(G.category), occupied_slots)
switch(slot)
@@ -2868,6 +2930,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(L[slot] < DEFAULT_SLOT_AMT)
return TRUE
/datum/preferences/proc/has_loadout_gear(save_slot, gear_type)
var/list/gear_list = loadout_data["SAVE_[save_slot]"]
for(var/loadout_gear in gear_list)
if(loadout_gear[LOADOUT_ITEM] == gear_type)
return loadout_gear
return FALSE
/datum/preferences/proc/remove_gear_from_loadout(save_slot, gear_type)
var/find_gear = has_loadout_gear(save_slot, gear_type)
if(find_gear)
loadout_data["SAVE_[save_slot]"] -= list(find_gear)
#undef DEFAULT_SLOT_AMT
#undef HANDS_SLOT_AMT
#undef BACKPACK_SLOT_AMT

View File

@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 46
#define SAVEFILE_VERSION_MAX 47
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -262,6 +262,29 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["color_scheme"] = OLD_CHARACTER_COLORING //advanced is off by default
if(current_version < 47) //loadout save gets changed to json
var/text_to_load
S["loadout"] >> text_to_load
var/list/saved_loadout_paths = splittext(text_to_load, "|")
//MAXIMUM_LOADOUT_SAVES save slots per loadout now
for(var/i=1, i<= MAXIMUM_LOADOUT_SAVES, i++)
loadout_data["SAVE_[i]"] = list()
for(var/some_gear_item in saved_loadout_paths)
if(!ispath(text2path(some_gear_item)))
message_admins("Failed to copy item [some_gear_item] to new loadout system when migrating from version [current_version] to 40, issue: item is not a path")
continue
var/datum/gear/gear_item = text2path(some_gear_item)
if(!(initial(gear_item.loadout_flags) & LOADOUT_CAN_COLOR_POLYCHROMIC))
loadout_data["SAVE_1"] += list(list(LOADOUT_ITEM = some_gear_item)) //for the migration we put their old save into the first save slot, which is loaded by default!
else
//the same but we setup some new polychromic data (you can't get the initial value for a list so we have to do this horrible thing here)
var/datum/gear/temporary_gear_item = new gear_item
loadout_data["SAVE_1"] += list(list(LOADOUT_ITEM = some_gear_item, LOADOUT_COLOR = temporary_gear_item.loadout_initial_colors))
qdel(temporary_gear_item)
//it's double packed into a list because += will union the two lists contents
S["loadout"] = safe_json_encode(loadout_data)
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
return
@@ -711,20 +734,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
var/list/json_from_file = json_decode(file2text(char_vr_path))
if(json_from_file)
belly_prefs = json_from_file["belly_prefs"]
//gear loadout
var/text_to_load
S["loadout"] >> text_to_load
var/list/saved_loadout_paths = splittext(text_to_load, "|")
chosen_gear = list()
gear_points = CONFIG_GET(number/initial_gear_points)
for(var/i in saved_loadout_paths)
var/datum/gear/path = text2path(i)
if(path)
var/init_cost = initial(path.cost)
if(init_cost > gear_points)
continue
chosen_gear += path
gear_points -= init_cost
loadout_data = safe_json_decode(S["loadout"])
//try to fix any outdated data if necessary
//preference updating will handle saving the updated data for us.
@@ -1058,11 +1070,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//gear loadout
if(chosen_gear.len)
var/text_to_save = chosen_gear.Join("|")
S["loadout"] << text_to_save
if(length(loadout_data))
S["loadout"] << safe_json_encode(loadout_data)
else
S["loadout"] << "" //empty string to reset the value
S["loadout"] << safe_json_encode(list())
cit_character_pref_save(S)

View File

@@ -567,7 +567,7 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and
/datum/holiday/xmas/proc/roundstart_celebrate()
for(var/obj/machinery/computer/security/telescreen/entertainment/Monitor in GLOB.machines)
Monitor.icon_state = "entertainment_xmas"
Monitor.icon_state_on = "entertainment_xmas"
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_living_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))

View File

@@ -176,6 +176,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
//Called when cloning, copies some vars that should be kept
/datum/species/proc/copy_properties_from(datum/species/old_species)
mutant_bodyparts["limbs_id"] = old_species.mutant_bodyparts["limbs_id"]
eye_type = old_species.eye_type
mutanttongue = old_species.mutanttongue
return
//Please override this locally if you want to define when what species qualifies for what rank if human authority is enforced.

View File

@@ -123,7 +123,7 @@
/obj/structure/reagent_dispensers/plumbed/storage/ComponentInitialize()
AddComponent(/datum/component/plumbing/tank)
//////////////
//Fuel Tanks//
//////////////
@@ -134,16 +134,20 @@
icon_state = "fuel"
reagent_id = /datum/reagent/fuel
/obj/structure/reagent_dispensers/fueltank/high //Unused - Good for ghost roles
/obj/structure/reagent_dispensers/fueltank/high
name = "high-capacity fuel tank"
desc = "A now illegal tank, full of highly pressurized industrial welding fuel. Do not consume or have a open flame close to this tank."
icon_state = "fuel_high"
tank_volume = 3000
tank_volume = 5000
/obj/structure/reagent_dispensers/fueltank/boom()
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
qdel(src)
/obj/structure/reagent_dispensers/fueltank/high/boom()
explosion(get_turf(src), 0, 2, 5, flame_range = 12)
qdel(src)
/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)
boom()