Skip to content

Commit

Permalink
Merge branch 'PvE-CMSS13:master' into facehugger-funny
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx committed Jan 15, 2024
2 parents 0f1daf8 + ba62bd8 commit a342db6
Show file tree
Hide file tree
Showing 35 changed files with 1,687 additions and 248 deletions.
6 changes: 4 additions & 2 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ PROBABILITY CALCULATIONS ARE HERE

#define XENO_SLASH 80

#define RETREAT_AT_PLASMA_LEVEL 0.2
#define RETREAT_AT_HEALTH_LEVEL 0.4
#define XENO_DOOR_BUILDING_CHANCE 25

#define PLASMA_RETREAT_PERCENTAGE 10
#define HEALTH_RETREAT_PERCENTAGE 20

#define LURKING_IGNORE_SHOT_CHANCE 75

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

/datum/component/ai_behavior_override/build
behavior_icon_state = "priority_move_order"

max_assigned = 1

/datum/component/ai_behavior_override/build/Initialize(...)
. = ..()

if(istype(parent, /mob))
return COMPONENT_INCOMPATIBLE

var/turf/open/location = get_turf(parent)
if(location.is_weedable() != FULLY_WEEDABLE)
return COMPONENT_INCOMPATIBLE

/datum/component/ai_behavior_override/build/Destroy(force, silent, ...)
var/turf/parent_turf = get_turf(parent)
if(QDELETED(parent) && parent_turf != parent)
parent_turf.AddComponent(/datum/component/ai_behavior_override/build)

return ..()

/datum/component/ai_behavior_override/build/check_behavior_validity(mob/living/carbon/xenomorph/checked_xeno, distance)
. = ..()
if(!.)
return

var/turf/open/location = get_turf(parent)
if(!istype(location))
qdel(src)
return FALSE

if(locate(/obj/structure/mineral_door/resin) in location)
qdel(src)
return FALSE

if(distance > 10)
return FALSE

if(checked_xeno.current_target)
return FALSE

if(!locate(/datum/action/xeno_action/activable/secrete_resin) in checked_xeno.actions)
return FALSE

if(checked_xeno.get_plasma_percentage() < PLASMA_RETREAT_PERCENTAGE)
var/turf/xeno_loc = get_turf(checked_xeno)
if(xeno_loc.weeds && !checked_xeno.resting)
currently_assigned -= checked_xeno
checked_xeno.lay_down()

return FALSE

return TRUE

/datum/component/ai_behavior_override/build/process_override_behavior(mob/living/carbon/xenomorph/processing_xeno, delta_time)
. = ..()
if(!.)
return

processing_xeno.resting = FALSE

var/turf/xeno_loc = get_turf(processing_xeno)
if(xeno_loc.density)
return FALSE // We shouldn't stand in a wall, let's act default

var/turf/parent_turf = get_turf(parent)

var/is_diagonal = (get_dir(processing_xeno, parent_turf) in diagonals)
if(is_diagonal || get_dist(processing_xeno, parent) > 1)
return processing_xeno.move_to_next_turf(parent_turf)

for(var/obj/structure/blocker in parent_turf.contents)
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(!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))
return TRUE

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
var/blocked_turfs = 0
for(var/turf/blocked_turf in orange(1, parent_turf) - parent_turf.AdjacentTurfs())
if(get_dir(blocked_turf, parent_turf) in diagonals)
continue

if(blocked_turf.density)
wall_nearby = TRUE

blocked_turfs++

if(blocked_turfs)
if(prob(XENO_DOOR_BUILDING_CHANCE) || (wall_nearby && blocked_turfs == 2))
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)
return TRUE
2 changes: 2 additions & 0 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ United States Colonial Marines
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_JTAC = SKILL_JTAC_TRAINED,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_PILOT = SKILL_PILOT_EXPERT,
)

/datum/skills/intel
Expand Down Expand Up @@ -290,6 +291,7 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_EXPERT,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_SURGERY = SKILL_SURGERY_NOVICE,
SKILL_PILOT = SKILL_PILOT_EXPERT,
)

/datum/skills/SEA
Expand Down
4 changes: 4 additions & 0 deletions code/datums/vehicles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
name = "APC - No FPW"
interior_id = "apc_no_fpw"

/datum/map_template/interior/apc_movie
name = "Movie APC"
interior_id = "apc_movie"

/datum/map_template/interior/fancy_locker
name = "Fancy Locker"
interior_id = "fancylocker"
Expand Down
4 changes: 4 additions & 0 deletions code/game/area/golden_arrow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@
/area/golden_arrow/synthcloset
name = "\improper Synthetic Storage Closet"
icon_state = "livingspace"

