Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Epichanges' into Epichanges
Browse files Browse the repository at this point in the history
  • Loading branch information
Warfan1815 committed Oct 23, 2023
2 parents 306c9ff + 1f1ad03 commit 1ea0620
Show file tree
Hide file tree
Showing 7 changed files with 1,897 additions and 1,038 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#define AGE_MIN 19 //youngest a character can be
#define AGE_MAX 90 //oldest a character can be //no. you are not allowed to be 160.
#define MAX_GEAR_COST 7 //Used in chargen for loadout limit.
#define MAX_GEAR_COST 10 //Used in chargen for loadout limit.

///dual_wield_pref from /datum/preferences
///Fire both weapons when dual wielding
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@
initial_keys = list(/obj/item/device/encryptionkey/mcom)
volume = RADIO_VOLUME_CRITICAL
multibroadcast_cooldown = LOW_MULTIBROADCAST_COOLDOWN
frequency = ALPHA_FREQ

/obj/item/device/radio/headset/almayer/mcom/alt
initial_keys = list(/obj/item/device/encryptionkey/mcom/alt)
Expand Down Expand Up @@ -569,7 +570,6 @@
name = "marine radio headset"
desc = "A standard marine radio headset. When worn, grants access to Squad Leader tracker. Click tracker with empty hand to open Squad Info window."
frequency = ALPHA_FREQ
initial_keys = list(/obj/item/device/encryptionkey/public)

//############################## ALPHA ###############################
/obj/item/device/radio/headset/almayer/marine/alpha
Expand Down
13 changes: 12 additions & 1 deletion code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/// Assoc list that holds our custom game master objectives, formatted as atom = objective_string
GLOBAL_LIST_EMPTY(game_master_objectives)

/// Percentage of characters end up clear when sent via radio message
GLOBAL_VAR_INIT(radio_communication_clarity, 100)

/proc/open_game_master_panel(client/using_client)
set name = "Game Master Panel"
set category = "Game Master"
Expand Down Expand Up @@ -72,7 +75,6 @@ GLOBAL_LIST_EMPTY(game_master_objectives)

/// End Objective Stuff


/// Holds what type of click intercept we are using
var/current_click_intercept_action

Expand Down Expand Up @@ -105,6 +107,8 @@ GLOBAL_LIST_EMPTY(game_master_objectives)
// Objective stuff
data["objective_click_intercept"] = objective_click_intercept

// Communication stuff
data["communication_clarity"] = GLOB.radio_communication_clarity

return data

Expand Down Expand Up @@ -161,6 +165,13 @@ GLOBAL_LIST_EMPTY(game_master_objectives)
current_click_intercept_action = OBJECTIVE_CLICK_INTERCEPT_ACTION
return

//Communication Section
if("set_communication_clarity")
var/new_clarity = text2num(params["clarity"])
if(!isnum(new_clarity))
return

GLOB.radio_communication_clarity = clamp(new_clarity, 0, 100)

/datum/game_master/ui_close(mob/user)
. = ..()
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/hear_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
else
message = stars(message)

if(GLOB.radio_communication_clarity < 100)
message = stars(message, GLOB.radio_communication_clarity)

if(language)
style = language.color

Expand Down
86 changes: 44 additions & 42 deletions code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
if(idle_xeno.throwing)
return

if(idle_xeno.resting)
return

if(home_turf)
if(get_dist(home_turf, idle_xeno) > max_distance_from_home)
home_turf = null
Expand All @@ -38,52 +35,16 @@
if(next_home_search > world.time)
return

var/turf/current_turf = get_turf(idle_xeno.loc)
var/turf/current_turf = get_turf(idle_xeno)
next_home_search = world.time + home_search_delay
if(!current_turf.weeds && current_turf.is_weedable() >= FULLY_WEEDABLE)
if(!current_turf.weeds && check_turf(current_turf))
home_turf = current_turf
else
var/shortest_distance
for(var/turf/potential_home as anything in RANGE_TURFS(home_locate_range, current_turf))

var/area/found_area = get_area(potential_home)
if(found_area.flags_area & AREA_NOTUNNEL)
continue

if(found_area.flags_area & AREA_UNWEEDABLE)
continue

if(!found_area.can_build_special)
continue

if(potential_home in blacklisted_turfs)
continue

if(potential_home.weeds)
continue

if(potential_home.is_weedable() < FULLY_WEEDABLE)
continue

if(locate(/obj/effect/alien/weeds/node) in range(3, potential_home))
continue

if(potential_home.density)
if(!check_turf(potential_home))
continue

var/blocked = FALSE
for(var/atom/potential_blocker as anything in potential_home)
if(potential_blocker.can_block_movement)
blocked = TRUE
break

if(blocked)
continue

for(var/obj/structure/struct in potential_home)
if(struct.density && !(struct.flags_atom & ON_BORDER))
continue

if(shortest_distance && get_dist(idle_xeno, potential_home) > shortest_distance)
continue

Expand All @@ -103,3 +64,44 @@

/datum/xeno_ai_movement/drone/proc/unblacklist_turf(turf/unblacklisting_turf)
blacklisted_turfs -= unblacklisting_turf

/datum/xeno_ai_movement/drone/proc/check_turf(turf/checked_turf)
var/area/found_area = get_area(checked_turf)
if(found_area.flags_area & AREA_NOTUNNEL)
return FALSE

if(found_area.flags_area & AREA_UNWEEDABLE)
return FALSE

if(!found_area.can_build_special)
return FALSE

if(checked_turf in blacklisted_turfs)
return FALSE

if(checked_turf.weeds)
return FALSE

if(checked_turf.is_weedable() < FULLY_WEEDABLE)
return FALSE

if(locate(/obj/effect/alien/weeds/node) in range(3, checked_turf))
return FALSE

if(checked_turf.density)
return FALSE

var/blocked = FALSE
for(var/atom/potential_blocker as anything in checked_turf)
if(potential_blocker.can_block_movement)
blocked = TRUE
break

if(blocked)
return FALSE

for(var/obj/structure/struct in checked_turf)
if(struct.density && !(struct.flags_atom & ON_BORDER))
return FALSE

return TRUE
Loading

0 comments on commit 1ea0620

Please sign in to comment.