diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index dff52f4748..3cb60b1143 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -269,12 +269,11 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list( //stamina cost defines. #define STAM_COST_ATTACK_OBJ_MULT 1.2 -#define STAM_COST_ATTACK_MOB_MULT 1 +#define STAM_COST_ATTACK_MOB_MULT 0.8 #define STAM_COST_BATON_MOB_MULT 1 #define STAM_COST_NO_COMBAT_MULT 1.25 #define STAM_COST_W_CLASS_MULT 1.25 #define STAM_COST_THROW_MULT 2 -#define STAM_COST_THROW_MOB 2.5 //multiplied by (mob size + 1)^2. ///Multiplier of the (STAMINA_NEAR_CRIT - user current stamina loss) : (STAMINA_NEAR_CRIT - STAMINA_SOFTCRIT) ratio used in damage penalties when stam soft-critted. #define STAM_CRIT_ITEM_ATTACK_PENALTY 0.66 @@ -285,12 +284,6 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list( /// Added delay when firing guns stam-softcritted. Summed with a hardset CLICK_CD_RANGE delay, similar to STAM_CRIT_DAMAGE_DELAY otherwise. #define STAM_CRIT_GUN_DELAY 2.75 -//stamina recovery defines. Blocked if combat mode is on. -#define STAM_RECOVERY_STAM_CRIT -7.5 -#define STAM_RECOVERY_RESTING -6 -#define STAM_RECOVERY_NORMAL -3 -#define STAM_RECOVERY_LIMB 4 //limbs recover stamina separately from handle_status_effects(), and aren't blocked by combat mode. - /** * should the current-attack-damage be lower than the item force multiplied by this value, * a "inefficiently" prefix will be added to the message. diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 3155fe2548..aee0f3d7f7 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -1136,10 +1136,9 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0 if (!isicon(I)) if (isfile(thing)) //special snowflake var/name = sanitize_filename("[generate_asset_name(thing)].png") - if(!SSassets.cache[name]) - register_asset(name, thing) + register_asset(name, thing) for (var/thing2 in targets) - send_asset(thing2, key) + send_asset(thing2, key, FALSE) return "" var/atom/A = thing if (isnull(dir)) @@ -1161,10 +1160,9 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0 I = icon(I, icon_state, dir, frame, moving) key = "[generate_asset_name(I)].png" - if(!SSassets.cache[key]) - register_asset(key, I) + register_asset(key, I) for (var/thing2 in targets) - send_asset(thing2, key) + send_asset(thing2, key, FALSE) return "" diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 0088dde15a..4ed286eb08 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -153,7 +153,7 @@ var/image/item_overlay = image(holding) item_overlay.alpha = 92 - if(!user.can_equip(holding, slot_id, TRUE, TRUE, TRUE)) + if(!user.can_equip(holding, slot_id, TRUE)) item_overlay.color = "#FF0000" else item_overlay.color = "#00ff00" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9f1b830cf0..79e0eceb8f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -496,11 +496,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb //if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise. //If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. //Set disable_warning to TRUE if you wish it to not give you outputs. -/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) +/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) if(!M) return FALSE - return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self, clothing_check, return_warning) + return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self) /obj/item/verb/verb_pickup() set src in oview(1) diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index d6396f9902..381257721e 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -168,7 +168,6 @@ icon_state = "witchhunterhat" item_state = "witchhunterhat" flags_cover = HEADCOVERSEYES - flags_inv = HIDEHAIR /obj/item/storage/box/holy/follower name = "Followers of the Chaplain Kit" diff --git a/code/modules/asset_cache/asset_cache_client.dm b/code/modules/asset_cache/asset_cache_client.dm index 0f51520f13..50a5685ded 100644 --- a/code/modules/asset_cache/asset_cache_client.dm +++ b/code/modules/asset_cache/asset_cache_client.dm @@ -1,4 +1,11 @@ +/client + var/list/sent_assets = list() // List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s + var/list/completed_asset_jobs = list() /// List of all completed blocking send jobs awaiting acknowledgement by send_asset + + var/last_asset_job = 0 /// Last asset send job id. + var/last_completed_asset_job = 0 + /// Process asset cache client topic calls for "asset_cache_confirm_arrival=[INT]" /client/proc/asset_cache_confirm_arrival(job_id) var/asset_cache_job = round(text2num(job_id)) @@ -43,7 +50,7 @@ var/t = 0 var/timeout_time = timeout src << browse({""}, "window=asset_cache_browser&file=asset_cache_send_verify.htm") - + while(!completed_asset_jobs["[job]"] && t < timeout_time) // Reception is handled in Topic() stoplag(1) // Lock up the caller until this is received. t++ diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index 13a1803188..dad1cfef5b 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -415,7 +415,7 @@ "dna_discovered.gif" = 'html/dna_discovered.gif', "dna_undiscovered.gif" = 'html/dna_undiscovered.gif', "dna_extra.gif" = 'html/dna_extra.gif' - ) +) /datum/asset/simple/vv assets = list( diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 12536b4382..0402dc683f 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -134,13 +134,5 @@ var/parallax_layers_max = 3 var/parallax_animate_timer - // List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s - var/list/sent_assets = list() - /// List of all completed blocking send jobs awaiting acknowledgement by send_asset - var/list/completed_asset_jobs = list() - /// Last asset send job id. - var/last_asset_job = 0 - var/last_completed_asset_job = 0 - //world.time of when the crew manifest can be accessed var/crew_manifest_delay diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 1662c72f8f..1014b8e909 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -325,7 +325,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car modless_key_bindings = sanitize_islist(modless_key_bindings, list()) verify_keybindings_valid() // one of these days this will runtime and you'll be glad that i put it in a different proc so no one gets their saves wiped - sanitize_speech_and_tongue() return 1 @@ -347,12 +346,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(!GLOB.keybindings_by_name[bindname]) modless_key_bindings -= key -/datum/preferences/proc/sanitize_speech_and_tongue() - if(!(custom_speech_verb in GLOB.speech_verbs)) - custom_speech_verb = GLOB.speech_verbs[1] - if(!(custom_tongue in GLOB.roundstart_tongues)) - custom_tongue = GLOB.roundstart_tongues[1] - /datum/preferences/proc/save_preferences() if(!path) return 0 diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm index ebf7ba0f1f..a09c4376fb 100644 --- a/code/modules/jobs/job_types/shaft_miner.dm +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -16,7 +16,7 @@ access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) - paycheck = PAYCHECK_EASY ///Not necessarily easy itself, but it can be trivial to make lot of cash on this job. + paycheck = PAYCHECK_HARD paycheck_department = ACCOUNT_CAR display_order = JOB_DISPLAY_ORDER_SHAFT_MINER diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 83cc09a624..74775203b1 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -158,7 +158,7 @@ //Returns if a certain item can be equipped to a certain slot. // Currently invalid for two-handed items - call obj/item/mob_can_equip() instead. -/mob/proc/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) +/mob/proc/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) return FALSE /mob/proc/can_put_in_hand(I, hand_index) @@ -338,63 +338,50 @@ return FALSE return TRUE -//This is a SAFE proc. Use this instead of equip_to_slot()! -//set qdel_on_fail to have it delete W if it fails to equip -//set disable_warning to disable the 'you are unable to equip that' warning. -//unset redraw_mob to prevent the mob from being redrawn at the end. -/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE, clothing_check = FALSE) - if(!istype(W)) - return FALSE - var/list/warning = list("You are unable to equip that!") - if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self, clothing_check, warning)) - if(qdel_on_fail) - qdel(W) - else if(!disable_warning) - to_chat(src, warning[1]) - return FALSE - equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail. - return TRUE - -//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't equip need to be done before! Use mob_can_equip() for that task. -//In most cases you will want to use equip_to_slot_if_possible() -/mob/proc/equip_to_slot(obj/item/W, slot) - return - -//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such. -//Also bypasses equip delay checks, since the mob isn't actually putting it on. -/mob/proc/equip_to_slot_or_del(obj/item/W, slot) - return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE) - -//puts the item "W" into an appropriate slot in a human's inventory -//returns 0 if it cannot, 1 if successful -/mob/proc/equip_to_appropriate_slot(obj/item/W, clothing_check = FALSE) - if(!istype(W)) - return 0 - var/slot_priority = W.slot_equipment_priority - - if(!slot_priority) - slot_priority = list( \ - SLOT_BACK, SLOT_WEAR_ID,\ - SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\ - SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\ - SLOT_SHOES, SLOT_GLOVES,\ - SLOT_EARS, SLOT_GLASSES,\ - SLOT_BELT, SLOT_S_STORE,\ - SLOT_L_STORE, SLOT_R_STORE,\ - SLOT_GENERC_DEXTROUS_STORAGE\ - ) - - for(var/slot in slot_priority) - if(equip_to_slot_if_possible(W, slot, FALSE, TRUE, TRUE, FALSE, clothing_check)) //qdel_on_fail = 0; disable_warning = 1; redraw_mob = 1 - return 1 - - return 0 - //Outdated but still in use apparently. This should at least be a human proc. //Daily reminder to murder this - Remie. /mob/living/proc/get_equipped_items(include_pockets = FALSE) return +/mob/living/carbon/get_equipped_items(include_pockets = FALSE) + var/list/items = list() + if(back) + items += back + if(head) + items += head + if(wear_mask) + items += wear_mask + if(wear_neck) + items += wear_neck + return items + +/mob/living/carbon/human/get_equipped_items(include_pockets = FALSE) + var/list/items = ..() + if(belt) + items += belt + if(ears) + items += ears + if(glasses) + items += glasses + if(gloves) + items += gloves + if(shoes) + items += shoes + if(wear_id) + items += wear_id + if(wear_suit) + items += wear_suit + if(w_uniform) + items += w_uniform + if(include_pockets) + if(l_store) + items += l_store + if(r_store) + items += r_store + if(s_store) + items += s_store + return items + /mob/living/proc/unequip_everything() var/list/items = list() items |= get_equipped_items(TRUE) @@ -407,7 +394,7 @@ to_chat(M, "You are not holding anything to equip!") return FALSE - if(M.equip_to_appropriate_slot(src, TRUE)) + if(M.equip_to_appropriate_slot(src)) M.update_inv_hands() return TRUE else diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8472c8bdae..b04f94afad 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -179,7 +179,7 @@ to_chat(src, "You gently let go of [throwable_mob].") return - adjustStaminaLossBuffered(STAM_COST_THROW_MOB * ((throwable_mob.mob_size+1)**2))// throwing an entire person shall be very tiring + adjustStaminaLossBuffered(25)//CIT CHANGE - throwing an entire person shall be very tiring var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors var/turf/end_T = get_turf(target) if(start_T && end_T) @@ -1157,16 +1157,3 @@ dna.features["body_model"] = MALE if(update_icon) update_body() - -/mob/living/carbon/check_obscured_slots() - if(head) - if(head.flags_inv & HIDEMASK) - LAZYOR(., SLOT_WEAR_MASK) - if(head.flags_inv & HIDEEYES) - LAZYOR(., SLOT_GLASSES) - if(head.flags_inv & HIDEEARS) - LAZYOR(., SLOT_EARS) - - if(wear_mask) - if(wear_mask.flags_inv & HIDEEYES) - LAZYOR(., SLOT_GLASSES) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e40a0449c8..4166069833 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -511,15 +511,33 @@ // Might need re-wording. to_chat(user, "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].") -/mob/living/carbon/human/check_obscured_slots() - . = ..() +/mob/living/carbon/human/proc/check_obscured_slots() + var/list/obscured = list() + if(wear_suit) if(wear_suit.flags_inv & HIDEGLOVES) - LAZYOR(., SLOT_GLOVES) + obscured |= SLOT_GLOVES if(wear_suit.flags_inv & HIDEJUMPSUIT) - LAZYOR(., SLOT_W_UNIFORM) + obscured |= SLOT_W_UNIFORM if(wear_suit.flags_inv & HIDESHOES) - LAZYOR(., SLOT_SHOES) + obscured |= SLOT_SHOES + + if(head) + if(head.flags_inv & HIDEMASK) + obscured |= SLOT_WEAR_MASK + if(head.flags_inv & HIDEEYES) + obscured |= SLOT_GLASSES + if(head.flags_inv & HIDEEARS) + obscured |= SLOT_EARS + + if(wear_mask) + if(wear_mask.flags_inv & HIDEEYES) + obscured |= SLOT_GLASSES + + if(obscured.len) + return obscured + else + return null /mob/living/carbon/human/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) if(judgement_criteria & JUDGE_EMAGGED) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index a7593ca0cb..8de143e2bd 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -1,32 +1,5 @@ -/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) - return dna.species.can_equip(I, slot, disable_warning, src, bypass_equip_delay_self, clothing_check, return_warning) - -/mob/living/carbon/human/get_equipped_items(include_pockets = FALSE) - var/list/items = ..() - if(belt) - items += belt - if(ears) - items += ears - if(glasses) - items += glasses - if(gloves) - items += gloves - if(shoes) - items += shoes - if(wear_id) - items += wear_id - if(wear_suit) - items += wear_suit - if(w_uniform) - items += w_uniform - if(include_pockets) - if(l_store) - items += l_store - if(r_store) - items += r_store - if(s_store) - items += s_store - return items +/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) + return dna.species.can_equip(I, slot, disable_warning, src, bypass_equip_delay_self) // Return the item currently in the slot ID /mob/living/carbon/human/get_item_by_slot(slot_id) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index f78d6a42fb..cd07120cce 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1068,16 +1068,11 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) // handles the equipping of species-specific gear return -/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) +/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE) if(slot in no_equip) if(!I.species_exception || !is_type_in_list(src, I.species_exception)) return FALSE - if(clothing_check && (slot in H.check_obscured_slots())) - if(return_warning) - return_warning[1] = "You are unable to equip that with your current garments in the way!" - return FALSE - var/num_arms = H.get_num_arms(FALSE) var/num_legs = H.get_num_legs(FALSE) @@ -1139,8 +1134,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED)) var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST) if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC)) - if(return_warning) - return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!" + if(!disable_warning) + to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE if(!(I.slot_flags & ITEM_SLOT_BELT)) return @@ -1181,8 +1176,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED)) var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST) if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC)) - if(return_warning) - return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!" + if(!disable_warning) + to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE if( !(I.slot_flags & ITEM_SLOT_ID) ) return FALSE @@ -1196,8 +1191,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_L_LEG) if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC)) - if(return_warning) - return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!" + if(!disable_warning) + to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE if(I.slot_flags & ITEM_SLOT_DENYPOCKET) return FALSE @@ -1212,8 +1207,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_R_LEG) if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC)) - if(return_warning) - return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!" + if(!disable_warning) + to_chat(H, "You need a jumpsuit before you can attach this [I.name]!") return FALSE if(I.slot_flags & ITEM_SLOT_DENYPOCKET) return FALSE @@ -1226,16 +1221,16 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(H.s_store) return FALSE if(!H.wear_suit) - if(return_warning) - return_warning[1] = "You need a suit before you can attach this [I.name]!" + if(!disable_warning) + to_chat(H, "You need a suit before you can attach this [I.name]!") return FALSE if(!H.wear_suit.allowed) - if(return_warning) - return_warning[1] = "You somehow have a suit with no defined allowed items for suit storage, stop that." + if(!disable_warning) + to_chat(H, "You somehow have a suit with no defined allowed items for suit storage, stop that.") return FALSE if(I.w_class > WEIGHT_CLASS_BULKY) - if(return_warning) - return_warning[1] = "The [I.name] is too big to attach." + if(!disable_warning) + to_chat(H, "The [I.name] is too big to attach.") //should be src? return FALSE if( istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed) ) return TRUE diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index cc837a490c..50801e1c0d 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -117,18 +117,6 @@ if(!QDELETED(src)) update_inv_legcuffed() -/mob/living/carbon/get_equipped_items(include_pockets = FALSE) - var/list/items = list() - if(back) - items += back - if(head) - items += head - if(wear_mask) - items += wear_mask - if(wear_neck) - items += wear_neck - return items - //handle stuff to update when a mob equips/unequips a mask. /mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1) update_inv_wear_mask() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 889ec6d257..4209e020e4 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -517,7 +517,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put /mob/living/carbon/handle_status_effects() ..() if(getStaminaLoss() && !SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //CIT CHANGE - prevents stamina regen while combat mode is active - adjustStaminaLoss(!CHECK_MOBILITY(src, MOBILITY_STAND) ? ((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) ? STAM_RECOVERY_STAM_CRIT : STAM_RECOVERY_RESTING) : STAM_RECOVERY_NORMAL) + adjustStaminaLoss(!CHECK_MOBILITY(src, MOBILITY_STAND) ? ((combat_flags & COMBAT_FLAG_HARD_STAMCRIT) ? -7.5 : -6) : -3)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT) && incomingstammult != 1) incomingstammult = max(0.01, incomingstammult) diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 149ec5f0e3..1b0856bfcd 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -81,7 +81,7 @@ /mob/living/carbon/monkey/proc/pickup_and_wear(obj/item/I) if(QDELETED(I) || I.loc != src) return - equip_to_appropriate_slot(I, TRUE) + equip_to_appropriate_slot(I) /mob/living/carbon/monkey/resist_restraints() var/obj/item/I = null diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm index 34599028f7..d5fffc70a2 100644 --- a/code/modules/mob/living/carbon/monkey/inventory.dm +++ b/code/modules/mob/living/carbon/monkey/inventory.dm @@ -1,9 +1,4 @@ -/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) - if(clothing_check && (slot in check_obscured_slots())) - if(return_warning) - return_warning[1] = "You are unable to equip that with your current garments in the way!" - return FALSE - +/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) switch(slot) if(SLOT_HANDS) if(get_empty_held_indexes()) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm index 8034e3c5e5..6e89f045da 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm @@ -19,7 +19,7 @@ return 0 -/mob/living/simple_animal/drone/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) +/mob/living/simple_animal/drone/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) switch(slot) if(SLOT_HEAD) if(head) diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index a1850fabca..b4865c4337 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -50,7 +50,7 @@ return 1 return 0 -/mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning) +/mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE) switch(slot) if(SLOT_GENERC_DEXTROUS_STORAGE) if(internal_storage) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0124249baf..9bf765649b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -227,24 +227,69 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA var/obj/item/W = get_active_held_item() if(istype(W)) - if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, TRUE)) - return TRUE + if(equip_to_slot_if_possible(W, slot,0,0,0)) + return 1 if(!W) // Activate the item var/obj/item/I = get_item_by_slot(slot) if(istype(I)) - if(slot in check_obscured_slots()) - to_chat(src, "You are unable to unequip that while wearing other garments over it!") - return FALSE I.attack_hand(src) - return FALSE + return 0 -/// Checks for slots that are currently obscured by other garments. -/mob/proc/check_obscured_slots() +//This is a SAFE proc. Use this instead of equip_to_slot()! +//set qdel_on_fail to have it delete W if it fails to equip +//set disable_warning to disable the 'you are unable to equip that' warning. +//unset redraw_mob to prevent the mob from being redrawn at the end. +/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE) + if(!istype(W)) + return FALSE + if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self)) + if(qdel_on_fail) + qdel(W) + else + if(!disable_warning) + to_chat(src, "You are unable to equip that!") + return FALSE + equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail. + return TRUE + +//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't equip need to be done before! Use mob_can_equip() for that task. +//In most cases you will want to use equip_to_slot_if_possible() +/mob/proc/equip_to_slot(obj/item/W, slot) return +//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such. +//Also bypasses equip delay checks, since the mob isn't actually putting it on. +/mob/proc/equip_to_slot_or_del(obj/item/W, slot) + return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE) + +//puts the item "W" into an appropriate slot in a human's inventory +//returns 0 if it cannot, 1 if successful +/mob/proc/equip_to_appropriate_slot(obj/item/W) + if(!istype(W)) + return 0 + var/slot_priority = W.slot_equipment_priority + + if(!slot_priority) + slot_priority = list( \ + SLOT_BACK, SLOT_WEAR_ID,\ + SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\ + SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\ + SLOT_SHOES, SLOT_GLOVES,\ + SLOT_EARS, SLOT_GLASSES,\ + SLOT_BELT, SLOT_S_STORE,\ + SLOT_L_STORE, SLOT_R_STORE,\ + SLOT_GENERC_DEXTROUS_STORAGE\ + ) + + for(var/slot in slot_priority) + if(equip_to_slot_if_possible(W, slot, 0, 1, 1)) //qdel_on_fail = 0; disable_warning = 1; redraw_mob = 1 + return 1 + + return 0 + // reset_perspective(thing) set the eye to the thing (if it's equal to current default reset to mob perspective) // reset_perspective() set eye to common default : mob on turf, loc otherwise /mob/proc/reset_perspective(atom/A) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 5d7009f311..042d80dab3 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -154,11 +154,6 @@ bottle?.forceMove(A) return ..() -//Insert our custom spritesheet css link into the html -/obj/machinery/chem_master/ui_base_html(html) - var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills) - . = replacetext(html, "", assets.css_tag()) - /obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) @@ -168,6 +163,11 @@ ui = new(user, src, ui_key, "chem_master", name, 500, 550, master_ui, state) ui.open() +//Insert our custom spritesheet css link into the html +/obj/machinery/chem_master/ui_base_html(html) + var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills) + . = replacetext(html, "", assets.css_tag()) + /obj/machinery/chem_master/ui_data(mob/user) var/list/data = list() data["isBeakerLoaded"] = beaker ? 1 : 0 diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 98a117ea69..6be2e658c1 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -13,7 +13,7 @@ /obj/item/reagent_containers/blood/Initialize() . = ..() if(blood_type != null) - reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"bloodcolor"=bloodtype_to_color(blood_type), "blood_type"=blood_type,"resistances"=null,"trace_chem"=null)) + reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_colour"=color, "blood_type"=blood_type,"resistances"=null,"trace_chem"=null)) update_icon() /obj/item/reagent_containers/blood/on_reagent_change(changetype) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 97555b7248..d543468c48 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -219,6 +219,8 @@ Nothing else in the console has ID requirements. /obj/machinery/computer/rdconsole/proc/ui_header() var/list/l = list() + var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/research_designs) + l += "[sheet.css_tag()][RDSCREEN_NOBREAK]" l += "
[stored_research.organization] Research and Development Network" l += "Available points:
[techweb_point_display_rdconsole(stored_research.research_points, stored_research.last_bitcoins)]" l += "Security protocols: [obj_flags & EMAGGED ? "Disabled" : "Enabled"]" @@ -1073,9 +1075,6 @@ Nothing else in the console has ID requirements. /obj/machinery/computer/rdconsole/ui_interact(mob/user) . = ..() var/datum/browser/popup = new(user, "rndconsole", name, 900, 600) - var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/research_designs) - - popup.add_head_content("") popup.add_stylesheet("techwebs", 'html/browser/techwebs.css') popup.set_content(generate_ui()) popup.open() diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index fcdb07ca17..09ac7a8cb2 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -651,7 +651,7 @@ held_index = 1 px_x = -6 px_y = 0 - stam_heal_tick = STAM_RECOVERY_LIMB + stam_heal_tick = 4 /obj/item/bodypart/l_arm/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM)) @@ -711,7 +711,7 @@ held_index = 2 px_x = 6 px_y = 0 - stam_heal_tick = STAM_RECOVERY_LIMB + stam_heal_tick = 4 max_stamina_damage = 50 /obj/item/bodypart/r_arm/is_disabled() @@ -771,7 +771,7 @@ body_damage_coeff = 0.75 px_x = -2 px_y = 12 - stam_heal_tick = STAM_RECOVERY_LIMB + stam_heal_tick = 4 max_stamina_damage = 50 /obj/item/bodypart/l_leg/is_disabled() @@ -830,7 +830,7 @@ px_x = 2 px_y = 12 max_stamina_damage = 50 - stam_heal_tick = STAM_RECOVERY_LIMB + stam_heal_tick = 4 /obj/item/bodypart/r_leg/is_disabled() if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG)) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 7adf0512de..21fc3504bc 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -658,10 +658,6 @@ GLOBAL_LIST_EMPTY(vending_products) return return ..() -/obj/machinery/vending/ui_base_html(html) - var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/vending) - . = replacetext(html, "", assets.css_tag()) - /obj/machinery/vending/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) if(!ui) diff --git a/html/changelogs/AutoChangeLog-pr-12630.yml b/html/changelogs/AutoChangeLog-pr-12630.yml deleted file mode 100644 index 2692d13c99..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12630.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Ghommie" -delete-after: True -changes: - - rscadd: "You can't (un)equip garments on/from obscured inventory slots anymore." diff --git a/html/changelogs/AutoChangeLog-pr-12631.yml b/html/changelogs/AutoChangeLog-pr-12631.yml deleted file mode 100644 index 5ecdfbcaf0..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12631.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Ghommie" -delete-after: True -changes: - - balance: "Lowered shaft miners' paycheck, they have other ways to make cash." diff --git a/html/changelogs/AutoChangeLog-pr-12632.yml b/html/changelogs/AutoChangeLog-pr-12632.yml deleted file mode 100644 index 8343205ac9..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12632.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "Ghommie" -delete-after: True -changes: - - balance: "The stamina cost multiplier for swinging melee weapons against mobs has been brought back to 1 from 0.8" - - balance: "The stamina cost for throwing mobs now scales with their mob size variable." diff --git a/html/changelogs/AutoChangeLog-pr-12657.yml b/html/changelogs/AutoChangeLog-pr-12657.yml deleted file mode 100644 index bf14281695..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12657.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "bunny232" -delete-after: True -changes: - - tweak: "Witchhunter hat no longer obscures mask ears ,eyes, face and mouth" diff --git a/html/changelogs/AutoChangeLog-pr-12661.yml b/html/changelogs/AutoChangeLog-pr-12661.yml deleted file mode 100644 index 832d0fcd24..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12661.yml +++ /dev/null @@ -1,7 +0,0 @@ -author: "LetterN" -delete-after: True -changes: - - tweak: "Ported some tags from tgui-3.0 to Vending.js" - - bugfix: "vending icons" - - bugfix: "r&d icons" - - bugfix: "chem master icons" diff --git a/html/changelogs/AutoChangeLog-pr-12666.yml b/html/changelogs/AutoChangeLog-pr-12666.yml deleted file mode 100644 index 00542d519d..0000000000 --- a/html/changelogs/AutoChangeLog-pr-12666.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - bugfix: "bloodpacks initialise correctly now" diff --git a/interface/skin.dmf b/interface/skin.dmf index bb517efe25..68a22a8233 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -80,7 +80,6 @@ window "mainwindow" anchor2 = none background-color = #272727 is-visible = false - auto-format = false saved-params = "" elem "tooltip" type = BROWSER diff --git a/tgui-next/packages/tgui/interfaces/Vending.js b/tgui-next/packages/tgui/interfaces/Vending.js index 2965dd97d1..3e48124fce 100644 --- a/tgui-next/packages/tgui/interfaces/Vending.js +++ b/tgui-next/packages/tgui/interfaces/Vending.js @@ -61,7 +61,7 @@ export const Vending = props => { ); return ( - + {product.base64 ? ( { }} /> ) : ( )} + {product.name} - - {product.name} - - + { {data.stock[product.name]} in stock - + {custom && (