Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mental-health-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenjo committed Aug 17, 2023
2 parents 6a96d23 + 2282a5e commit 5732422
Show file tree
Hide file tree
Showing 276 changed files with 13,592 additions and 3,824 deletions.
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"gbasood.byond-dm-language-support",
"platymuus.dm-langclient",
"eamodio.gitlens"
"eamodio.gitlens",
"anturk.dmi-editor"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},

"workbench.editorAssociations": {
"*.dmi": "imagePreview.previewEditor"
"*.dmi": "dmiEditor.dmiEditor"
},

"debug.onTaskErrors": "abort",
Expand Down
2 changes: 1 addition & 1 deletion _build_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file has all the information on what versions of libraries are thrown into the code
# For dreamchecker
export SPACEMAN_DMM_VERSION=suite-1.7.2
export SPACEMAN_DMM_VERSION=suite-1.7.3
# For NanoUI + TGUI
export NODE_VERSION=12
# Byond Major
Expand Down
1 change: 0 additions & 1 deletion code/__defines/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#define isxeno(A) istype(A, /mob/living/simple_mob/animal/space/alien)

#define iscarbon(A) istype(A, /mob/living/carbon)
#define isalien(A) istype(A, /mob/living/carbon/alien)
#define isbrain(A) istype(A, /mob/living/carbon/brain)
#define ishuman(A) istype(A, /mob/living/carbon/human)

Expand Down
2 changes: 2 additions & 0 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,15 @@ var/global/list/##LIST_NAME = list();\
#define VOLUME_CHANNEL_AMBIENCE "Ambience"
#define VOLUME_CHANNEL_ALARMS "Alarms"
#define VOLUME_CHANNEL_DOORS "Doors"
#define VOLUME_CHANNEL_SYSTEM "System"

// Make sure you update this or clients won't be able to adjust the channel
GLOBAL_LIST_INIT(all_volume_channels, list(
VOLUME_CHANNEL_MASTER,
VOLUME_CHANNEL_AMBIENCE,
VOLUME_CHANNEL_ALARMS,
VOLUME_CHANNEL_DOORS,
VOLUME_CHANNEL_SYSTEM,
))

