Skip to content

Commit

Permalink
Upstream sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyderar committed Sep 8, 2023
1 parent 6da1056 commit f5ff1aa
Show file tree
Hide file tree
Showing 98 changed files with 13,263 additions and 5,576 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define AMMO_IGNORE_RESIST (1<<10)
#define AMMO_BALLISTIC (1<<11)
#define AMMO_IGNORE_COVER (1<<12)
// (1<<13) unused, previously was AMMO_SCANS_NEARBY
#define AMMO_ANTIVEHICLE (1<<13)
#define AMMO_STOPPED_BY_COVER (1<<14)
#define AMMO_SPECIAL_EMBED (1<<15)
/// If the projectile hits a dense turf it'll do on_hit_turf on the turf just in front of the turf instead of on the turf itself
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@
#define COMSIG_MOB_MOUSEDRAG "mob_mousedrag" //from /client/MouseDrag(): (atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
#define COMSIG_MOB_CLICK_CANCELED (1<<0)
#define COMSIG_MOB_CLICK_HANDLED (1<<1)

#define COMSIG_MOB_DEPLOYED_BIPOD "mob_deployed_bipod"
#define COMSIG_MOB_UNDEPLOYED_BIPOD "mob_undeployed_bipod"

/// From /obj/item/proc/pickup() : (obj/item/picked_up)
#define COMSIG_MOB_PICKUP_ITEM "mob_pickup_item"
5 changes: 5 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
#define COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED "gun_burst_shots_to_fire_modified"
#define COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED "gun_burst_shot_delay_modified"

#define COMSIG_GUN_VULTURE_FIRED_ONEHAND "gun_vulture_fired_onehand"
#define COMSIG_VULTURE_SCOPE_MOVED "vulture_scope_moved"
#define COMSIG_VULTURE_SCOPE_SCOPED "vulture_scope_scoped"
#define COMSIG_VULTURE_SCOPE_UNSCOPED "vulture_scope_unscoped"

/// from /obj/item/weapon/gun/proc/recalculate_attachment_bonuses() : ()
#define COMSIG_GUN_RECALCULATE_ATTACHMENT_BONUSES "gun_recalculate_attachment_bonuses"

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
#define SLOT_LEGS (1<<13)
#define SLOT_ACCESSORY (1<<14)
#define SLOT_SUIT_STORE (1<<15) //this allows items to be stored in the suit slot regardless of suit
/// Anything with this flag cannot be worn in suit storage, period.
#define SLOT_BLOCK_SUIT_STORE (1<<16)
//=================================================

//slots
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@
#define FULLSCREEN_BLIND_LAYER 17.15
/// pain flashes
#define FULLSCREEN_PAIN_LAYER 17.2
/// Vulture sniper/spotter scope
#define FULLSCREEN_VULTURE_SCOPE_LAYER 17.21
/// in critical
#define FULLSCREEN_CRIT_LAYER 17.25

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define SHUTTLE_LOCK_COOLDOWN 10 MINUTES
#define MONORAIL_LOCK_COOLDOWN 3 MINUTES
#define SHUTTLE_LOCK_TIME_LOCK 1 MINUTES
#define EVACUATION_AUTOMATIC_DEPARTURE 10 MINUTES //All pods automatically depart in 10 minutes, unless they are full or unable to launch for some reason.
#define EVACUATION_AUTOMATIC_DEPARTURE (10 MINUTES) //All pods automatically depart in 10 minutes, unless they are full or unable to launch for some reason.
#define EVACUATION_ESTIMATE_DEPARTURE ((evac_time + EVACUATION_AUTOMATIC_DEPARTURE - world.time) * 0.1)

#define EVACUATION_STATUS_STANDING_BY 0
Expand Down
10 changes: 9 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@
#define TRAIT_USING_WHEELCHAIR "t_using_wheelchair"
/// If the mob will instantly go permadead upon death
#define TRAIT_HARDCORE "t_hardcore"
/// If the mob is able to use the vulture rifle or spotting scope
#define TRAIT_VULTURE_USER "t_vulture_user"

