Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO committed Feb 27, 2022
2 parents 1bdc66f + 8377263 commit 54aec9b
Show file tree
Hide file tree
Showing 246 changed files with 1,445 additions and 1,075 deletions.
11 changes: 6 additions & 5 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ GLOBAL_LIST_EMPTY(living_heart_cache) //A list of all living hearts in existance
#define BLOB_ATTACK_REFUND 2 //blob refunds this much if it attacks and doesn't spread
#define BLOB_REFLECTOR_COST 15

//Objectives-Ambitions Panel
#define REQUEST_NEW_OBJECTIVE "new_objective"
#define REQUEST_DEL_OBJECTIVE "del_objective"
#define REQUEST_WIN_OBJECTIVE "win_objective"
#define REQUEST_LOSE_OBJECTIVE "lose_objective"
/// How many telecrystals a normal traitor starts with
#define TELECRYSTALS_DEFAULT 20
/// How many telecrystals mapper/admin only "precharged" uplink implant
Expand All @@ -128,3 +123,9 @@ GLOBAL_LIST_EMPTY(living_heart_cache) //A list of all living hearts in existance

/// The dimensions of the antagonist preview icon. Will be scaled to this size.
#define ANTAGONIST_PREVIEW_ICON_SIZE 96

//Objectives-Ambitions Panel
#define REQUEST_NEW_OBJECTIVE "new_objective"
#define REQUEST_DEL_OBJECTIVE "del_objective"
#define REQUEST_WIN_OBJECTIVE "win_objective"
#define REQUEST_LOSE_OBJECTIVE "lose_objective"
1 change: 1 addition & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
#define GLOVES_MAX_TEMP_PROTECT 1500 //For some gloves
#define SHOES_MIN_TEMP_PROTECT 2.0 //For gloves
#define SHOES_MAX_TEMP_PROTECT 1500 //For gloves
#define COAT_MAX_TEMP_PROTECT 330 //For winter coats (if they can stop you from getting cold why can't they do it the other way to a lesser extent)

#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define MAX_HIGH_PRESSURE_DAMAGE 16 // CITADEL CHANGES Max to 16, low to 8.
Expand Down
173 changes: 62 additions & 111 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,116 +6,67 @@
#define STORAGE_VIEW_DEPTH 2

//ITEM INVENTORY SLOT BITMASKS
#define ITEM_SLOT_OCLOTHING (1<<0)
#define ITEM_SLOT_ICLOTHING (1<<1)
#define ITEM_SLOT_GLOVES (1<<2)
#define ITEM_SLOT_EYES (1<<3)
#define ITEM_SLOT_EARS (1<<4)
#define ITEM_SLOT_MASK (1<<5)
#define ITEM_SLOT_HEAD (1<<6)
#define ITEM_SLOT_FEET (1<<7)
#define ITEM_SLOT_ID (1<<8)
#define ITEM_SLOT_BELT (1<<9)
#define ITEM_SLOT_BACK (1<<10)
#define ITEM_SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
#define ITEM_SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
#define ITEM_SLOT_NECK (1<<13)
#define ITEM_SLOT_HANDS (1<<14)
#define ITEM_SLOT_BACKPACK (1<<15)
#define ITEM_SLOT_SUITSTORE (1<<16)
//skyrat edit
#define ITEM_SLOT_UNDERWEAR (1<<17)
#define ITEM_SLOT_SOCKS (1<<18)
#define ITEM_SLOT_SHIRT (1<<19)
#define ITEM_SLOT_WRISTS (1<<20)
//

//SLOTS
#define SLOT_BACK 1
#define SLOT_WEAR_MASK 2
#define SLOT_HANDCUFFED 3
#define SLOT_HANDS 4 //wherever you provide a slot for hands you provide SLOT_HANDS
//SLOT_HANDS as a slot will pick ANY available hand
#define SLOT_BELT 5
#define SLOT_WEAR_ID 6
#define SLOT_EARS_LEFT 7 //skyrat edit
#define SLOT_GLASSES 8
#define SLOT_GLOVES 9
#define SLOT_NECK 10
#define SLOT_HEAD 11
#define SLOT_SHOES 12
#define SLOT_WEAR_SUIT 13
#define SLOT_W_UNIFORM 14
#define SLOT_L_STORE 15
#define SLOT_R_STORE 16
#define SLOT_S_STORE 17
#define SLOT_IN_BACKPACK 18
#define SLOT_LEGCUFFED 19
#define SLOT_GENERC_DEXTROUS_STORAGE 20
//skyrat edit
#define SLOT_W_UNDERWEAR 21
#define SLOT_W_SOCKS 22
#define SLOT_W_SHIRT 23
#define SLOT_EARS_RIGHT 24
#define SLOT_WRISTS 25
//