/*
Expand Down
20 changes: 20 additions & 0 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,21 @@
#define MOB_TINY 5
#define MOB_MINISCULE 1

// Gluttony levels. Used for eating items and mobs.
#define GLUT_NONE 0 // Cannot eat any mob or item.
#define GLUT_TINY 1 // Eat anything tiny and smaller
#define GLUT_SMALLER 2 // Eat anything smaller than we are
#define GLUT_ANYTHING 4 // Eat anything, ever

#define GLUT_ITEM_TINY 8 // Eat items with a w_class of small or smaller
#define GLUT_ITEM_NORMAL 16 // Eat items with a w_class of normal or smaller
#define GLUT_ITEM_ANYTHING 32 // Eat any item
#define GLUT_PROJECTILE_VOMIT 64 // When vomitting, does it fly out?

// Devour speeds, returned by can_devour()
#define DEVOUR_SLOW 1
#define DEVOUR_FAST 2

#define TINT_NONE 0
#define TINT_MODERATE 1
#define TINT_HEAVY 2
Expand Down Expand Up @@ -351,6 +366,11 @@
#define SA_ROBOTIC 3
#define SA_HUMANOID 4

// Robot module categorization
#define ROBOT_MODULE_TYPE_GROUNDED "grounded"
#define ROBOT_MODULE_TYPE_FLYING "flying"
#define ROBOT_MODULE_TYPE_PLATFORM "platform"

// More refined version of SA_* ""intelligence"" separators.
// Now includes bitflags, so to target two classes you just do 'MOB_CLASS_ANIMAL|MOB_CLASS_HUMANOID'
#define MOB_CLASS_NONE 0 // Default value, and used to invert for _ALL.
Expand Down
3 changes: 3 additions & 0 deletions code/__defines/movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

#define IS_WALKING(X) (X?.move_intent?.flags & MOVEMENT_INTENT_WALKING)
#define IS_RUNNING(X) (X?.move_intent?.flags & MOVEMENT_INTENT_RUNNING)

// Causes AStar paths to be blocked by windows that can't be passed through; usually, they go straight through.
#define ASTAR_BLOCKED_BY_WINDOWS 1
2 changes: 1 addition & 1 deletion code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Turf and target are separate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/living/carbon/brain/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/alien/M in sortmob)
for(var/mob/living/carbon/diona/M in sortmob)
moblist.Add(M)
for(var/mob/observer/dead/M in sortmob)
moblist.Add(M)
Expand Down
7 changes: 2 additions & 5 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@


/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(var/mob/living/user)
if(isalien(user))
icon_state = "bg_alien"
else
icon_state = "bg_default"
icon_state = "bg_default"
UpdateIcon()
return

Expand Down Expand Up @@ -226,4 +223,4 @@


/datum/action/innate/
action_type = AB_INNATE
action_type = AB_INNATE
3 changes: 3 additions & 0 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "v_fat"

/obj/screen/alert/fat/synth
name = "Fully Charged"
desc = "Your battery is full! Don't overvolt it."
icon_state = "c_fat"

Expand All @@ -176,6 +177,7 @@ The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "v_hungry"

/obj/screen/alert/hungry/synth
name = "Low Battery"
desc = "Battery's running a bit low, could use a topoff."
icon_state = "c_hungry"

Expand All @@ -189,6 +191,7 @@ The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "v_starving"

/obj/screen/alert/starving/synth
name = "Very Low Battery"
desc = "Your battery is about to die! Charge it ASAP!"
icon_state = "c_starving"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/mob/living/carbon/alien/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
/mob/living/carbon/diona/create_mob_hud(datum/hud/HUD, apply_to_client = TRUE)
..()

HUD.ui_style = 'icons/mob/screen1_alien.dmi'

HUD.adding = list()
Expand All @@ -24,6 +23,14 @@
healths.name = "health"
healths.screen_loc = ui_alien_health

zone_sel = new /obj/screen/zone_sel( null )
zone_sel.icon = HUD.ui_style
zone_sel.color = HUD.ui_color
zone_sel.alpha = HUD.ui_alpha
zone_sel.cut_overlays()
zone_sel.add_overlay(image('icons/mob/zone_sel.dmi', "[zone_sel.selecting]"))
HUD.adding += zone_sel

if(client && apply_to_client)
client.screen = list()
client.screen += list(healths)
Expand Down
15 changes: 0 additions & 15 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,6 @@
/mob/living/RestrainedClickOn(var/atom/A)
return

/*
Aliens
*/

/mob/living/carbon/alien/RestrainedClickOn(var/atom/A)
return

/mob/living/carbon/alien/UnarmedAttack(var/atom/A, var/proximity)

if(!..())
return 0

setClickCooldown(get_attack_speed())
A.attack_generic(src,rand(5,6),"bitten")