// -- ability traits --
/// Xenos with this trait cannot have plasma transfered to them
Expand All @@ -203,6 +205,9 @@

// GUN TRAITS
#define TRAIT_GUN_SILENCED "t_gun_silenced"

#define TRAIT_GUN_BIPODDED "t_gun_bipodded"

#define TRAIT_GUN_LIGHT_DEACTIVATED "t_gun_light_deactivated"

// Miscellaneous item traits.
Expand Down Expand Up @@ -239,7 +244,8 @@ GLOBAL_LIST_INIT(mob_traits, list(
TRAIT_LEADERSHIP,
TRAIT_DEXTROUS,
TRAIT_REAGENT_SCANNER,
TRAIT_ABILITY_BURROWED
TRAIT_ABILITY_BURROWED,
TRAIT_VULTURE_USER,
))

/*
Expand Down Expand Up @@ -271,6 +277,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_EMOTE_CD_EXEMPT" = TRAIT_EMOTE_CD_EXEMPT,
"TRAIT_LISPING" = TRAIT_LISPING,
"TRAIT_CANNOT_EAT" = TRAIT_CANNOT_EAT,
"TRAIT_VULTURE_USER" = TRAIT_VULTURE_USER,
),
/mob/living/carbon/xenomorph = list(
"TRAIT_ABILITY_NO_PLASMA_TRANSFER" = TRAIT_ABILITY_NO_PLASMA_TRANSFER,
Expand Down Expand Up @@ -299,6 +306,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
),
/obj/item/weapon/gun = list(
"TRAIT_GUN_SILENCED" = TRAIT_GUN_SILENCED,
"TRAIT_GUN_BIPODDED" = TRAIT_GUN_BIPODDED,
),
/obj/structure/surface/table = list(
"TRAIT_STRUCTURE_FLIPPING" = TRAIT_TABLE_FLIPPING,
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/weapon_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ As such, don't expect any values assigned to common firearms to even consider ho
//How many ticks you have to wait between firing. Burst delay uses the same variable!
*/

