diff --git a/code/__DEFINES/xeno_ai.dm b/code/__DEFINES/xeno_ai.dm index 52bb4f0c91..9095f56ad9 100644 --- a/code/__DEFINES/xeno_ai.dm +++ b/code/__DEFINES/xeno_ai.dm @@ -15,7 +15,7 @@ #define VEHICLE_PENALTY 25 #define WINDOW_FRAME_PENALTY 25 #define BARRICADE_PENALTY 50 -#define WALL_PENALTY 50 +#define WALL_PENALTY 100 /* PROBABILITY CALCULATIONS ARE HERE diff --git a/code/datums/components/xeno/ai_behavior_overrides/build_override_behavior.dm b/code/datums/components/xeno/ai_behavior_overrides/build_override_behavior.dm index a5c4a03982..4a03c2c313 100644 --- a/code/datums/components/xeno/ai_behavior_overrides/build_override_behavior.dm +++ b/code/datums/components/xeno/ai_behavior_overrides/build_override_behavior.dm @@ -31,22 +31,19 @@ qdel(src) return FALSE - if(locate(/obj/structure/mineral_door/resin) in location) - qdel(src) - return FALSE - var/area/current_area = get_area(location) if(!current_area.is_resin_allowed) for(var/client/game_master in GLOB.game_masters) - to_chat(game_master, SPAN_XENOBOLDNOTICE("This area doesn't allow xenos to build here")) + to_chat(game_master, SPAN_XENOBOLDNOTICE("[current_area] doesn't allow xenos to build here")) qdel(src) return FALSE - if(distance > 10) + if(locate(/obj/structure/mineral_door/resin) in location) + qdel(src) return FALSE - if(checked_xeno.current_target) + if(distance > 10) return FALSE if(!locate(/datum/action/xeno_action/activable/secrete_resin) in checked_xeno.actions) @@ -55,7 +52,7 @@ if(checked_xeno.get_plasma_percentage() < PLASMA_RETREAT_PERCENTAGE) var/turf/xeno_loc = get_turf(checked_xeno) if(xeno_loc.weeds) - checked_xeno.set_resting(TRUE, FALSE, TRUE) + checked_xeno.set_resting(TRUE, FALSE) return FALSE @@ -75,19 +72,21 @@ var/turf/parent_turf = get_turf(parent) var/distance = get_dist(processing_xeno, parent) - var/list/turfs_around = xeno_loc.AdjacentTurfs() - if(turfs_around && distance < 1) // We are gonna be stuck after building at our loc, let's step away - return processing_xeno.move_to_next_turf(pick(turfs_around)) - - var/is_diagonal = (get_dir(processing_xeno, parent_turf) in diagonals) - if(is_diagonal || distance > 1) + /// Is xeno adjacent to parent_turf? + if(distance > 1) return processing_xeno.move_to_next_turf(parent_turf) + /// Xeno will be stuck after building at its loc, if so - we command droney to step away + if(distance < 1) + return processing_xeno.move_to_next_turf(pick(GLOB.cardinals)) + + /// If there is something that might block our resin - slash it for(var/obj/structure/blocker in parent_turf.contents) - if(!blocker.unslashable && blocker.density || istype(blocker, /obj/structure/bed)) + if(!blocker.unslashable && (blocker.density || istype(blocker, /obj/structure/bed))) INVOKE_ASYNC(processing_xeno, TYPE_PROC_REF(/mob, do_click), blocker, "", list()) return TRUE + /// If no ground weeds present - command our xeno to plant one if(!parent_turf.weeds) var/datum/action/xeno_action/onclick/plant_weeds/weeds_action = locate() in processing_xeno.actions INVOKE_ASYNC(weeds_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/plant_weeds, use_ability_wrapper)) @@ -96,24 +95,30 @@ var/list/resin_types = processing_xeno.resin_build_order processing_xeno.selected_resin = locate(/datum/resin_construction/resin_turf/wall) in resin_types - var/wall_nearby = FALSE - var/blocked_turfs = 0 - for(var/turf/blocked_turf in orange(1, parent_turf) - parent_turf.AdjacentTurfs()) - blocked_turfs++ + /// Let's decide whenever we are building a door or naw + var/build_door = FALSE + for(var/turf/blocked_turf in RANGE_TURFS(1, parent_turf) - parent_turf) + var/direction = get_dir(parent_turf, blocked_turf) + if(direction in diagonals) + continue - if(get_dir(blocked_turf, parent_turf) in diagonals) + if(!blocked_turf.density) continue - if(blocked_turf.density) - wall_nearby = TRUE + /// Checking for any opposite walls on angles 135, 180, 225 respectfully + for(var/opposite_dir in reverse_nearby_direction(direction)) + var/turf/opposite_turf = get_step(parent_turf, opposite_dir) + if(opposite_turf.density) + build_door = TRUE + break - var/obj/effect/alien/weeds/turf_weeds = blocked_turf.weeds - if(turf_weeds && turf_weeds.secreting) - wall_nearby = TRUE // Something is being constructed nearby, let's bet this is a new resin wall + var/obj/effect/alien/weeds/opposite_weeds = opposite_turf.weeds + if(opposite_weeds && opposite_weeds.secreting) + /// Something is being constructed nearby, let's bet this is a new resin wall + build_door = TRUE - if(wall_nearby) - if(prob(XENO_DOOR_BUILDING_CHANCE) || (wall_nearby && blocked_turfs > 1)) - processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types + if(build_door || prob(XENO_DOOR_BUILDING_CHANCE)) + processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types var/datum/action/xeno_action/activable/secrete_resin/build_action = locate() in processing_xeno.actions INVOKE_ASYNC(build_action, TYPE_PROC_REF(/datum/action/xeno_action/activable/secrete_resin, use_ability_wrapper), parent_turf) diff --git a/code/datums/skills/uscm.dm b/code/datums/skills/uscm.dm index 2da19793e5..7e6658d9c1 100644 --- a/code/datums/skills/uscm.dm +++ b/code/datums/skills/uscm.dm @@ -8,13 +8,6 @@ United States Colonial Marines name = "Private" //same as default -/datum/skills/pfc/crafty - name = "Crafty Private" - skills = list( - SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, - ) - /datum/skills/combat_medic name = "Combat Medic" skills = list( @@ -23,13 +16,6 @@ United States Colonial Marines SKILL_JTAC = SKILL_JTAC_BEGINNER, ) -/datum/skills/combat_medic/crafty - name = "Crafty Combat Medic" - skills = list( - SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED, - SKILL_ENGINEER = SKILL_ENGINEER_TRAINED, - ) - /datum/skills/combat_engineer name = "Combat Engineer" skills = list( diff --git a/code/modules/gear_presets/cmb.dm b/code/modules/gear_presets/cmb.dm index 22bf31d42c..94672a1b9b 100644 --- a/code/modules/gear_presets/cmb.dm +++ b/code/modules/gear_presets/cmb.dm @@ -418,7 +418,7 @@ rank = JOB_SQUAD_MARINE paygrade = "ME2" role_comm_title = "A-RFN" - skills = /datum/skills/pfc/crafty + skills = /datum/skills/pfc faction = FACTION_MARSHAL faction_group = list(FACTION_MARSHAL, FACTION_MARINE) @@ -590,10 +590,6 @@ new_human.equip_to_slot_or_del(new /obj/item/reagent_container/hypospray/autoinjector/emergency, WEAR_IN_BELT) new_human.equip_to_slot_or_del(new /obj/item/reagent_container/hypospray/autoinjector/emergency, WEAR_IN_BELT) new_human.equip_to_slot_or_del(new /obj/item/bodybag/cryobag, WEAR_IN_BELT) - if(new_human.disabilities & NEARSIGHTED) - new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/prescription, WEAR_EYES) - else - new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health, WEAR_EYES) new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine, WEAR_HANDS) new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife, WEAR_FEET) new_human.equip_to_slot_or_del(new /obj/item/storage/box/MRE, WEAR_IN_BACK) diff --git a/code/modules/gear_presets/dust_raider.dm b/code/modules/gear_presets/dust_raider.dm index 78fea23a77..37a69c7828 100644 --- a/code/modules/gear_presets/dust_raider.dm +++ b/code/modules/gear_presets/dust_raider.dm @@ -26,7 +26,7 @@ rank = JOB_SQUAD_MARINE paygrade = "ME2" role_comm_title = "RFN" - skills = /datum/skills/pfc/crafty + skills = /datum/skills/pfc /datum/equipment_preset/dust_raider/private/load_gear(mob/living/carbon/human/new_human) //TODO: add backpacks and satchels diff --git a/code/modules/gear_presets/fun.dm b/code/modules/gear_presets/fun.dm index 23350768a6..2e17dfe9ef 100644 --- a/code/modules/gear_presets/fun.dm +++ b/code/modules/gear_presets/fun.dm @@ -14,7 +14,7 @@ flags = EQUIPMENT_PRESET_EXTRA faction = FACTION_PIRATE - skills = /datum/skills/pfc/crafty + skills = /datum/skills/pfc /datum/equipment_preset/fun/pirate/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(new_human), WEAR_BACK) @@ -417,7 +417,7 @@ uses_special_name = TRUE - skills = /datum/skills/pfc/crafty // about equivalent to a marine + skills = /datum/skills/pfc // about equivalent to a marine assignment = "Monkey" rank = "Monkey" diff --git a/code/modules/gear_presets/uscm.dm b/code/modules/gear_presets/uscm.dm index 1e64a30e17..e1a510ce8d 100644 --- a/code/modules/gear_presets/uscm.dm +++ b/code/modules/gear_presets/uscm.dm @@ -641,7 +641,7 @@ rank = JOB_SQUAD_MARINE paygrade = "ME2" role_comm_title = "RFN" - skills = /datum/skills/pfc/crafty + skills = /datum/skills/pfc minimap_icon = "private" diff --git a/icons/mob/humans/onmob/suit_slot.dmi b/icons/mob/humans/onmob/suit_slot.dmi index d691e411ae..92978c9e14 100644 Binary files a/icons/mob/humans/onmob/suit_slot.dmi and b/icons/mob/humans/onmob/suit_slot.dmi differ diff --git a/icons/mob/humans/onmob/uniform_0.dmi b/icons/mob/humans/onmob/uniform_0.dmi index abdf8994a2..5942c9dda6 100644 Binary files a/icons/mob/humans/onmob/uniform_0.dmi and b/icons/mob/humans/onmob/uniform_0.dmi differ