/*
New Players:
Have no reason to click on anything at all.
Expand Down
62 changes: 62 additions & 0 deletions code/controllers/subsystems/robots.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
SUBSYSTEM_DEF(robots)
name = "Robots"
init_order = INIT_ORDER_MISC_EARLY
flags = SS_NO_FIRE

var/list/modules_by_category = list()
var/list/crisis_modules_by_category = list()
var/list/upgrade_modules_by_category = list()
var/list/all_module_names = list()

var/list/mob_types_by_title = list(
"cyborg, flying" = /mob/living/silicon/robot/flying,
"robot, flying" = /mob/living/silicon/robot/flying,
"drone, flying" = /mob/living/silicon/robot/flying,
"drone, platform" = /mob/living/silicon/robot/platform
)

var/list/mmi_types_by_title = list(
"robot" = /obj/item/mmi/digital/posibrain,
"robot, flying" = /obj/item/mmi/digital/posibrain,
"drone" = /obj/item/mmi/digital/robot,
"drone, flying" = /obj/item/mmi/digital/robot,
"drone, platform" = /obj/item/mmi/digital/robot
)

/datum/controller/subsystem/robots/Initialize(start_uptime)

for(var/module_type in subtypesof(/obj/item/robot_module))
var/obj/item/robot_module/module = module_type
if(initial(module.unavailable_by_default))
continue
var/module_category = initial(module.module_category)
var/module_name = initial(module.display_name)
if(module_name && module_category)
if(initial(module.upgrade_locked))
LAZYINITLIST(upgrade_modules_by_category[module_category])
LAZYSET(upgrade_modules_by_category[module_category], module_name, module)
else if(initial(module.crisis_locked))
LAZYINITLIST(crisis_modules_by_category[module_category])
LAZYSET(crisis_modules_by_category[module_category], module_name, module)
else
LAZYINITLIST(modules_by_category[module_category])
LAZYSET(modules_by_category[module_category], module_name, module)
all_module_names |= module_name
all_module_names = sortTim(all_module_names, /proc/cmp_text_asc)

/datum/controller/subsystem/robots/proc/get_available_modules(module_category, crisis_mode, include_override)
. = list()
if(modules_by_category[module_category])
. += modules_by_category[module_category]
if(crisis_mode && crisis_modules_by_category[module_category])
. |= crisis_modules_by_category[module_category]
if(include_override && upgrade_modules_by_category[module_category])
var/list/modules = upgrade_modules_by_category[module_category]
if(modules[include_override])
.[include_override] = modules[include_override]

/datum/controller/subsystem/robots/proc/get_mmi_type_by_title(check_title)
. = mmi_types_by_title[lowertext(trim(check_title))] || /obj/item/mmi

/datum/controller/subsystem/robots/proc/get_mob_type_by_title(check_title)
. = mob_types_by_title[lowertext(trim(check_title))] || /mob/living/silicon/robot
6 changes: 4 additions & 2 deletions code/controllers/subsystems/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ var/global/datum/controller/subsystem/ticker/ticker
/datum/controller/subsystem/ticker/proc/pregame_welcome()
to_world("<span class='boldannounce notice'><em>Welcome to the pregame lobby!</em></span>")
to_world("<span class='boldannounce notice'>Please set up your character and select ready. The round will start in [pregame_timeleft] seconds.</span>")
world << sound('sound/misc/server-ready.ogg', volume = 100)
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/misc/server-ready.ogg', 100, FALSE, is_global = TRUE, volume_channel = VOLUME_CHANNEL_SYSTEM)

// Called during GAME_STATE_PREGAME (RUNLEVEL_LOBBY)
/datum/controller/subsystem/ticker/proc/pregame_tick()
Expand Down Expand Up @@ -185,7 +186,8 @@ var/global/datum/controller/subsystem/ticker/ticker
if (S.name != "AI")
qdel(S)
to_world("<span class='boldannounce notice'><em>Enjoy the game!</em></span>")
world << sound('sound/AI/welcome.ogg') // Skie
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/AI/welcome.ogg', 100, FALSE, is_global = TRUE, volume_channel = VOLUME_CHANNEL_SYSTEM)
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()

Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystems/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ SUBSYSTEM_DEF(vote)

to_world("<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [config.vote_period / 10] seconds to vote.</font>")
if(vote_type == VOTE_CREW_TRANSFER || vote_type == VOTE_GAMEMODE || vote_type == VOTE_CUSTOM)
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/ambience/alarm4.ogg', 50, FALSE, is_global = TRUE, channel = 3, volume_channel = VOLUME_CHANNEL_SYSTEM)

if(mode == VOTE_GAMEMODE && round_progressing)
gamemode_vote_called = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/datums/autolathe/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ var/global/datum/category_collection/autolathe/autolathe_recipes
var/man_rating = 0

/datum/category_item/autolathe/dd_SortValue()
return name
return name
4 changes: 0 additions & 4 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,6 @@
. = ..()
mind.assigned_role = "slime"

/mob/living/carbon/alien/larva/mind_initialize()
. = ..()
mind.special_role = "Larva"

//AI
/mob/living/silicon/ai/mind_initialize()
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/datums/outfits/jobs/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
uniform = /obj/item/clothing/under/rank/bartender
id_type = /obj/item/card/id/civilian/bartender
pda_type = /obj/item/pda/bar
backpack_contents = list(/obj/item/clothing/accessory/permit/gun/bar = 1)
backpack_contents = list(/obj/item/clothing/accessory/medal/permit/gun/bar = 1)

/decl/hierarchy/outfit/job/service/bartender/post_equip(mob/living/carbon/human/H)
..()
for(var/obj/item/clothing/accessory/permit/gun/bar/permit in H.back.contents)
for(var/obj/item/clothing/accessory/medal/permit/gun/bar/permit in H.back.contents)
permit.set_name(H.real_name)

/decl/hierarchy/outfit/job/service/bartender/barista
Expand Down
8 changes: 4 additions & 4 deletions code/datums/supplypacks/munitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Shotgun crate"
access = access_armory

/datum/supply_pack/munitions/shotgunsemi
name = "Weapons - Semi-Automatic Shotgun crate"
contains = list(
Expand All @@ -96,11 +96,11 @@
access = access_armory

/datum/supply_pack/munitions/burstlaser
name = "Weapons - Burst laser"
name = "Weapons - Burst Energy Gun"
contains = list(/obj/item/gun/energy/gun/burst = 2)
cost = 50
containertype = /obj/structure/closet/crate/secure/lawson
containername = "Burst laser crate"
containername = "Burst Energy Gun crate"
access = access_armory

/datum/supply_pack/munitions/ionweapons
Expand Down Expand Up @@ -248,4 +248,4 @@
cost = 50
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Energy ammunition crate"
access = access_security
access = access_security
10 changes: 5 additions & 5 deletions code/datums/supplypacks/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
/obj/item/clothing/suit/storage/forensics/red,
/obj/item/clothing/suit/storage/forensics/blue,
/obj/item/clothing/under/det/corporate = 2,
/obj/item/clothing/accessory/badge/holo/detective = 2,
/obj/item/clothing/accessory/medal/badge/holo/detective = 2,
/obj/item/clothing/gloves/black = 2
)
cost = 10
Expand All @@ -507,8 +507,8 @@
/obj/item/clothing/suit/storage/vest/officer,
/obj/item/clothing/head/helmet,
/obj/item/cartridge/security,
/obj/item/clothing/accessory/badge/holo,
/obj/item/clothing/accessory/badge/holo/cord,
/obj/item/clothing/accessory/medal/badge/holo,
/obj/item/clothing/accessory/medal/badge/holo/cord,
/obj/item/radio/headset/headset_sec,
/obj/item/storage/belt/security,
/obj/item/flash,
Expand Down Expand Up @@ -545,7 +545,7 @@
/obj/item/clothing/glasses/sunglasses/sechud,
/obj/item/taperoll/police,
/obj/item/hailer,
/obj/item/clothing/accessory/badge/holo/warden,
/obj/item/clothing/accessory/medal/badge/holo/warden,
/obj/item/storage/box/flashbangs,
/obj/item/storage/belt/security,
/obj/item/reagent_containers/spray/pepper,
Expand Down Expand Up @@ -573,7 +573,7 @@
/obj/item/storage/belt/security,
/obj/item/flash,
/obj/item/hailer,
/obj/item/clothing/accessory/badge/holo/hos,
/obj/item/clothing/accessory/medal/badge/holo/hos,
/obj/item/clothing/accessory/holster/waist,
/obj/item/melee/telebaton,
/obj/item/shield/riot/tele,
Expand Down
4 changes: 2 additions & 2 deletions code/defines/procs/AStar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ length to avoid portals or something i guess?? Not that they're counted right no
/proc/PathWeightCompare(PathNode/a, PathNode/b)
return a.estimated_cost - b.estimated_cost

/proc/AStar(var/start, var/end, var/adjacent, var/dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude)
/proc/AStar(var/start, var/end, var/adjacent, var/dist, var/max_nodes, var/max_node_depth = 30, var/min_target_dist = 0, var/min_node_dist, var/id, var/datum/exclude, flags = 0)
var/PriorityQueue/open = new /PriorityQueue(/proc/PathWeightCompare)
var/list/closed = list()
var/list/path
Expand Down Expand Up @@ -158,7 +158,7 @@ length to avoid portals or something i guess?? Not that they're counted right no
if(current.nodes_traversed >= max_node_depth)
continue

for(var/datum/datum in call(current.position, adjacent)(id))
for(var/datum/datum in call(current.position, adjacent)(id, flags))
if(datum == exclude)
continue

Expand Down
Loading

0 comments on commit 5732422

Please sign in to comment.