This commit is contained in:
Ghommie
2019-09-01 01:59:00 +02:00
56 changed files with 287 additions and 110 deletions
+18
View File
@@ -0,0 +1,18 @@
#define DONATOR_GROUP_TIER_1_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_1_donators
#define DONATOR_GROUP_TIER_2_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_2_donators
#define DONATOR_GROUP_TIER_3_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_3_donators
#define DONATOR_GROUP_TIER_1_CONFIG_SUBPATH keyed_list/donator_group/tier_1_donators
#define DONATOR_GROUP_TIER_2_CONFIG_SUBPATH keyed_list/donator_group/tier_2_donators
#define DONATOR_GROUP_TIER_3_CONFIG_SUBPATH keyed_list/donator_group/tier_3_donators
#define TIER_1_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_1_CONFIG_SUBPATH)
#define TIER_2_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_2_CONFIG_SUBPATH)
#define TIER_3_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_3_CONFIG_SUBPATH)
//flags
#define DONATOR_GROUP_TIER_1 "T1"
#define DONATOR_GROUP_TIER_2 "T2"
#define DONATOR_GROUP_TIER_3 "T3"
#define IS_CKEY_DONATOR_GROUP(ckey, groupid) is_donator_group(ckey, groupid)
+25
View File
@@ -0,0 +1,25 @@
/*
Current specifications:
Donator groups in __DEFINES/donator_groupings.dm, config entries in controllers/configuration/entries/donator.dm
3 groups, Tier 1/2/3
Each tier includes the one before it (ascending)
For fast lookups, this is generated using regenerate_donator_grouping_list()
*/
/proc/is_donator_group(ckey, group)
ckey = ckey(ckey) //make sure it's ckey'd.
var/list/L = GLOB.donators_by_group[group]
return L && L.Find(ckey)
/proc/regenerate_donator_grouping_list()
GLOB.donators_by_group = list() //reinit everything
var/list/donator_list = GLOB.donators_by_group //cache
var/list/tier_1 = TIER_1_DONATORS
donator_list[DONATOR_GROUP_TIER_1] = tier_1.Copy() //The .Copy() is to "decouple"/make a new list, rather than letting the global list impact the config list.
var/list/tier_2 = tier_1 + TIER_2_DONATORS //Using + on lists implies making new lists, so we don't need to manually Copy().
donator_list[DONATOR_GROUP_TIER_2] = tier_2
var/list/tier_3 = tier_2 + TIER_3_DONATORS
donator_list[DONATOR_GROUP_TIER_3] = tier_3
+1
View File
@@ -1487,6 +1487,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/obj/item/reagent_containers/food/snacks/grown/nettle, // base type
/obj/item/reagent_containers/food/snacks/deepfryholder,
/obj/item/reagent_containers/food/snacks/grown/shell,
/obj/item/reagent_containers/food/snacks/clothing,
/obj/item/reagent_containers/food/snacks/store/bread
)
blocked |= typesof(/obj/item/reagent_containers/food/snacks/customizable)
+1
View File
@@ -0,0 +1 @@
GLOBAL_LIST_EMPTY(donators_by_group) //group id = donator list of ckeys
@@ -19,6 +19,7 @@
var/abstract_type = /datum/config_entry //do not instantiate if type matches this
var/vv_VAS = TRUE //Force validate and set on VV. VAS proccall guard will run regardless.
var/postload_required = FALSE //requires running OnPostload()
var/dupes_allowed = FALSE
@@ -72,6 +73,9 @@
/datum/config_entry/proc/DeprecationUpdate(value)
return
/datum/config_entry/proc/OnPostload()
return
/datum/config_entry/string
config_entry_value = ""
abstract_type = /datum/config_entry/string
@@ -80,7 +84,7 @@
/datum/config_entry/string/vv_edit_var(var_name, var_value)
return var_name != "auto_trim" && ..()
/datum/config_entry/string/ValidateAndSet(str_val)
/datum/config_entry/string/ValidateAndSet(str_val, during_load)
if(!VASProcCallGuard(str_val))
return FALSE
config_entry_value = auto_trim ? trim(str_val) : str_val
@@ -101,6 +101,7 @@
log_config("Loading config file [filename]...")
var/list/lines = world.file2list("[directory]/[filename]")
var/list/_entries = entries
var/list/postload_required = list()
for(var/L in lines)
L = trim(L)
if(!L)
@@ -157,18 +158,24 @@
else
warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
var/validated = E.ValidateAndSet(value)
var/validated = E.ValidateAndSet(value, TRUE)
if(!validated)
log_config("Failed to validate setting \"[value]\" for [entry]")
else
if(E.modified && !E.dupes_allowed)
log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
if(E.postload_required)
postload_required[E] = TRUE
E.resident_file = filename
if(validated)
E.modified = TRUE
for(var/i in postload_required)
var/datum/config_entry/E = i
E.OnPostload()
++.
/datum/controller/configuration/can_vv_get(var_name)
@@ -0,0 +1,22 @@
/datum/config_entry/keyed_list/donator_group
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
abstract_type = /datum/config_entry/keyed_list/donator_group
//If we're in the middle of a config load, only do the regeneration afterwards to prevent this from wasting a massive amount of CPU for list regenerations.
/datum/config_entry/keyed_list/donator_group/ValidateAndSet(str_val, during_load)
. = ..()
if(. && during_load)
regenerate_donator_grouping_list()
/datum/config_entry/keyed_list/donator_group/OnPostload()
. = ..()
regenerate_donator_grouping_list()
//This is kinda weird in that the config entries are defined here but all the handling/calculations are in __HELPERS/donator_groupings.dm
/datum/config_entry/keyed_list/donator_group/tier_1_donators
/datum/config_entry/keyed_list/donator_group/tier_2_donators
/datum/config_entry/keyed_list/donator_group/tier_3_donators
+2 -1
View File
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(input)
// This is for when macro sets are eventualy datumized
/datum/controller/subsystem/input/proc/setup_default_macro_sets()
var/list/static/default_macro_sets
if(default_macro_sets)
macro_sets = default_macro_sets
return
@@ -49,6 +49,7 @@ SUBSYSTEM_DEF(input)
"old_hotkeys" = list(
"Tab" = "\".winset \\\"mainwindow.macro=old_default input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
"O" = "ooc",
"L" = "looc",
"T" = "say",
"M" = "me",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"", // This makes it so backspace can remove default inputs
+1 -1
View File
@@ -61,7 +61,7 @@
/obj/item/storage/wallet/update_icon()
var/new_state = "wallet"
if(front_id)
new_state = "wallet_[front_id.icon_state]"
new_state = "wallet_id"
if(new_state != icon_state) //avoid so many icon state changes.
icon_state = new_state
+1 -1
View File
@@ -229,7 +229,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/katana/cursed
slot_flags = null
/obj/item/katana/Initialize()
/obj/item/katana/cursed/Initialize()
. = ..()
ADD_TRAIT(src, TRAIT_NODROP, CURSED_ITEM_TRAIT)
+4 -6
View File
@@ -917,11 +917,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<td width=80%><font size=2><b>Description</b></font></td></tr>"
for(var/j in GLOB.loadout_items[gear_tab])
var/datum/gear/gear = GLOB.loadout_items[gear_tab][j]
var/donoritem
if(gear.ckeywhitelist && gear.ckeywhitelist.len)
donoritem = TRUE
if(!(user.ckey in gear.ckeywhitelist))
continue
var/donoritem = gear.donoritem
if(donoritem && !gear.donator_ckey_check(user.ckey))
continue
var/class_link = ""
if(gear.type in chosen_gear)
class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(j)];toggle_gear=0'"
@@ -2241,7 +2239,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
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
if(G.ckeywhitelist && G.ckeywhitelist.len && !(user.ckey in G.ckeywhitelist))
if(G.donoritem && !G.donator_ckey_check(user.ckey))
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))
+4 -4
View File
@@ -624,19 +624,19 @@
desc = "The Multi-Augmented Severe Operations Networked Resource Integration Gear is an man-portable tank designed for extreme environmental situations. It is excessively bulky, but rated for all but the most atomic of hazards. The specialized armor is surprisingly weak to conventional weaponry. The exo slot can attach most storge bags on to the suit."
icon_state = "hardsuit-ancient"
item_state = "anc_hardsuit"
armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500)
armor = list("melee" = 20, "bullet" = 15, "laser" = 15, "energy" = 45, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
slowdown = 6 //Slow
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage, /obj/item/construction/rcd, /obj/item/pipe_dispenser)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/ancient/mason
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason
name = "M.A.S.O.N RIG helmet"
desc = "The M.A.S.O.N RIG helmet is complimentary to the rest of the armor. It features a very large, high powered flood lamp and robust flash protection."
icon_state = "hardsuit0-ancient"
item_state = "anc_helm"
armor = list("melee" = 10, "bullet" = 5, "laser" = 5, "energy" = 500, "bomb" = 500, "bio" = 500, "rad" = 500, "fire" = 500, "acid" = 500)
armor = list("melee" = 20, "bullet" = 15, "laser" = 15, "energy" = 45, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
item_color = "ancient"
brightness_on = 16
scan_reagents = TRUE
@@ -644,7 +644,7 @@
tint = 1
var/obj/machinery/doppler_array/integrated/bomb_radar
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
/obj/item/clothing/head/helmet/space/hardsuit/ancient/mason/Initialize()
. = ..()
+10 -8
View File
@@ -703,14 +703,6 @@
fitted = NO_FEMALE_UNIFORM
can_adjust = FALSE
resistance_flags = NONE
/obj/item/clothing/under/durathread
name = "durathread jumpsuit"
desc = "A jumpsuit made from durathread, its resilient fibres provide some protection to the wearer."
icon_state = "durathread"
item_state = "durathread"
item_color = "durathread"
can_adjust = FALSE
armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5)
/obj/item/clothing/under/gear_harness
name = "gear harness"
@@ -725,5 +717,15 @@
icon_state = "durathread"
item_state = "durathread"
item_color = "durathread"
can_adjust = TRUE
armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5)
/obj/item/clothing/under/duraskirt
name = "durathread jumpskirt"
desc = "A jumpsuit made from durathread, its resilient fibres provide some protection to the wearer. Being a short skirt, it naturally doesn't protect the legs."
icon_state = "duraskirt"
item_state = "duraskirt"
item_color = "durathread"
can_adjust = FALSE
body_parts_covered = CHEST|GROIN|ARMS
armor = list("melee" = 10, "laser" = 10, "fire" = 40, "acid" = 10, "bomb" = 5)
@@ -224,6 +224,10 @@
species = "strawberry"
plantname = "Strawberry Vine"
product = /obj/item/reagent_containers/food/snacks/grown/strawberry
growthstages = 6
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "strawberry-grow"
icon_dead = "berry-dead"
reagents_add = list("vitamin" = 0.07, "nutriment" = 0.1, "sugar" = 0.2)
mutatelist = list()
+27
View File
@@ -0,0 +1,27 @@
// Peach
/obj/item/seeds/peach
name = "pack of peach seeds"
desc = "These seeds grow into peach trees."
icon_state = "seed-peach"
species = "peach"
plantname = "Peach Tree"
product = /obj/item/reagent_containers/food/snacks/grown/peach
lifespan = 65
endurance = 40
yield = 3
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "peach-grow"
icon_dead = "peach-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
reagents_add = list("vitamin" = 0.04, "nutriment" = 0.1)
/obj/item/reagent_containers/food/snacks/grown/peach
seed = /obj/item/seeds/peach
name = "peach"
desc = "It's fuzzy!"
icon_state = "peach"
filling_color = "#FF4500"
bitesize = 25
foodtype = FRUIT
juice_results = list("peachjuice" = 0)
tastes = list("peach" = 1)
@@ -787,30 +787,30 @@
/obj/item/melee/ghost_sword/process()
ghost_check()
/obj/item/melee/ghost_sword/proc/ghost_check()
var/ghost_counter = 0
var/turf/T = get_turf(src)
var/list/contents = T.GetAllContents()
var/mob/dead/observer/current_spirits = list()
for(var/thing in contents)
var/atom/A = thing
A.transfer_observers_to(src)
for(var/i in orbiters?.orbiters)
if(!isobserver(i))
/obj/item/melee/ghost_sword/proc/recursive_orbit_collect(atom/A, list/L)
for(var/i in A.orbiters?.orbiters)
if(!isobserver(i) || (i in L))
continue
L |= i
recursive_orbit_collect(i, L)
/obj/item/melee/ghost_sword/proc/ghost_check()
var/list/mob/dead/observer/current_spirits = list()
recursive_orbit_collect(src, current_spirits)
recursive_orbit_collect(loc, current_spirits) //anything holding us
for(var/i in spirits - current_spirits)
var/mob/dead/observer/G = i
ghost_counter++
G.invisibility = 0
current_spirits |= G
for(var/mob/dead/observer/G in spirits - current_spirits)
G.invisibility = GLOB.observer_default_invisibility
for(var/i in current_spirits)
var/mob/dead/observer/G = i
G.invisibility = 0
spirits = current_spirits
return ghost_counter
return length(spirits)
/obj/item/melee/ghost_sword/attack(mob/living/target, mob/living/carbon/human/user)
force = 0
var/ghost_counter = ghost_check()
@@ -1335,4 +1335,4 @@
if(2)
new /obj/item/wisp_lantern(src)
if(3)
new /obj/item/prisoncube(src)
new /obj/item/prisoncube(src)
+1 -1
View File
@@ -702,7 +702,7 @@
clear_fullscreen("critvision")
//Oxygen damage overlay
var/windedup = getOxyLoss() + getStaminaLoss() * 0.2 + stamdamageoverlaytemp
var/windedup = getOxyLoss() + getStaminaLoss() * 0.2
if(windedup)
var/severity = 0
switch(windedup)
@@ -61,6 +61,5 @@
var/next_hallucination = 0
var/cpr_time = 1 //CPR cooldown.
var/damageoverlaytemp = 0
var/stamdamageoverlaytemp = 0
var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects
@@ -25,11 +25,11 @@
var/age = 30 //Player's age
var/underwear = "Nude" //Which underwear the player wants
var/undie_color = "#FFFFFF"
var/undie_color = "FFFFFF"
var/undershirt = "Nude" //Which undershirt the player wants
var/shirt_color = "#FFFFFF"
var/shirt_color = "FFFFFF"
var/socks = "Nude" //Which socks the player wants
var/socks_color = "#FFFFFF"
var/socks_color = "FFFFFF"
var/backbag = DBACKPACK //Which backpack type the player has chosen.
var/jumpsuit_style = PREF_SUIT //suit/skirt
@@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/digilegs = (DIGITIGRADE in species_traits) ? "_d" : ""
var/mutable_appearance/MA = mutable_appearance(S.icon, "[S.icon_state][digilegs]", -BODY_LAYER)
if(UNDIE_COLORABLE(S))
MA.color = "[H.socks_color]"
MA.color = "#[H.socks_color]"
standing += MA
if(standing.len)
@@ -1781,7 +1781,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(CLONE)
H.adjustCloneLoss(damage * hit_percent * H.physiology.clone_mod)
if(STAMINA)
H.stamdamageoverlaytemp = 20
if(BP)
if(damage > 0 ? BP.receive_damage(0, 0, damage * hit_percent * H.physiology.stamina_mod) : BP.heal_damage(0, 0, abs(damage * hit_percent * H.physiology.stamina_mod), only_robotic = FALSE, only_organic = FALSE))
H.update_stamina()
+1 -2
View File
@@ -4,9 +4,8 @@
if(notransform)
return
if(damageoverlaytemp || stamdamageoverlaytemp)
if(damageoverlaytemp)
damageoverlaytemp = 0
stamdamageoverlaytemp = 0
update_damage_hud()
if(stat != DEAD) //Reagent processing needs to come before breathing, to prevent edge cases.
@@ -69,7 +69,7 @@
if(Target.Adjacent(src))
Target.attack_slime(src)
return
break
if(!Target.lying && prob(80))
if(Target.client && Target.health >= 20)
+6 -2
View File
@@ -457,13 +457,17 @@
set name = ".click"
set hidden = TRUE
set category = null
return
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .click macro!"
log_admin(msg)
message_admins(msg)
/mob/verb/DisDblClick(argu = null as anything, sec = "" as text, number1 = 0 as num , number2 = 0 as num)
set name = ".dblclick"
set hidden = TRUE
set category = null
return
var/msg = "[key_name_admin(src)]([ADMIN_KICK(src)]) attempted to use the .dblclick macro!"
log_admin(msg)
message_admins(msg)
/mob/Topic(href, href_list)
if(href_list["mach_close"])
@@ -127,15 +127,14 @@
/obj/item/gun/ballistic/rocketlauncher/attackby(obj/item/A, mob/user, params)
if(magazine && istype(A, /obj/item/ammo_casing))
if(user.temporarilyRemoveItemFromInventory(A))
if(!chambered)
to_chat(user, "<span class='notice'>You load a new [A] into \the [src].</span>")
playsound(src, "gun_insert_full_magazine", 70, 1)
chamber_round()
update_icon()
return TRUE
else
to_chat(user, "<span class='warning'>You cannot seem to get \the [A] out of your hands!</span>")
if(chambered)
to_chat(user, "<span class='notice'>[src] already has a [magazine_wording] chambered.</span>")
return
if(magazine.attackby(A, user, silent = TRUE))
to_chat(user, "<span class='notice'>You load a new [A] into \the [src].</span>")
playsound(src, "gun_insert_full_magazine", 70, 1)
chamber_round()
update_icon()
/obj/item/gun/ballistic/rocketlauncher/update_icon()
icon_state = "[initial(icon_state)]-[chambered ? "1" : "0"]"
@@ -40,7 +40,7 @@
if(istype(user) && user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return//CIT CHANGE - ditto
pump(user)
pump(user, TRUE)
recentpump = world.time + 10
if(istype(user))//CIT CHANGE - makes pumping shotguns cost a lil bit of stamina.
user.adjustStaminaLossBuffered(2) //CIT CHANGE - DITTO. make this scale inversely to the strength stat when stats/skills are added
@@ -52,7 +52,9 @@
process_fire(user, user, FALSE)
. = 1
/obj/item/gun/ballistic/shotgun/proc/pump(mob/M)
/obj/item/gun/ballistic/shotgun/proc/pump(mob/M, visible = TRUE)
if(visible)
M.visible_message("<span class='warning'>[M] racks [src].</span>", "<span class='warning'>You rack [src].</span>")
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
pump_unload(M)
pump_reload(M)
@@ -447,15 +447,6 @@
"portadrive_basic", "portadrive_advanced", "portadrive_super", "cardslot", "aislot", "miniprinter", "APClink", "bat_control", "bat_normal", "bat_advanced",
"bat_super", "bat_micro", "bat_nano", "cpu_normal", "pcpu_normal", "cpu_small", "pcpu_small")
/datum/techweb_node/computer_board_gaming
id = "computer_board_gaming"
display_name = "Arcade Games"
description = "For the slackers on the station."
prereq_ids = list("comptech")
design_ids = list("arcade_battle", "arcade_orion", "slotmachine") // Magic money
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1500)
export_price = 2000
/datum/techweb_node/comp_recordkeeping
id = "comp_recordkeeping"
display_name = "Computerized Recordkeeping"
+1
View File
@@ -24,6 +24,7 @@
/obj/item/seeds/lime = 3,
/obj/item/seeds/onion = 3,
/obj/item/seeds/orange = 3,
/obj/item/seeds/peach = 3,
/obj/item/seeds/peanutseed = 3,
/obj/item/seeds/pineapple = 3,
/obj/item/seeds/potato = 3,