diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 632e4adef9..f5ea8d835f 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -4,9 +4,9 @@ #define WEIGHT_CLASS_TINY 1 //Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money #define WEIGHT_CLASS_SMALL 2 //Pockets can hold small and tiny items, ex: Flashlight, Multitool, Grenades, GPS Device #define WEIGHT_CLASS_NORMAL 3 //Standard backpacks can carry tiny, small & normal items, ex: Fire extinguisher, Stunbaton, Gas Mask, Metal Sheets -#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in an inventory, ex: Defibrillator, Backpack, Space Suits -#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons -#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe +#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in a normal bag, ex: Defibrillator, Backpack, Space Suits +#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons - Can not fit in Boh +#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh //Inventory depth: limits how many nested storage items you can access directly. //1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 1b7cade71f..c3db8552c6 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -12,6 +12,7 @@ SUBSYSTEM_DEF(persistence) var/list/obj/structure/chisel_message/chisel_messages = list() var/list/saved_messages = list() var/list/saved_modes = list(1,2,3) + var/list/saved_threat_levels = list(1,1,1) var/list/saved_maps var/list/saved_trophies = list() var/list/spawned_objects = list() @@ -27,6 +28,7 @@ SUBSYSTEM_DEF(persistence) LoadChiselMessages() LoadTrophies() LoadRecentModes() + LoadRecentThreats() LoadRecentMaps() LoadPhotoPersistence() if(CONFIG_GET(flag/use_antag_rep)) @@ -166,6 +168,15 @@ SUBSYSTEM_DEF(persistence) return saved_modes = json["data"] +/datum/controller/subsystem/persistence/proc/LoadRecentThreats() + var/json_file = file("data/RecentThreatLevels.json") + if(!fexists(json_file)) + return + var/list/json = json_decode(file2text(json_file)) + if(!json) + return + saved_threat_levels = json["data"] + /datum/controller/subsystem/persistence/proc/LoadRecentMaps() var/json_file = file("data/RecentMaps.json") if(!fexists(json_file)) @@ -216,6 +227,7 @@ SUBSYSTEM_DEF(persistence) CollectSecretSatchels() CollectTrophies() CollectRoundtype() + CollectThreatLevel() RecordMaps() SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION. if(CONFIG_GET(flag/use_antag_rep)) @@ -372,6 +384,18 @@ SUBSYSTEM_DEF(persistence) fdel(json_file) WRITE_FILE(json_file, json_encode(file_data)) +/datum/controller/subsystem/persistence/proc/CollectThreatLevel() + if(istype(SSticker.mode, /datum/game_mode/dynamic)) + var/datum/game_mode/dynamic/mode = SSticker.mode + saved_threat_levels[3] = saved_threat_levels[2] + saved_threat_levels[2] = saved_threat_levels [1] + saved_threat_levels[1] = mode.threat_level + var/json_file = file("data/RecentThreatLevels.json") + var/list/file_data = list() + file_data["data"] = saved_threat_levels + fdel(json_file) + WRITE_FILE(json_file, json_encode(file_data)) + /datum/controller/subsystem/persistence/proc/RecordMaps() saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]") var/json_file = file("data/RecentMaps.json") diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 50be61f91d..dee10e4998 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -153,6 +153,10 @@ SUBSYSTEM_DEF(vote) 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.") GLOB.master_mode = "dynamic" + if("extended" in choices) + if(. == "extended") + GLOB.dynamic_forced_extended = TRUE // we still do the rest of the stuff + choices[PEACE] += choices["extended"] var/mean = 0 var/voters = 0 for(var/client/c in GLOB.clients) @@ -253,7 +257,11 @@ SUBSYSTEM_DEF(vote) if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote choices.Add("secret", "extended") if("dynamic") - choices.Add(PEACE,CHAOS) + var/saved_threats = SSpersistence.saved_threat_levels + if((saved_threats[1]+saved_threats[2]+saved_threats[3])>150) + choices.Add("extended",PEACE,CHAOS) + else + choices.Add(PEACE,CHAOS) if("custom") question = stripped_input(usr,"What is the vote for?") if(!question) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index 83a3debfdc..25edd0c68b 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -409,7 +409,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) message_admins("Drafting players for forced ruleset [rule.name].") log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].") rule.mode = src - rule.acceptable(GLOB.player_list.len, threat_level) // Assigns some vars in the modes, running it here for consistency + rule.acceptable(roundstart_pop_ready, threat_level) // Assigns some vars in the modes, running it here for consistency rule.candidates = candidates.Copy() rule.trim_candidates() if (rule.ready(TRUE)) @@ -421,7 +421,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) return TRUE var/list/drafted_rules = list() for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules) - if (rule.acceptable(GLOB.player_list.len, threat_level) && threat >= rule.cost) // If we got the population and threat required + if (rule.acceptable(roundstart_pop_ready, threat_level) && threat >= rule.cost) // If we got the population and threat required rule.candidates = candidates.Copy() rule.trim_candidates() if (rule.ready() && rule.candidates.len > 0) @@ -429,12 +429,12 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) if(!drafted_rules.len) message_admins("Not enough threat level for roundstart antags!") log_game("DYNAMIC: Not enough threat level for roundstart antags!") - var/indice_pop = min(10,round(GLOB.player_list.len/pop_per_requirement)+1) + var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1) extra_rulesets_amount = 0 if (GLOB.dynamic_classic_secret) extra_rulesets_amount = 0 else - if (GLOB.player_list.len > GLOB.dynamic_high_pop_limit) + if (roundstart_pop_ready > GLOB.dynamic_high_pop_limit) message_admins("High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.") log_game("DYNAMIC: High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.") if (threat_level > high_pop_second_rule_req) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index a79eb299da..f6e169a4d5 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -60,7 +60,7 @@ . = ..() var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_big_nesting = TRUE - STR.max_w_class = WEIGHT_CLASS_GIGANTIC + STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 35 /obj/item/storage/backpack/holding/suicide_act(mob/living/user) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index fec17cfa69..d16453e02f 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -216,7 +216,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK force = 40 throwforce = 10 - w_class = WEIGHT_CLASS_HUGE + w_class = WEIGHT_CLASS_BULKY hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 @@ -427,7 +427,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' item_flags = ABSTRACT | DROPDEL - w_class = WEIGHT_CLASS_HUGE + w_class = WEIGHT_CLASS_BULKY force = 24 throwforce = 0 throw_range = 0 @@ -512,7 +512,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 force = 10 throwforce = 12 attack_verb = list("beat", "smacked") - w_class = WEIGHT_CLASS_HUGE + w_class = WEIGHT_CLASS_BULKY var/homerun_ready = 0 var/homerun_able = 0 total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google diff --git a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm index ebfb219c9a..2f0db73bfc 100644 --- a/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm +++ b/code/modules/antagonists/clockcult/clock_structures/traps/brass_skewer.dm @@ -113,7 +113,7 @@ "You start tenderly lifting [skewee] off of [src]...") if(!do_after(user, 60, target = skewee)) skewee.visible_message("[skewee] painfully slides back down [src].") - skewee.emote("moan") + skewee.say("Oof, ouch owwie!!", forced = "fail brass skewer removal") return skewee.visible_message("[skewee] comes free of [src] with a squelching pop!", \ "You come free of [src]!") diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index d6e99f7361..4429c8426f 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -59,6 +59,7 @@ to_chat(owner, "[src] breaks down as it tries to activate.") else owner.revive(full_heal = 1) + owner.log_message("[owner] used an implanted [src] to heal themselves! Keep fighting, it's just a flesh wound!", LOG_ATTACK, color="green") //Logging for implanted legion core use qdel(src) /obj/item/organ/regenerative_core/on_life() @@ -85,6 +86,21 @@ SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) H.revive(full_heal = 1) qdel(src) + user.log_message("[user] used [src] to heal [H]! Wake the fuck up, Samurai!", LOG_ATTACK, color="green") //Logging for 'old' style legion core use, when clicking on a sprite of yourself or another. + +/obj/item/organ/regenerative_core/attack_self(mob/user) //Knouli's first hack! Allows for the use of the core in hand rather than needing to click on the target, yourself, to selfheal. Its a rip of the proc just above - but skips on distance check and only uses 'user' rather than 'target' + if(ishuman(user)) //Check if user is human, no need for distance check as it's self heal + var/mob/living/carbon/human/H = user //Set H to user rather than target + if(inert) //Inert cores are useless + to_chat(user, "[src] has decayed and can no longer be used to heal.") + return + else //Skip on check if the target to be healed is dead as, if you are dead, you're not going to be able to use it on yourself! + to_chat(user, "You start to smear [src] on yourself. It feels and smells disgusting, but you feel amazingly refreshed in mere moments.") + SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self")) + H.revive(full_heal = 1) + qdel(src) + H.log_message("[H] used [src] to heal themselves! Making use of Knouli's sexy and intelligent use-in-hand proc!", LOG_ATTACK, color="green") //Logging for 'new' style legion core use, when using the core in-hand. + /obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE) . = ..() diff --git a/code/modules/mob/living/carbon/human/species_types/bugmen.dm b/code/modules/mob/living/carbon/human/species_types/bugmen.dm index d264f11b73..02163eaaed 100644 --- a/code/modules/mob/living/carbon/human/species_types/bugmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/bugmen.dm @@ -1,9 +1,8 @@ /datum/species/insect name = "Anthromorphic Insect" id = "insect" - say_mod = "flutters" default_color = "00FF00" - species_traits = list(LIPS,NOEYES,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR,WINGCOLOR) + species_traits = list(LIPS,EYECOLOR,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR,WINGCOLOR) inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_BUG) mutant_bodyparts = list("mam_ears", "mam_snout", "mam_tail", "taur", "insect_wings", "mam_snouts", "insect_fluff","horns") default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None", @@ -12,54 +11,36 @@ attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/insect - liked_food = VEGETABLES | DAIRY - disliked_food = FRUIT | GROSS - toxic_food = MEAT | RAW - mutanteyes = /obj/item/organ/eyes/insect + liked_food = MEAT | FRUIT + disliked_food = TOXIC should_draw_citadel = TRUE - exotic_bloodtype = "BUG" -/datum/species/insect/on_species_gain(mob/living/carbon/C) +/datum/species/insect/spec_death(gibbed, mob/living/carbon/human/H) + if(H) + stop_wagging_tail(H) + +/datum/species/insect/spec_stun(mob/living/carbon/human/H,amount) + if(H) + stop_wagging_tail(H) . = ..() - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if(!H.dna.features["insect_wings"]) - H.dna.features["insect_wings"] = "[(H.client && H.client.prefs && LAZYLEN(H.client.prefs.features) && H.client.prefs.features["insect_wings"]) ? H.client.prefs.features["insect_wings"] : "None"]" - handle_mutant_bodyparts(H) -/datum/species/insect/random_name(gender,unique,lastname) - if(unique) - return random_unique_moth_name() +/datum/species/insect/can_wag_tail(mob/living/carbon/human/H) + return ("mam_tail" in mutant_bodyparts) || ("mam_waggingtail" in mutant_bodyparts) - var/randname = moth_name() +/datum/species/insect/is_wagging_tail(mob/living/carbon/human/H) + return ("mam_waggingtail" in mutant_bodyparts) - if(lastname) - randname += " [lastname]" +/datum/species/insect/start_wagging_tail(mob/living/carbon/human/H) + if("mam_tail" in mutant_bodyparts) + mutant_bodyparts -= "mam_tail" + mutant_bodyparts |= "mam_waggingtail" + H.update_body() - return randname +/datum/species/insect/stop_wagging_tail(mob/living/carbon/human/H) + if("mam_waggingtail" in mutant_bodyparts) + mutant_bodyparts -= "mam_waggingtail" + mutant_bodyparts |= "mam_tail" + H.update_body() -/datum/species/insect/handle_fire(mob/living/carbon/human/H, no_protection = FALSE) - ..() - if(H.dna.features["insect_wings"] != "Burnt Off" && H.dna.features["insect_wings"] != "None" && H.bodytemperature >= 800 && H.fire_stacks > 0) //do not go into the extremely hot light. you will not survive - to_chat(H, "Your precious wings burn to a crisp!") - if(H.dna.features["insect_wings"] != "None") - H.dna.features["insect_wings"] = "Burnt Off" - handle_mutant_bodyparts(H) - -/datum/species/insect/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) - . = ..() - if(chem.id == "pestkiller") - H.adjustToxLoss(3) - H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM) - -/datum/species/insect/check_weakness(obj/item/weapon, mob/living/attacker) - if(istype(weapon, /obj/item/melee/flyswatter)) - return 9 //flyswatters deal 10x damage to insects - return 0 - -/datum/species/insect/space_move(mob/living/carbon/human/H) - . = ..() - if(H.loc && !isspaceturf(H.loc) && (H.dna.features["insect_wings"] != "Burnt Off" && H.dna.features["insect_wings"] != "None")) - var/datum/gas_mixture/current = H.loc.return_air() - if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible - return TRUE +/datum/species/insect/qualifies_for_rank(rank, list/features) + return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index a5943aa0e6..4f12250ef0 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -37,6 +37,7 @@ var/obj/item/paicard/paicard // Inserted pai card. var/allow_pai = 1 // Are we even allowed to insert a pai card. var/bot_name + var/oil_spill_type = /obj/effect/decal/cleanable/oil var/list/player_access = list() //Additonal access the bots gets when player controlled var/emagged = FALSE @@ -216,9 +217,9 @@ to_chat(user, "[src] is in pristine condition.") /mob/living/simple_animal/bot/adjustHealth(amount, updating_health = TRUE, forced = FALSE) - if(amount>0 && prob(10)) - new /obj/effect/decal/cleanable/oil(loc) . = ..() + if(. && prob(10)) + new oil_spill_type(loc) /mob/living/simple_animal/bot/updatehealth() ..() diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 1c19cd82a1..724abea214 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -16,6 +16,7 @@ bot_core_type = /obj/machinery/bot_core/honkbot window_id = "autohonk" window_name = "Honkomatic Bike Horn Unit v1.0.7" + oil_spill_type = /obj/effect/decal/cleanable/oil/slippery //slip and slide fun for the whole family data_hud_type = DATA_HUD_SECURITY_BASIC // show jobs path_image_color = "#FF69B4" diff --git a/modular_citadel/icons/mob/mutant_bodyparts.dmi b/modular_citadel/icons/mob/mutant_bodyparts.dmi index a66895f864..8ff4a3ddb5 100644 Binary files a/modular_citadel/icons/mob/mutant_bodyparts.dmi and b/modular_citadel/icons/mob/mutant_bodyparts.dmi differ