/area/golden_arrow/firingrange
name = "\improper Firing Range"
icon_state = "firingrange"
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth, list(
list("M3A1 Pattern Synthetic Utility Vest (UA Jungle)", 0, /obj/item/clothing/suit/storage/marine/light/synvest/jungle, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR),
list("M3A1 Pattern Synthetic Utility Vest (UA Snow)", 0, /obj/item/clothing/suit/storage/marine/light/synvest/snow, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR),
list("M3A1 Pattern Synthetic Utility Vest (UA Desert)", 0, /obj/item/clothing/suit/storage/marine/light/synvest/desert, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR),
list("M3-VL Pattern Ballistics Vest", 0, /obj/item/clothing/suit/storage/marine/light/vest, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_REGULAR),

list("GLOVES (CHOOSE 1)", 0, null, null, null),
list("Insulated Gloves", 0, /obj/item/clothing/gloves/yellow, MARINE_CAN_BUY_GLOVES, VENDOR_ITEM_RECOMMENDED),
Expand Down
5 changes: 5 additions & 0 deletions code/game/objects/effects/spawners/prop_gun_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@
prop_gun_type = /obj/item/weapon/gun/rifle/m41aMK1
custom_gun_name = "\improper Broken M41A pulse rifle"
custom_gun_desc = "An older design of the Pulse Rifle commonly used by Colonial Marines. This one has seen better days. The trigger is missing, the barrel is bent, and it no longer appropriately feeds magazines."

/obj/effect/spawner/prop_gun/anti_tank
prop_gun_type = /obj/item/weapon/gun/launcher/rocket/anti_tank
custom_gun_name = "\improper Spent M83A2 SADAR"
custom_gun_desc = "A spent M83A2 tube. It's been kept as a trophy after a lucky tank kill nearly a thousand meters out. Someone has engraved a single tally-mark on the side to begin recording a kill-count."
21 changes: 21 additions & 0 deletions code/game/objects/items/devices/flashlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,27 @@
qdel(signal)
..()

/obj/effect/landmark/rappel
name = "Rappel Point"
var/datum/cas_signal/signal
invisibility_value = SEE_INVISIBLE_OBSERVER
icon_state = "o_green"

/obj/effect/landmark/rappel/New()
. = ..()
signal = new(src)
signal.target_id = ++cas_tracking_id_increment
name = "Rappel Point #[signal.target_id]"
signal.name = name
cas_groups[FACTION_MARINE].add_signal(signal)

/obj/effect/landmark/rappel/Destroy()
if(signal)
cas_groups[FACTION_MARINE].remove_signal(signal)
QDEL_NULL(signal)
return ..()


/// Signal flares deployed by a flare gun
/obj/item/device/flashlight/flare/signal/gun
activate_message = FALSE
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/game_master_rename_platoon)
add_verb(src, /client/proc/toggle_vehicle_blockers)
add_verb(src, /client/proc/toggle_rappel_menu)
if(CLIENT_HAS_RIGHTS(src, R_SERVER))
add_verb(src, admin_verbs_server)
if(CLIENT_HAS_RIGHTS(src, R_DEBUG))
Expand Down Expand Up @@ -363,6 +364,7 @@ var/list/roundstart_mod_verbs = list(
/client/proc/toggle_join_xeno,
/client/proc/game_master_rename_platoon,
/client/proc/toggle_vehicle_blockers,
/client/proc/toggle_rappel_menu,
admin_verbs_admin,
admin_verbs_ban,
admin_verbs_minor_event,
Expand Down
108 changes: 108 additions & 0 deletions code/modules/admin/game_master/extra_buttons/rappel_menu.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
GLOBAL_LIST_EMPTY(game_master_rappels)
GLOBAL_DATUM_INIT(rappel_panel, /datum/rappel_menu, new)
#define RAPPEL_CLICK_INTERCEPT_ACTION "rappel_click_intercept_action"

/client/proc/toggle_rappel_menu()
set name = "Rappel Menu"
set category = "Game Master.Extras"
if(!check_rights(R_ADMIN))
return

GLOB.rappel_panel.tgui_interact(mob)

/datum/rappel_menu
var/rappel_click_intercept = FALSE

/datum/rappel_menu/ui_data(mob/user)
. = ..()

var/list/data = list()

data["game_master_rappels"] = length(GLOB.game_master_rappels) ? GLOB.game_master_rappels : ""
data["rappel_click_intercept"] = rappel_click_intercept
return data

/datum/rappel_menu/proc/InterceptClickOn(mob/user, params, atom/object)
var/list/modifiers = params2list(params)
if(rappel_click_intercept)
var/turf/object_turf = get_turf(object)
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
for(var/obj/effect/landmark/rappel/R in object_turf)
GLOB.game_master_rappels -= R
QDEL_NULL(R)
return TRUE

var/obj/effect/landmark/rappel/rappel = new(object_turf)
var/rappel_ref = REF(rappel)
GLOB.game_master_rappels += list(list(
"rappel" = rappel,
"rappel_name" = rappel.name,
"rappel_ref" = rappel_ref,
))
return TRUE

/datum/rappel_menu/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "GameMasterRappelMenu", "Rappel Menu")
ui.open()
user.client?.click_intercept = src
/datum/rappel_menu/ui_status(mob/user, datum/ui_state/state)
return UI_INTERACTIVE


