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
AmoryBlaine committed Mar 31, 2024
2 parents f9e2944 + 897af44 commit 8ff1f48
Show file tree
Hide file tree
Showing 39 changed files with 259 additions and 148 deletions.
5 changes: 5 additions & 0 deletions code/__DEFINES/dropships.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
#define DROPSHIP_MIN_AUTO_DELAY 10 SECONDS
#define DROPSHIP_AUTO_RETRY_COOLDOWN 20 SECONDS
#define DROPSHIP_MEDEVAC_COOLDOWN 20 SECONDS

//Hatches states
#define SHUTTLE_DOOR_BROKEN -1
#define SHUTTLE_DOOR_UNLOCKED 0
#define SHUTTLE_DOOR_LOCKED 1
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define VEHICLE_PENALTY 25
#define WINDOW_FRAME_PENALTY 25
#define BARRICADE_PENALTY 50
#define WALL_PENALTY 50
#define WALL_PENALTY 100

/*
PROBABILITY CALCULATIONS ARE HERE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,19 @@
qdel(src)
return FALSE

if(locate(/obj/structure/mineral_door/resin) in location)
qdel(src)
return FALSE

var/area/current_area = get_area(location)
if(!current_area.is_resin_allowed)
for(var/client/game_master in GLOB.game_masters)
to_chat(game_master, SPAN_XENOBOLDNOTICE("This area doesn't allow xenos to build here"))
to_chat(game_master, SPAN_XENOBOLDNOTICE("[current_area] doesn't allow xenos to build here"))

qdel(src)
return FALSE

if(distance > 10)
if(locate(/obj/structure/mineral_door/resin) in location)
qdel(src)
return FALSE

if(checked_xeno.current_target)
if(distance > 10)
return FALSE

if(!locate(/datum/action/xeno_action/activable/secrete_resin) in checked_xeno.actions)
Expand All @@ -55,7 +52,7 @@
if(checked_xeno.get_plasma_percentage() < PLASMA_RETREAT_PERCENTAGE)
var/turf/xeno_loc = get_turf(checked_xeno)
if(xeno_loc.weeds)
checked_xeno.set_resting(TRUE, FALSE, TRUE)
checked_xeno.set_resting(TRUE, FALSE)

return FALSE

Expand All @@ -75,19 +72,21 @@
var/turf/parent_turf = get_turf(parent)
var/distance = get_dist(processing_xeno, parent)

var/list/turfs_around = xeno_loc.AdjacentTurfs()
if(turfs_around && distance < 1) // We are gonna be stuck after building at our loc, let's step away
return processing_xeno.move_to_next_turf(pick(turfs_around))

var/is_diagonal = (get_dir(processing_xeno, parent_turf) in diagonals)
if(is_diagonal || distance > 1)
/// Is xeno adjacent to parent_turf?
if(distance > 1)
return processing_xeno.move_to_next_turf(parent_turf)

/// Xeno will be stuck after building at its loc, if so - we command droney to step away
if(distance < 1)
return processing_xeno.move_to_next_turf(pick(GLOB.cardinals))

/// If there is something that might block our resin - slash it
for(var/obj/structure/blocker in parent_turf.contents)
if(!blocker.unslashable && blocker.density || istype(blocker, /obj/structure/bed))
if(!blocker.unslashable && (blocker.density || istype(blocker, /obj/structure/bed)))
INVOKE_ASYNC(processing_xeno, TYPE_PROC_REF(/mob, do_click), blocker, "", list())
return TRUE

/// If no ground weeds present - command our xeno to plant one
if(!parent_turf.weeds)
var/datum/action/xeno_action/onclick/plant_weeds/weeds_action = locate() in processing_xeno.actions
INVOKE_ASYNC(weeds_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/plant_weeds, use_ability_wrapper))
Expand All @@ -96,24 +95,30 @@
var/list/resin_types = processing_xeno.resin_build_order
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_turf/wall) in resin_types

var/wall_nearby = FALSE
var/blocked_turfs = 0
for(var/turf/blocked_turf in orange(1, parent_turf) - parent_turf.AdjacentTurfs())
blocked_turfs++
/// Let's decide whenever we are building a door or naw
var/build_door = FALSE
for(var/turf/blocked_turf in RANGE_TURFS(1, parent_turf) - parent_turf)
var/direction = get_dir(parent_turf, blocked_turf)
if(direction in diagonals)
continue

if(get_dir(blocked_turf, parent_turf) in diagonals)
if(!blocked_turf.density)
continue

if(blocked_turf.density)
wall_nearby = TRUE
/// Checking for any opposite walls on angles 135, 180, 225 respectfully
for(var/opposite_dir in reverse_nearby_direction(direction))
var/turf/opposite_turf = get_step(parent_turf, opposite_dir)
if(opposite_turf.density)
build_door = TRUE
break

var/obj/effect/alien/weeds/turf_weeds = blocked_turf.weeds
if(turf_weeds && turf_weeds.secreting)
wall_nearby = TRUE // Something is being constructed nearby, let's bet this is a new resin wall
var/obj/effect/alien/weeds/opposite_weeds = opposite_turf.weeds
if(opposite_weeds && opposite_weeds.secreting)
/// Something is being constructed nearby, let's bet this is a new resin wall
build_door = TRUE

if(wall_nearby)
if(prob(XENO_DOOR_BUILDING_CHANCE) || (wall_nearby && blocked_turfs > 1))
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types
if(build_door || prob(XENO_DOOR_BUILDING_CHANCE))
processing_xeno.selected_resin = locate(/datum/resin_construction/resin_obj/door) in resin_types

var/datum/action/xeno_action/activable/secrete_resin/build_action = locate() in processing_xeno.actions
INVOKE_ASYNC(build_action, TYPE_PROC_REF(/datum/action/xeno_action/activable/secrete_resin, use_ability_wrapper), parent_turf)
Expand Down
14 changes: 0 additions & 14 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ United States Colonial Marines
name = "Private"
//same as default

/datum/skills/pfc/crafty
name = "Crafty Private"
skills = list(
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_TRAINED,
)

/datum/skills/combat_medic
name = "Combat Medic"
skills = list(
Expand All @@ -23,13 +16,6 @@ United States Colonial Marines
SKILL_JTAC = SKILL_JTAC_BEGINNER,
)

/datum/skills/combat_medic/crafty
name = "Crafty Combat Medic"
skills = list(
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_TRAINED,
SKILL_ENGINEER = SKILL_ENGINEER_TRAINED,
)

/datum/skills/combat_engineer
name = "Combat Engineer"
skills = list(
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/door_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
if(is_mainship_level(z)) // on the almayer
return

shuttle.control_doors("lock", "all", force=FALSE)
shuttle.control_doors("force-lock", "all", force=FALSE)

/obj/structure/machinery/door_control/proc/handle_door()
for(var/obj/structure/machinery/door/airlock/D in range(range))
Expand Down
12 changes: 6 additions & 6 deletions code/game/machinery/doors/airlock_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)


/obj/structure/machinery/door/airlock/open(surpress_send)
/obj/structure/machinery/door/airlock/open(forced)
. = ..()
if(!surpress_send) send_status()
if(!forced)
send_status()


/obj/structure/machinery/door/airlock/close(surpress_send)
/obj/structure/machinery/door/airlock/close(forced)
. = ..()
if(!surpress_send) send_status()

if(!forced)
send_status()

/obj/structure/machinery/door/airlock/proc/set_frequency(new_frequency)
SSradio.remove_object(src, frequency)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
flick("door_deny", src)
return

/obj/structure/machinery/door/proc/open(forced=0)
/obj/structure/machinery/door/proc/open(forced)
if(!density)
return TRUE
if(operating || !loc)
Expand Down
78 changes: 73 additions & 5 deletions code/game/machinery/doors/multi_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,42 @@
no_panel = 1
not_weldable = 1
var/queen_pryable = TRUE
var/obj/docking_port/mobile/marine_dropship/linked_dropship

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/ex_act(severity)
return

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/attackby(obj/item/item, mob/user)
if(HAS_TRAIT(item, TRAIT_TOOL_MULTITOOL))
var/direction
switch(id)
if("starboard_door")
direction = "starboard"
if("port_door")
direction = "port"
if("aft_door")
direction = "aft"
if(!linked_dropship || !linked_dropship.door_control.door_controllers[direction])
return ..()
var/datum/door_controller/single/control = linked_dropship.door_control.door_controllers[direction]
if (control.status != SHUTTLE_DOOR_BROKEN)
return ..()
if(!skillcheck(user, SKILL_ENGINEER, SKILL_ENGINEER_ENGI))
to_chat(user, SPAN_WARNING("You don't seem to understand how to restore a remote connection to [src]."))
return
if(user.action_busy)
return

to_chat(user, SPAN_WARNING("You begin to restore the remote connection to [src]."))
if(!do_after(user, 5 SECONDS, INTERRUPT_ALL, BUSY_ICON_BUILD))
to_chat(user, SPAN_WARNING("You fail to restore a remote connection to [src]."))
return
unlock(TRUE)
close(FALSE)
control.status = SHUTTLE_DOOR_UNLOCKED
to_chat(user, SPAN_WARNING("You successfully restored the remote connection to [src]."))
return
..()

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/unlock()
if(is_reserved_level(z))
Expand All @@ -258,13 +290,32 @@
if(!queen_pryable)
return ..()

if(!locked)
return ..()

to_chat(xeno, SPAN_NOTICE("You try and force the doors open"))
if(xeno.action_busy)
return

var/direction
switch(id)
if("starboard_door")
direction = "starboard"
if("port_door")
direction = "port"
if("aft_door")
direction = "aft"
var/datum/door_controller/single/control
if(linked_dropship && linked_dropship.door_control.door_controllers[direction])
control = linked_dropship.door_control.door_controllers[direction]

if(control && control.status == SHUTTLE_DOOR_BROKEN)
to_chat(xeno, SPAN_NOTICE("The door is already disabled."))
return

to_chat(xeno, SPAN_WARNING("You try and force the doors open!"))
if(do_after(xeno, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE))
if(control)
control.status = SHUTTLE_DOOR_BROKEN
unlock(TRUE)
open(1)
open(TRUE)
lock(TRUE)

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/ds1
Expand All @@ -275,6 +326,23 @@
name = "\improper Normandy cargo door"
icon = 'icons/obj/structures/doors/dropship2_cargo.dmi'

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside
width = 2

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds1
name = "\improper Alamo crew hatch"
icon = 'icons/obj/structures/doors/dropship1_side2.dmi'

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds1/midway
name = "\improper Midway crew hatch"

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds2
name = "\improper Normandy crew hatch"
icon = 'icons/obj/structures/doors/dropship2_side2.dmi'

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/dropshipside/ds2/cyclone
name = "\improper Cyclone crew hatch"

/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/upp
name = "\improper Akademia Nauk cargo door"
icon = 'icons/obj/structures/doors/dropshipupp_cargo.dmi'
Expand Down Expand Up @@ -329,7 +397,7 @@
continue
INVOKE_ASYNC(atom_movable, TYPE_PROC_REF(/atom/movable, throw_atom), projected, 1, SPEED_FAST, null, FALSE)

/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)
/obj/structure/machinery/door/airlock/multi_tile/almayer/dropshiprear/lifeboat/connect_to_shuttle(mapload, obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
. = ..()
if(istype(port, /obj/docking_port/mobile/crashable/lifeboat))
var/obj/docking_port/mobile/crashable/lifeboat/lifeboat = port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@

list("BACKPACK", -1, null, null, null),
list("Lightweight IMP Backpack", round(scale * 15), /obj/item/storage/backpack/marine, VENDOR_ITEM_REGULAR),
list("USCM Technician Backpack", round(scale * 15), /obj/item/storage/backpack/marine/tech, VENDOR_ITEM_REGULAR),
list("USCM Satchel", round(scale * 15), /obj/item/storage/backpack/marine/satchel, VENDOR_ITEM_REGULAR),
list("Technician Chestrig", round(scale * 15), /obj/item/storage/backpack/marine/satchel/tech, VENDOR_ITEM_REGULAR),
list("Shotgun Scabbard", round(scale * 5), /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR),

list("RESTRICTED BACKPACKS", -1, null, null),
Expand Down
6 changes: 1 addition & 5 deletions code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
rank = JOB_SQUAD_MARINE
paygrade = "ME2"
role_comm_title = "A-RFN"
skills = /datum/skills/pfc/crafty
skills = /datum/skills/pfc
faction = FACTION_MARSHAL
faction_group = list(FACTION_MARSHAL, FACTION_MARINE)

Expand Down Expand Up @@ -590,10 +590,6 @@
new_human.equip_to_slot_or_del(new /obj/item/reagent_container/hypospray/autoinjector/emergency, WEAR_IN_BELT)
new_human.equip_to_slot_or_del(new /obj/item/reagent_container/hypospray/autoinjector/emergency, WEAR_IN_BELT)
new_human.equip_to_slot_or_del(new /obj/item/bodybag/cryobag, WEAR_IN_BELT)
if(new_human.disabilities & NEARSIGHTED)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/prescription, WEAR_EYES)
else
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health, WEAR_EYES)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife, WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/storage/box/MRE, WEAR_IN_BACK)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/dust_raider.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
rank = JOB_SQUAD_MARINE
paygrade = "ME2"
role_comm_title = "RFN"
skills = /datum/skills/pfc/crafty
skills = /datum/skills/pfc

/datum/equipment_preset/dust_raider/private/load_gear(mob/living/carbon/human/new_human)
//TODO: add backpacks and satchels
Expand Down
4 changes: 2 additions & 2 deletions code/modules/gear_presets/fun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
flags = EQUIPMENT_PRESET_EXTRA
faction = FACTION_PIRATE

skills = /datum/skills/pfc/crafty
skills = /datum/skills/pfc

/datum/equipment_preset/fun/pirate/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(new_human), WEAR_BACK)
Expand Down Expand Up @@ -417,7 +417,7 @@

uses_special_name = TRUE

skills = /datum/skills/pfc/crafty // about equivalent to a marine
skills = /datum/skills/pfc // about equivalent to a marine

assignment = "Monkey"
rank = "Monkey"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@
rank = JOB_SQUAD_MARINE
paygrade = "ME2"
role_comm_title = "RFN"
skills = /datum/skills/pfc/crafty
skills = /datum/skills/pfc

minimap_icon = "private"

Expand Down
2 changes: 1 addition & 1 deletion code/modules/shuttle/computers/escape_pod_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
.["docking_status"] = STATE_LAUNCHED
var/obj/structure/machinery/door/door = shuttle.door_handler.doors[1]
.["door_state"] = door.density
.["door_lock"] = shuttle.door_handler.is_locked
.["door_lock"] = shuttle.door_handler.status == SHUTTLE_DOOR_LOCKED
.["can_delay"] = TRUE//launch_status[2]
.["launch_without_evac"] = launch_without_evac

Expand Down
Loading

0 comments on commit 8ff1f48

Please sign in to comment.