#define SLOTS_AMT 25 // Keep this up to date! //skyrat edit - extra slots

//I hate that this has to exist
/proc/slotdefine2slotbit(slotdefine) //Keep this up to date with the value of SLOT BITMASKS and SLOTS (the two define sections above)
. = 0
switch(slotdefine)
if(SLOT_BACK)
. = ITEM_SLOT_BACK
if(SLOT_WEAR_MASK)
. = ITEM_SLOT_MASK
if(SLOT_NECK)
. = ITEM_SLOT_NECK
if(SLOT_BELT)
. = ITEM_SLOT_BELT
if(SLOT_WEAR_ID)
. = ITEM_SLOT_ID
//skyrat edit
if(SLOT_EARS_RIGHT)
. = ITEM_SLOT_EARS
if(SLOT_EARS_LEFT)
. = ITEM_SLOT_EARS
//
if(SLOT_GLASSES)
. = ITEM_SLOT_EYES
if(SLOT_GLOVES)
. = ITEM_SLOT_GLOVES
//skyrat edit
if(SLOT_WRISTS)
. = ITEM_SLOT_WRISTS
//
if(SLOT_HEAD)
. = ITEM_SLOT_HEAD
if(SLOT_SHOES)
. = ITEM_SLOT_FEET
if(SLOT_WEAR_SUIT)
. = ITEM_SLOT_OCLOTHING
if(SLOT_W_UNIFORM)
. = ITEM_SLOT_ICLOTHING
if(SLOT_L_STORE, SLOT_R_STORE)
. = ITEM_SLOT_POCKET
if(SLOT_HANDS)
. = ITEM_SLOT_HANDS
if(SLOT_IN_BACKPACK)
. = ITEM_SLOT_BACKPACK
if(SLOT_S_STORE)
. = ITEM_SLOT_SUITSTORE
//skyrat edit
if(SLOT_W_UNDERWEAR)
. = ITEM_SLOT_UNDERWEAR
if(SLOT_W_SOCKS)
. = ITEM_SLOT_SOCKS
if(SLOT_W_SHIRT)
. = ITEM_SLOT_SHIRT
//

/// Suit slot (armors, costumes, space suits, etc.)
#define ITEM_SLOT_OCLOTHING (1<<0)
/// Jumpsuit slot
#define ITEM_SLOT_ICLOTHING (1<<1)
/// Glove slot
#define ITEM_SLOT_GLOVES (1<<2)
/// Glasses slot
#define ITEM_SLOT_EYES (1<<3)
/// Ear slot (radios, earmuffs)
#define ITEM_SLOT_EARS_LEFT (1<<4)
/// Mask slot
#define ITEM_SLOT_MASK (1<<5)
/// Head slot (helmets, hats, etc.)
#define ITEM_SLOT_HEAD (1<<6)
/// Shoe slot
#define ITEM_SLOT_FEET (1<<7)
/// ID slot
#define ITEM_SLOT_ID (1<<8)
/// Belt slot
#define ITEM_SLOT_BELT (1<<9)
/// Back slot
#define ITEM_SLOT_BACK (1<<10)
/// Dextrous simplemob "hands" (used for Drones and Dextrous Guardians)
#define ITEM_SLOT_DEX_STORAGE (1<<11)
/// Neck slot (ties, bedsheets, scarves)
#define ITEM_SLOT_NECK (1<<12)
/// A character's hand slots
#define ITEM_SLOT_HANDS (1<<13)
/// Inside of a character's backpack
#define ITEM_SLOT_BACKPACK (1<<14)
/// Suit Storage slot
#define ITEM_SLOT_SUITSTORE (1<<15)
/// Left Pocket slot
#define ITEM_SLOT_LPOCKET (1<<16)
/// Right Pocket slot
#define ITEM_SLOT_RPOCKET (1<<17)
// -- Sandstorm edit --
/// Underwear slot
#define ITEM_SLOT_UNDERWEAR (1<<17)
/// Socks slot
#define ITEM_SLOT_SOCKS (1<<18)
/// Shirt slot
#define ITEM_SLOT_SHIRT (1<<19)
/// Right ear slot
#define ITEM_SLOT_EARS_RIGHT (1<<20)
/// Wrist slot
#define ITEM_SLOT_WRISTS (1<<21)
// -- End edit --
/// Handcuff slot
#define ITEM_SLOT_HANDCUFFED (1<<22)
/// Legcuff slot (bolas, beartraps)
#define ITEM_SLOT_LEGCUFFED (1<<23)