/datum/rappel_menu/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()

switch(action)
if("remove_rappel")
if(!params["val"])
return

var/list/rappel = params["val"]

var/atom/rappel_atom = locate(rappel["rappel_ref"])

if(!rappel_atom)
return TRUE

if(tgui_alert(ui.user, "Do you want to remove [rappel_atom] ?", "Confirmation", list("Yes", "No")) != "Yes")
return TRUE

remove_rappel(rappel_atom)

if("jump_to_rappel")
if(!params["val"])
return

var/list/rappel = params["val"]

var/atom/rappel_atom = locate(rappel["rappel_ref"])

var/turf/rappel_turf = get_turf(rappel_atom)

if(!rappel_turf)
return TRUE

var/client/jumping_client = ui.user.client
jumping_client.jump_to_turf(rappel_turf)
return TRUE

if("toggle_click_rappel")
rappel_click_intercept = !rappel_click_intercept
return

/datum/rappel_menu/ui_close(mob/user)
var/client/user_client = user.client
if(user_client?.click_intercept == src)
user_client.click_intercept = null

rappel_click_intercept = FALSE

/datum/rappel_menu/proc/remove_rappel(obj/removing_datum)
SIGNAL_HANDLER

for(var/list/cycled_rappel in GLOB.game_master_rappels)
if(cycled_rappel["rappel"] == removing_datum)
GLOB.game_master_rappels.Remove(list(cycled_rappel))
QDEL_NULL(removing_datum)
4 changes: 2 additions & 2 deletions code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)

// Behavior stuff
#define DEFAULT_BEHAVIOR_STRING "Attack"
#define SELECTABLE_XENO_BEHAVIORS list("Attack", "Capture", "Hive")
#define SELECTABLE_XENO_BEHAVIORS_ASSOC list("Attack" = /datum/component/ai_behavior_override/attack, "Capture" = /datum/component/ai_behavior_override/capture, "Hive" = /datum/component/ai_behavior_override/hive)
#define SELECTABLE_XENO_BEHAVIORS list("Attack", "Capture", "Hive", "Build")
#define SELECTABLE_XENO_BEHAVIORS_ASSOC list("Attack" = /datum/component/ai_behavior_override/attack, "Capture" = /datum/component/ai_behavior_override/capture, "Hive" = /datum/component/ai_behavior_override/hive, "Build" = /datum/component/ai_behavior_override/build)

// Objective stuff
#define OBJECTIVE_NUMBER_OPTIONS list("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/synths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if(iscolonysynthetic(new_human) && !isworkingjoe(new_human))
new_human.set_skills(/datum/skills/colonial_synthetic)

new_human.allow_gun_usage = FALSE
new_human.allow_gun_usage = TRUE

//*****************************************************************************************************/

Expand Down
18 changes: 5 additions & 13 deletions code/modules/mob/living/carbon/human/species/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

bloodsplatter_type = /obj/effect/temp_visual/dir_setting/bloodsplatter/synthsplatter

total_health = 150 //more health than regular humans

brute_mod = 0.5
burn_mod = 0.9 //a small bit of resistance
total_health = 100 //same health as regular humans

cold_level_1 = -1
cold_level_2 = -1
Expand All @@ -40,7 +37,7 @@

knock_down_reduction = 5
stun_reduction = 5
acid_blood_dodge_chance = 25
acid_blood_dodge_chance = 50

inherent_verbs = list(
/mob/living/carbon/human/synthetic/proc/toggle_HUD,
Expand Down Expand Up @@ -76,20 +73,15 @@
name = SYNTH_COLONY
name_plural = "Colonial Synthetics"
uses_ethnicity = TRUE
brute_mod = 0.8
burn_mod = 0.8
mob_inherent_traits = list(TRAIT_SUPER_STRONG)

pain_type = /datum/pain/synthetic/colonial
rarity_value = 1.5
slowdown = 0.2
total_health = 200 //But more durable

default_lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE

knock_down_reduction = 3.5
stun_reduction = 3.5


/datum/species/synthetic/colonial/colonial_gen_two
name = SYNTH_COLONY_GEN_TWO
uses_ethnicity = FALSE //2nd gen uses generic human look
Expand All @@ -111,8 +103,8 @@
uses_ethnicity = FALSE
mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INTENT_EYES)

burn_mod = 0.6 //made for combat
total_health = 250 //made for combat
brute_mod = 0.5
burn_mod = 0.5 //made for combat

hair_color = "#000000"
icobase = 'icons/mob/humans/species/r_synthetic.dmi'
Expand Down
Loading

0 comments on commit a342db6

Please sign in to comment.