#define FIRE_DELAY_TIER_VULTURE 20
#define FIRE_DELAY_TIER_1 12
#define FIRE_DELAY_TIER_2 10
#define FIRE_DELAY_TIER_3 9
Expand Down
27 changes: 27 additions & 0 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2066,3 +2066,30 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list(
if(stop_type && istype(turf_to_check, stop_type))
break
return turf_to_check

/// Given a direction, return the direction and the +-45 degree directions next to it
/proc/get_related_directions(direction = NORTH)
switch(direction)
if(NORTH)
return list(NORTH, NORTHEAST, NORTHWEST)

if(EAST)
return list(EAST, NORTHEAST, SOUTHEAST)

if(SOUTH)
return list(SOUTH, SOUTHEAST, SOUTHWEST)

if(WEST)
return list(WEST, NORTHWEST, SOUTHWEST)

if(NORTHEAST)
return list(NORTHEAST, NORTH, EAST)

if(SOUTHEAST)
return list(SOUTHEAST, EAST, SOUTH)

if(SOUTHWEST)
return list(SOUTHWEST, SOUTH, WEST)

if(NORTHWEST)
return list(NORTHWEST, NORTH, WEST)
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ DEFINE_BITFIELD(valid_equip_slots, list(
"SLOT_LEGS" = SLOT_LEGS,
"SLOT_ACCESSORY" = SLOT_ACCESSORY,
"SLOT_SUIT_STORE" = SLOT_SUIT_STORE,
"SLOT_BLOCK_SUIT_STORE" = SLOT_BLOCK_SUIT_STORE,
))

DEFINE_BITFIELD(flags_alarm_state, list(
Expand Down
12 changes: 11 additions & 1 deletion code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@
var/severity = 0
var/fs_view = 7
var/show_when_dead = FALSE
/// If this should try and resize if the user's view is bigger than the default
var/should_resize = TRUE

/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && fs_view != client_view)
if (screen_loc == "CENTER-7,CENTER-7" && fs_view != client_view && should_resize)
var/list/actualview = getviewsize(client_view)
fs_view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
Expand Down Expand Up @@ -169,6 +171,14 @@
/atom/movable/screen/fullscreen/laser_blind
icon_state = "impairedoverlay1"

/atom/movable/screen/fullscreen/vulture
icon_state = "vulture_scope_overlay_sniper"
layer = FULLSCREEN_VULTURE_SCOPE_LAYER

/atom/movable/screen/fullscreen/vulture/spotter
icon_state = "vulture_scope_overlay_spotter"
should_resize = FALSE

//Weather overlays//

/atom/movable/screen/fullscreen/weather
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -639,3 +639,7 @@
/atom/movable/screen/rotate/alt
dir = WEST
rotate_amount = -90

/atom/movable/screen/vulture_scope // The part of the vulture's scope that drifts over time
icon_state = "vulture_unsteady"
screen_loc = "CENTER,CENTER"
47 changes: 47 additions & 0 deletions code/datums/elements/bullet_trait/penetrating/heavy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/datum/element/bullet_trait_penetrating/heavy
// Generic bullet trait vars
element_flags = ELEMENT_DETACH|ELEMENT_BESPOKE
id_arg_index = 3

/// For every turf this pierces, how much damage should this lose?
var/damage_lost_per_pen = 100
/// Typecache of things to annihilate if the bullet is on a tile with it
var/static/list/bullet_destroy_structures = typecacheof(list(
/obj/structure/surface,
/obj/structure/barricade,
))

/datum/element/bullet_trait_penetrating/heavy/Attach(datum/target, distance_loss_per_hit = 3, damage_lost_per_pen = 75)
. = ..()
if(. == ELEMENT_INCOMPATIBLE)
return

src.damage_lost_per_pen = damage_lost_per_pen

/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_movables(obj/item/projectile/bullet, atom/movable/hit_movable, did_hit)
if(did_hit)
var/slow_mult = 1
if(ismob(hit_movable))
var/mob/mob = hit_movable
if(mob.mob_size >= MOB_SIZE_BIG)
slow_mult = 2

bullet.distance_travelled += (distance_loss_per_hit * slow_mult)

if(is_type_in_typecache(hit_movable, bullet_destroy_structures))
var/obj/structure/cade = hit_movable
cade.deconstruct() // This bullet just tears through whatever cades you put it up against from either side
bullet.damage -= damage_lost_per_pen

return COMPONENT_BULLET_PASS_THROUGH

/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_turf(obj/item/projectile/bullet, turf/closed/wall/hit_wall)
bullet.distance_travelled += distance_loss_per_hit
bullet.damage -= damage_lost_per_pen

if(!istype(hit_wall))
return COMPONENT_BULLET_PASS_THROUGH

if(!hit_wall.hull)
return COMPONENT_BULLET_PASS_THROUGH

2 changes: 1 addition & 1 deletion code/datums/entities/player_note.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ BSQL_PROTECT_DATUM(/datum/entity/player_note)
/// Returns all notes associated with a CKEY, structured as a list of strings.
/proc/get_all_notes(player_ckey)
for(var/datum/view_record/note_view/note in DB_VIEW(/datum/view_record/note_view, DB_COMP("player_ckey", DB_EQUALS, player_ckey)))
LAZYADDASSOC(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date] ([note.round_id])")
LAZYADDASSOCLIST(., "[note.note_category]", "\"[note.text]\", by [note.admin_ckey] ([note.admin_rank]) on [note.date] ([note.round_id])")
12 changes: 11 additions & 1 deletion code/datums/supply_packs/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
group = "Weapons"

/datum/supply_packs/grenade_launchers
name = "M79 Grenade Launcher Crate (x2 Guncasess)"
name = "M79 Grenade Launcher Crate (x2 Guncases)"
contains = list(
/obj/item/storage/box/guncase/m79,
/obj/item/storage/box/guncase/m79,
Expand Down Expand Up @@ -120,6 +120,16 @@
containername = "\improper XM88 Heavy Rifle crate"
group = "Weapons"

/* Uncomment me if it's decided to let the m707 be purchasable through req
/datum/supply_packs/gun/m707
name = "M707 Anti-Materiel Rifle crate (M707 x1)"
contains = list()
cost = 120
containertype = /obj/structure/closet/crate/secure/vulture
containername = "M707 crate"
group = "Weapons"
*/

/datum/supply_packs/gun/merc
contains = list()
name = "black market firearms (x1)"
Expand Down
18 changes: 9 additions & 9 deletions code/game/gamemodes/cm_self_destruct.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
for(var/obj/structure/machinery/status_display/SD in machines)
if(is_mainship_level(SD.z))
SD.set_picture("evac")
for(var/obj/docking_port/mobile/escape_shuttle/shuttle in SSshuttle.mobile)
for(var/obj/docking_port/mobile/crashable/escape_shuttle/shuttle in SSshuttle.mobile)
shuttle.prepare_evac()
activate_lifeboats()
process_evacuation()
Expand All @@ -121,7 +121,7 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
if(is_mainship_level(SD.z))
SD.set_picture("redalert")

for(var/obj/docking_port/mobile/escape_shuttle/shuttle in SSshuttle.mobile)
for(var/obj/docking_port/mobile/crashable/escape_shuttle/shuttle in SSshuttle.mobile)
shuttle.cancel_evac()
return TRUE

Expand All @@ -132,17 +132,17 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
ai_announcement("ПРЕДУПРЕЖДЕНИЕ: Приказ об эвакуации подтвержден. Запуск спасательных шлюпок.", 'sound/AI/evacuation_confirmed.ogg')
addtimer(CALLBACK(src, PROC_REF(launch_lifeboats)), 10 SECONDS) // giving some time to board lifeboats

for(var/obj/docking_port/mobile/escape_shuttle/shuttle in SSshuttle.mobile)
for(var/obj/docking_port/mobile/crashable/escape_shuttle/shuttle in SSshuttle.mobile)
shuttle.evac_launch()
sleep(50)

sleep(300) //Sleep 30 more seconds to make sure everyone had a chance to leave.
var/lifesigns = 0
// lifesigns += P.passengers
var/obj/docking_port/mobile/lifeboat/lifeboat1 = SSshuttle.getShuttle(MOBILE_SHUTTLE_LIFEBOAT_PORT)
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat1 = SSshuttle.getShuttle(MOBILE_SHUTTLE_LIFEBOAT_PORT)
lifeboat1.check_for_survivors()
lifesigns += lifeboat1.survivors
var/obj/docking_port/mobile/lifeboat/lifeboat2 = SSshuttle.getShuttle(MOBILE_SHUTTLE_LIFEBOAT_STARBOARD)
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat2 = SSshuttle.getShuttle(MOBILE_SHUTTLE_LIFEBOAT_STARBOARD)
lifeboat2.check_for_survivors()
lifesigns += lifeboat2.survivors
ai_announcement("ВНИМАНИЕ: Процедуры эвакуации завершены. Внешних признаков жизни зафиксировано: [lifesigns ? lifesigns : "0"].", 'sound/AI/evacuation_complete.ogg')
Expand All @@ -166,23 +166,23 @@ var/global/datum/authority/branch/evacuation/EvacuationAuthority //This is initi
// LIFEBOATS CORNER
/datum/authority/branch/evacuation/proc/activate_lifeboats()
for(var/obj/docking_port/stationary/lifeboat_dock/lifeboat_dock in GLOB.lifeboat_almayer_docks)
var/obj/docking_port/mobile/lifeboat/lifeboat = lifeboat_dock.get_docked()
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = lifeboat_dock.get_docked()
if(lifeboat && lifeboat.available)
lifeboat.status = LIFEBOAT_ACTIVE
lifeboat_dock.open_dock()


/datum/authority/branch/evacuation/proc/deactivate_lifeboats()
for(var/obj/docking_port/stationary/lifeboat_dock/lifeboat_dock in GLOB.lifeboat_almayer_docks)
var/obj/docking_port/mobile/lifeboat/lifeboat = lifeboat_dock.get_docked()
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = lifeboat_dock.get_docked()
if(lifeboat && lifeboat.available)
lifeboat.status = LIFEBOAT_INACTIVE

/datum/authority/branch/evacuation/proc/launch_lifeboats()
for(var/obj/docking_port/stationary/lifeboat_dock/lifeboat_dock in GLOB.lifeboat_almayer_docks)
var/obj/docking_port/mobile/lifeboat/lifeboat = lifeboat_dock.get_docked()
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = lifeboat_dock.get_docked()
if(lifeboat && lifeboat.available)
lifeboat.send_to_infinite_transit()
lifeboat.evac_launch()

//=========================================================================================
//=========================================================================================
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/lifeboat/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override)
. = ..()
if(istype(port, /obj/docking_port/mobile/lifeboat))
var/obj/docking_port/mobile/lifeboat/lifeboat = port
if(istype(port, /obj/docking_port/mobile/crashable/lifeboat))
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = port
lifeboat.doors += src

/// External airlock that is part of the lifeboat dock
Expand Down
2 changes: 0 additions & 2 deletions code/game/machinery/vending/vendor_types/supplies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
list("FOOD AND BEVERAGE", -1, null, null),
list("MRE", 25, /obj/item/storage/box/MRE, VENDOR_ITEM_REGULAR),
list("Water Bottle", 25, /obj/item/reagent_container/food/drinks/cans/waterbottle, VENDOR_ITEM_REGULAR),
list("Aspen Beer", 10, /obj/item/storage/beer_pack, VENDOR_ITEM_REGULAR),//NOTE TO SELF, LOCK THIS ALCOHOL BEHIND SHIP ESCAPE
list("Wey-Yu Sake", 5, /obj/item/reagent_container/food/drinks/bottle/sake, VENDOR_ITEM_REGULAR),

list("UTILITY", -1, null, null),
list("M94 Marking Flare Pack", 5, /obj/item/storage/box/m94, VENDOR_ITEM_REGULAR),
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ cases. Override_icon_state should be a list.*/
/obj/item/proc/pickup(mob/user, silent)
SHOULD_CALL_PARENT(TRUE)
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
SEND_SIGNAL(user, COMSIG_MOB_PICKUP_ITEM, src)
setDir(SOUTH)//Always rotate it south. This resets it to default position, so you wouldn't be putting things on backwards
if(pickup_sound && !silent && src.loc?.z)
playsound(src, pickup_sound, pickupvol, pickup_vary)
Expand Down Expand Up @@ -635,6 +636,8 @@ cases. Override_icon_state should be a list.*/
return FALSE
if(flags_equip_slot & SLOT_SUIT_STORE)
return TRUE
if(flags_equip_slot & SLOT_BLOCK_SUIT_STORE)
return FALSE
if(!H.wear_suit && (WEAR_JACKET in mob_equip))
if(!disable_warning)
to_chat(H, SPAN_WARNING("You need a suit before you can attach this [name]."))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/device.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
icon = 'icons/obj/items/devices.dmi'
var/serial_number

/obj/item/device/Initialize()
/obj/item/device/Initialize(mapload, ...)
. = ..()
serial_number = "[rand(0,9)][pick(alphabet_uppercase)][rand(0,9)][rand(0,9)][rand(0,9)][rand(0,9)][pick(alphabet_uppercase)]"

Expand Down
Loading

0 comments on commit f5ff1aa

Please sign in to comment.