/// Total amount of slots
#define SLOTS_AMT 25 // Keep this up to date!

//SLOT GROUP HELPERS
#define ITEM_SLOT_POCKETS (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET)

//EARS HELPER
#define ITEM_SLOT_EARS (ITEM_SLOT_EARS_LEFT|ITEM_SLOT_EARS_RIGHT)

//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES (1<<0)
Expand Down Expand Up @@ -278,4 +229,4 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list(
#define GET_INTERNAL_SLOTS(C) list(C.head, C.wear_mask)

//Slots that won't trigger humans' update_genitals() on equip().
GLOBAL_LIST_INIT(no_genitals_update_slots, list(SLOT_L_STORE, SLOT_R_STORE, SLOT_S_STORE, SLOT_IN_BACKPACK, SLOT_LEGCUFFED, SLOT_HANDCUFFED, SLOT_HANDS, SLOT_GENERC_DEXTROUS_STORAGE))
GLOBAL_LIST_INIT(no_genitals_update_slots, list(ITEM_SLOT_LPOCKET, ITEM_SLOT_RPOCKET, ITEM_SLOT_SUITSTORE, ITEM_SLOT_BACKPACK, ITEM_SLOT_LEGCUFFED, ITEM_SLOT_HANDCUFFED, ITEM_SLOT_HANDS, ITEM_SLOT_DEX_STORAGE))
3 changes: 3 additions & 0 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@

#define TORADIANS(degrees) ((degrees) * 0.0174532925)

/// Gets shift x that would be required the bitflag (1<<x)
#define TOBITSHIFT(bit) ( log(2, bit) )

// Will filter out extra rotations and negative rotations
// E.g: 540 becomes 180. -180 becomes 180.
#define SIMPLIFY_DEGREES(degrees) (MODULUS((degrees), 360))
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
)

#define BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve.
#define BOMB_TARGET_SIZE 200 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
#define BOMB_SUB_TARGET_EXPONENT 2 // The power of the points curve below the target size. Higher = less points for worse bombs, below target.
#define BOMB_TARGET_SIZE 175 // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points.
#define BOMB_SUB_TARGET_EXPONENT 3 // The power of the points curve below the target size. Higher = less points for worse bombs, below target.
3 changes: 3 additions & 0 deletions code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,6 @@ GLOBAL_VAR_INIT(cmp_field, "name")

/proc/cmp_typepaths_asc(A, B)
return sorttext("[B]","[A]")

/proc/cmp_playtime(list/A, list/B)
return A["playtime"] - B["playtime"]
2 changes: 1 addition & 1 deletion code/__HELPERS/custom_holoforms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if(length(inhand_equipment))
for(var/path in inhand_equipment)
var/obj/item/I = new path
mannequin.equip_to_slot_if_possible(I, SLOT_HANDS, TRUE, TRUE, TRUE, TRUE)
mannequin.equip_to_slot_if_possible(I, ITEM_SLOT_HANDS, TRUE, TRUE, TRUE, TRUE)


var/icon/combined = new
Expand Down
18 changes: 9 additions & 9 deletions code/__HELPERS/pronouns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,62 +203,62 @@
/mob/living/carbon/human/p_they(capitalized, temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_their(capitalized, temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_them(capitalized, temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_have(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_are(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_were(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_do(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_s(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()

/mob/living/carbon/human/p_es(temp_gender)
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
if((SLOT_W_UNIFORM in obscured) && skipface)
if((ITEM_SLOT_ICLOTHING in obscured) && skipface)
temp_gender = PLURAL
return ..()
Loading

0 comments on commit 54aec9b

Please sign in to comment.