Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/d…
Browse files Browse the repository at this point in the history
…atacore
  • Loading branch information
realforest2001 committed Oct 9, 2023
2 parents b77d88e + 651a937 commit b0ac867
Show file tree
Hide file tree
Showing 430 changed files with 1,587 additions and 692 deletions.
5 changes: 5 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,8 @@ var/global/list/uniform_categories = list(
#define PHONE_MARINE "Marine"
#define PHONE_UPP_SOLDIER "Soldier"
#define PHONE_IO "IO"

#define PHONE_DND_FORCED 2
#define PHONE_DND_ON 1
#define PHONE_DND_OFF 0
#define PHONE_DND_FORBIDDEN -1
30 changes: 22 additions & 8 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
#define COMSIG_KG_CLIENT_RADIO_DOWN "keybinding_client_radio_down"

//Human
#define COMSIG_KB_HUMAN_QUICKEQUIP_DOWN "keybinding_human_quickequip_down"
#define COMSIG_KB_HUMAN_SECONDARY_DOWN "keybinding_human_secondary_down"
#define COMSIG_KB_HUMAN_TERTIARY_DOWN "keybinding_human_tertiary_down"
#define COMSIG_KB_HUMAN_QUATERNARY_DOWN "keybinding_human_quaternary_down"
#define COMSIG_KB_HUMAN_QUICK_EQUIP_DOWN "keybinding_human_quick_equip_down"

#define COMSIG_KB_HUMAN_ISSUE_ORDER "keybinding_human_issue_order"
#define COMSIG_KB_HUMAN_ISSUE_ORDER_MOVE "keybinding_human_issue_order_move"
#define COMSIG_KB_HUMAN_ISSUE_ORDER_HOLD "keybinding_human_issue_order_hold"
Expand All @@ -57,12 +51,31 @@
#define COMSIG_KB_HUMAN_SPECIALIST_ACTIVATION_ONE "keybinding_human_specialist_activation_one"
#define COMSIG_KB_HUMAN_SPECIALIST_ACTIVATION_TWO "keybinding_human_specialist_activation_two"

#define COMSIG_KB_HUMAN_PICK_UP "keybinding_human_pick_up"

#define COMSIG_KB_HUMAN_ROTATE_CHAIR "keybinding_human_rotate_chair"

#define COMSIG_KB_HUMAN_SHOW_HELD_ITEM "keybinding_human_show_held_item"

#define COMSIG_KB_HUMAN_CYCLE_HELMET_HUD "keybinding_human_cycle_helmet_hud"

// Human Inventory Navigation
#define COMSIG_KB_HUMAN_INTERACT_OTHER_HAND "keybinding_human_interact_other_hand"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_BACK "keybinding_human_interact_slot_back"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_BELT "keybinding_human_interact_slot_belt"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_UNIFORM "keybinding_human_interact_slot_uniform"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_SUIT "keybinding_human_interact_slot_suit"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_HELMET "keybinding_human_interact_slot_helmet"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_LEFT_POUCH "keybinding_human_interact_slot_left_pouch"
#define COMSIG_KB_HUMAN_INTERACT_SLOT_RIGHT_POUCH "keybinding_human_interact_slot_right_pouch"
#define COMSIG_KB_HUMAN_INTERACT_SUIT_S_STORE "keybinding_human_interact_slot_suit_storage"

#define COMSIG_KB_HUMAN_INTERACT_QUICKEQUIP_DOWN "keybinding_human_interact_quickequip_down"
#define COMSIG_KB_HUMAN_INTERACT_SECONDARY_DOWN "keybinding_human_interact_secondary_down"
#define COMSIG_KB_HUMAN_INTERACT_TERTIARY_DOWN "keybinding_human_interact_tertiary_down"
#define COMSIG_KB_HUMAN_INTERACT_QUATERNARY_DOWN "keybinding_human_interact_quaternary_down"
#define COMSIG_KB_HUMAN_INTERACT_QUICK_EQUIP_DOWN "keybinding_human_interact_quick_equip_down"

#define COMSIG_KB_HUMAN_INTERACT_PICK_UP "keybinding_human_interact_pick_up"

// Human Combat
#define COMSIG_KB_HUMAN_WEAPON_FIELDSTRIP "keybinding_human_weapon_fieldstrip"
#define COMSIG_KB_HUMAN_WEAPON_BURSTFIRE "keybinding_human_weapon_burstfire"
Expand Down Expand Up @@ -199,6 +212,7 @@
#define CATEGORY_CARBON "CARBON"
#define CATEGORY_HUMAN "HUMAN"
#define CATEGORY_HUMAN_COMBAT "HUMAN COMBAT"
#define CATEGORY_HUMAN_INVENTORY "HUMAN INVENTORY"
#define CATEGORY_ROBOT "ROBOT"
#define CATEGORY_YAUTJA "YAUTJA"
#define CATEGORY_MISC "MISC"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ var/global/list/whitelist_hierarchy = list(WHITELIST_NORMAL, WHITELIST_COUNCIL,
#define FACTION_MONKEY "Monkey" // Nanu

#define FACTION_LIST_MARINE list(FACTION_MARINE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_HUMANOID list(FACTION_MARINE, FACTION_PMC, FACTION_WY, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_MARSHAL, FACTION_UPP, FACTION_FREELANCER, FACTION_SURVIVOR, FACTION_NEUTRAL, FACTION_COLONIST, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_YAUTJA, FACTION_ZOMBIE, FACTION_TWE)
#define FACTION_LIST_ERT list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_CLF, FACTION_CONTRACTOR, FACTION_UPP, FACTION_FREELANCER, FACTION_MERCENARY, FACTION_DUTCH, FACTION_HEFA, FACTION_GLADIATOR, FACTION_PIRATE, FACTION_PIZZA, FACTION_SOUTO, FACTION_MARSHAL, FACTION_TWE)
#define FACTION_LIST_WY list(FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@
/// The time it takes for a pylon to give one larva while activated
#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES)

/// The time until you can re-corrupt a comms relay after the last pylon was destroyed
#define XENO_PYLON_DESTRUCTION_DELAY (5 MINUTES)


/// The time against away_timer when an AFK xeno larva can be replaced
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
/// The time against away_timer when an AFK xeno (not larva) can be replaced
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,11 @@
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue.")
var/cached_message = "You are currently [i-dequeued]\th in the larva queue."
cur_obs.larva_queue_cached_message = cached_message
if(!cache_only)
var/chat_message = dequeued ? replacetext(cached_message, "currently", "now") : cached_message
to_chat(candidates[i], chat_message)
to_chat(candidates[i], SPAN_XENONOTICE(chat_message))

/proc/convert_k2c(temp)
return ((temp - T0C))
Expand Down
52 changes: 38 additions & 14 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ world
/// appearance system (overlays/underlays, etc.) is not available.
///
/// Only the first argument is required.
/proc/getFlatIcon(image/appearance, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE)
/// appearance_flags indicates whether appearance_flags should be respected (at the cost of about 10-20% perf)
/proc/getFlatIcon(image/appearance, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE, appearance_flags = FALSE)
// Loop through the underlays, then overlays, sorting them into the layers list
#define PROCESS_OVERLAYS_OR_UNDERLAYS(flat, process, base_layer) \
for (var/i in 1 to process.len) { \
Expand Down Expand Up @@ -435,11 +436,21 @@ world
if(layer_image.alpha == 0)
continue

// variables only relevant when accounting for appearance_flags:
var/apply_color = TRUE
var/apply_alpha = TRUE

if(layer_image == copy) // 'layer_image' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(layer_image.icon, layer_image.icon_state, base_icon_dir)
else // 'I' is an appearance object.
add = getFlatIcon(image(layer_image), curdir, curicon, curstate, curblend, FALSE, no_anim)
var/image/layer_as_image = image(layer_image)
if(appearance_flags)
if(layer_as_image.appearance_flags & RESET_COLOR)
apply_color = FALSE
if(layer_as_image.appearance_flags & RESET_ALPHA)
apply_alpha = FALSE
add = getFlatIcon(layer_as_image, curdir, curicon, curstate, curblend, FALSE, no_anim, appearance_flags)
if(!add)
continue

Expand All @@ -451,9 +462,9 @@ world

if (
addX1 != flatX1 \
&& addX2 != flatX2 \
&& addY1 != flatY1 \
&& addY2 != flatY2 \
|| addX2 != flatX2 \
|| addY1 != flatY1 \
|| addY2 != flatY2 \
)
// Resize the flattened icon so the new icon fits
flat.Crop(
Expand All @@ -464,21 +475,34 @@ world
)

flatX1 = addX1
flatX2 = addY1
flatY1 = addX2
flatX2 = addX2
flatY1 = addY1
flatY2 = addY2

if(appearance_flags)
// apply parent's color/alpha to the added layers if the layer didn't opt
if(apply_color && appearance.color)
if(islist(appearance.color))
add.MapColors(arglist(appearance.color))
else
add.Blend(appearance.color, ICON_MULTIPLY)

if(apply_alpha && appearance.alpha < 255)
add.Blend(rgb(255, 255, 255, appearance.alpha), ICON_MULTIPLY)

// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), layer_image.pixel_x + 2 - flatX1, layer_image.pixel_y + 2 - flatY1)

if(appearance.color)
if(islist(appearance.color))
flat.MapColors(arglist(appearance.color))
else
flat.Blend(appearance.color, ICON_MULTIPLY)
if(!appearance_flags)
// If we didn't apply parent colors individually per layer respecting appearance_flags, then do it just the one time now
if(appearance.color)
if(islist(appearance.color))
flat.MapColors(arglist(appearance.color))
else
flat.Blend(appearance.color, ICON_MULTIPLY)

if(appearance.alpha < 255)
flat.Blend(rgb(255, 255, 255, appearance.alpha), ICON_MULTIPLY)
if(appearance.alpha < 255)
flat.Blend(rgb(255, 255, 255, appearance.alpha), ICON_MULTIPLY)

if(no_anim)
//Clean up repeated frames
Expand Down
5 changes: 5 additions & 0 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ Quick adjacency (to turf):
/obj/item/Adjacent(atom/neighbor, recurse = 1)
if(neighbor == loc || (loc && neighbor == loc.loc))
return TRUE

// Internal storages have special relationships with the object they are connected to and we still want two depth adjacency for storages
if(istype(loc?.loc, /obj/item/storage/internal) && recurse > 0)
return loc.loc.Adjacent(neighbor, recurse)

if(issurface(loc))
return loc.Adjacent(neighbor, recurse) //Surfaces don't count as storage depth.
else if(istype(loc, /obj/item))
Expand Down
10 changes: 6 additions & 4 deletions code/controllers/subsystem/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ SUBSYSTEM_DEF(statpanels)
set name = "Open Statbrowser Options"
set hidden = TRUE

if (!current_fontsize)
current_fontsize = 12

var/datum/statbrowser_options/SM = statbrowser_options
if(!SM)
SM = statbrowser_options = new(src, current_fontsize)
SM.tgui_interact()
var/datum/statbrowser_options/options_panel = statbrowser_options
if(!options_panel)
options_panel = statbrowser_options = new(src, current_fontsize)
options_panel.tgui_interact()
10 changes: 4 additions & 6 deletions code/datums/disease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
check_range = 1 // everything else, like infect-on-contact things, only infect things on top of it

if(isturf(source.loc))
for(var/mob/living/carbon/M in oview(check_range, source))
if(isturf(M.loc))
if(AStar(source.loc, M.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
M.contract_disease(src, 0, 1, force_spread)
for(var/mob/living/carbon/victim in oview(check_range, source))
if(isturf(victim.loc))
if(AStar(source.loc, victim.loc, /turf/proc/AdjacentTurfs, /turf/proc/Distance, check_range))
victim.contract_disease(src, 0, 1, force_spread)

return

Expand Down Expand Up @@ -173,8 +173,6 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
var/mob/living/carbon/human/H = affected_mob
H.med_hud_set_status()



/datum/disease/New(process=TRUE)//process = 1 - adding the object to global list. List is processed by master controller.
cure_list = list(cure_id) // to add more cures, add more vars to this list in the actual disease's New()
if(process) // Viruses in list are considered active.
Expand Down
30 changes: 15 additions & 15 deletions code/datums/diseases/mob_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@

passed = check_disease_pass_clothes(target_zone)

if(!passed && spread_type == AIRBORNE && !internal)
passed = (prob((50*virus.permeability_mod) - 1))

if(passed)
AddDisease(virus)

Expand Down Expand Up @@ -111,36 +108,39 @@

/mob/living/carbon/human/check_disease_pass_clothes(target_zone)
var/obj/item/clothing/Cl
var/protection = 0
switch(target_zone)
if(1)
if(isobj(head) && !istype(head, /obj/item/paper))
Cl = head
. = prob((Cl.permeability_coefficient*100) - 1)
if(. && wear_mask)
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100
if(isobj(wear_mask))
Cl = wear_mask
protection += (Cl.permeability_coefficient*100)-100
if(2)//arms and legs included
if(isobj(wear_suit))
Cl = wear_suit
. = prob((Cl.permeability_coefficient*100) - 1)
if(. && isobj(WEAR_BODY))
protection += (Cl.permeability_coefficient*100)-100
if(isobj(WEAR_BODY))
Cl = WEAR_BODY
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100
if(3)
if(isobj(wear_suit) && wear_suit.flags_armor_protection & BODY_FLAG_HANDS)
Cl = wear_suit
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100

if(. && isobj(gloves))
if(isobj(gloves))
Cl = gloves
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100
if(4)
if(isobj(wear_suit) && wear_suit.flags_armor_protection & BODY_FLAG_FEET)
Cl = wear_suit
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100

if(. && isobj(shoes))
if(isobj(shoes))
Cl = shoes
. = prob((Cl.permeability_coefficient*100) - 1)
protection += (Cl.permeability_coefficient*100)-100
else
to_chat(src, "Something bad happened with disease target zone code, tell a dev or admin ")
return prob(clamp(protection, 5, 90))

2 changes: 1 addition & 1 deletion code/datums/emergency_calls/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

/datum/game_mode/whiskey_outpost/activate_distress()
var/datum/emergency_call/em_call = /datum/emergency_call/wo
em_call.activate(FALSE)
em_call.activate(TRUE, FALSE)
return

/datum/emergency_call/wo/platoon
Expand Down
Loading

0 comments on commit b0ac867

Please sign in to comment.