Skip to content

Commit

Permalink
Merge branch 'master' into TRIUMPH-SEC-EQUIPMENT,-ARMORY,-AND-FIGHTER…
Browse files Browse the repository at this point in the history
…-REVAMP
  • Loading branch information
TheLordME committed Jul 18, 2023
2 parents 1b72410 + a3b68fd commit 0023250
Show file tree
Hide file tree
Showing 72 changed files with 879 additions and 471 deletions.
1 change: 1 addition & 0 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@
#include "code\datums\components\gps_signal.dm"
#include "code\datums\components\horror_aura.dm"
#include "code\datums\components\jousting.dm"
#include "code\datums\components\object_transform.dm"
#include "code\datums\components\orbiter.dm"
#include "code\datums\components\simple_access.dm"
#include "code\datums\components\slaved_atom_to_loc.dm"
Expand Down
5 changes: 4 additions & 1 deletion code/__DEFINES/_flags/atom_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ DEFINE_BITFIELD(movement_type, list(
/// Don't let us buckle people to ourselves.
#define BUCKLING_NO_USER_BUCKLE_OTHER_TO_SELF (1<<6)
/// Lets the user avoid step checks.
#define BUCKLING_GROUND_HOIST (1<<7)
#define BUCKLING_GROUND_HOIST (1<<7)
/// projects our depth to the buckled object. you usually don't want this.
#define BUCKLING_PROJECTS_DEPTH (1<<8)

DEFINE_BITFIELD(buckle_flags, list(
BITFIELD(BUCKLING_REQUIRES_RESTRAINTS),
Expand All @@ -167,4 +169,5 @@ DEFINE_BITFIELD(buckle_flags, list(
BITFIELD(BUCKLING_NO_DEFAULT_RESIST),
BITFIELD(BUCKLING_NO_USER_BUCKLE_OTHER_TO_SELF),
BITFIELD(BUCKLING_GROUND_HOIST),
BITFIELD(BUCKLING_PROJECTS_DEPTH),
))
3 changes: 3 additions & 0 deletions code/__DEFINES/_flags/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
#define ON_BLUEPRINTS (1<<2)
/// Prevent people from clicking under us
#define OBJ_PREVENT_CLICK_UNDER (1<<3)
/// We ignore depth system when blocking mobs
#define OBJ_IGNORE_MOB_DEPTH (1<<4)

DEFINE_BITFIELD(obj_flags, list(
BITFIELD(EMAGGED),
BITFIELD(CAN_BE_HIT),
BITFIELD(ON_BLUEPRINTS),
BITFIELD(OBJ_PREVENT_CLICK_UNDER),
BITFIELD(OBJ_IGNORE_MOB_DEPTH),
))
1 change: 1 addition & 0 deletions code/__DEFINES/ability.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
#define ABILITY_CHECK_STANDING (1<<1)
#define ABILITY_CHECK_FREE_HAND (1<<2)
#define ABILITY_CHECK_STUNNED (1<<3)
#define ABILITY_CHECK_RESTING (1<<4)
2 changes: 2 additions & 0 deletions code/__DEFINES/procs/do_after.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@
#define INTERACTING_FOR_ALT_CLICK "alt_click"
/// Attempting to resist out of something
#define INTERACTING_FOR_RESIST "resist"
/// Climbing a structure
#define INTERACTING_FOR_CLIMB "climb"
1 change: 1 addition & 0 deletions code/controllers/subsystem/mapping/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,4 @@
log_and_message_admins("[key_name(src)] is changing the next map from [was.name] ([was.id]) to [changing_to.name] ([changing_to.id])")

SSmapping.next_station = changing_to
SSmapping.write_next_map(changing_to)
3 changes: 3 additions & 0 deletions code/controllers/subsystem/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ SUBSYSTEM_DEF(supply)

// Will attempt to purchase the specified order, returning TRUE on success, FALSE on failure
/datum/controller/subsystem/supply/proc/approve_order(var/datum/supply_order/O, var/mob/user)
// do not double purchase!!
if(O.status != SUP_ORDER_REQUESTED)
return FALSE
// Not enough points to purchase the crate
if(SSsupply.points <= O.object.cost)
return FALSE
Expand Down
6 changes: 5 additions & 1 deletion code/datums/ability.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
to_chat(user, SPAN_WARNING("[src] is still on cooldown! ([round((world.time - last_used) * 0.1, 0.1)] / [round(cooldown * 0.1, 0.1)])"))
return FALSE
if(!available_check())
to_chat(user, SPAN_WARNING("You can't do that right now!"))
to_chat(user, SPAN_WARNING(unavailable_reason()))
return FALSE
return TRUE

Expand Down Expand Up @@ -259,6 +259,8 @@
return FALSE
if((ability_check_flags & ABILITY_CHECK_FREE_HAND) && !(owner.has_free_hand()))
return FALSE
if((ability_check_flags & ABILITY_CHECK_RESTING) && !IS_PRONE(owner))
return FALSE
if(!CHECK_MOBILITY(owner, mobility_check_flags))
return FALSE
return TRUE
Expand All @@ -277,6 +279,8 @@
return "You cannot do that while on the ground."
if((ability_check_flags & ABILITY_CHECK_FREE_HAND) && !(owner.has_free_hand()))
return "You cannot do that without a free hand."
if((ability_check_flags & ABILITY_CHECK_RESTING) && !owner.lying)
return "You must be lying down to do that."
if(!CHECK_MOBILITY(owner, mobility_check_flags))
return "You cannot do that while incapacitated."

Expand Down
33 changes: 33 additions & 0 deletions code/datums/components/object_transform.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/datum/component/object_transform
var/obj/transformed_object
var/to_object_text
var/to_mob_text

/datum/component/object_transform/Initialize(_transformed_object, _to_object_text, _to_mob_text)
transformed_object = _transformed_object
to_object_text = _to_object_text
to_mob_text = _to_mob_text
put_in_object(TRUE)

/datum/component/object_transform/proc/swap_object(new_object)
. = transformed_object
var/mob/owner = parent
if(parent in transformed_object.contents)
owner.forceMove(transformed_object.loc)
transformed_object = new_object
put_in_object()

/datum/component/object_transform/proc/put_in_object(silent = FALSE)
var/mob/owner = parent
transformed_object.forceMove(owner.loc)
owner.forceMove(transformed_object)
if(!silent && length(to_object_text))
owner.visible_message("<b>[owner]</b> [to_object_text]")

/datum/component/object_transform/proc/put_in_mob(silent = FALSE)
var/mob/owner = parent
owner.forceMove(transformed_object.loc)
transformed_object.forceMove(parent)
if(!silent && length(to_mob_text))
owner.visible_message("<b>[owner]</b> [to_mob_text]")

3 changes: 3 additions & 0 deletions code/game/machinery/computer/atmos_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
icon_keyboard = "pcu_key"
density = FALSE
light_color = "#00cc00"
depth_level = 0
depth_projected = FALSE
climb_allowed = FALSE

/obj/machinery/computer/atmoscontrol/attack_ai(mob/user)
ui_interact(user)
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/computer/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use_power = USE_POWER_IDLE
idle_power_usage = 300
active_power_usage = 300
depth_level = 8
depth_projected = TRUE
climb_allowed = TRUE
//blocks_emissive = FALSE
var/processing = FALSE

Expand Down
4 changes: 3 additions & 1 deletion code/game/machinery/computer/guestpass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@
layer = ABOVE_TURF_LAYER
icon_keyboard = null
icon_screen = "pass"
density = 0
depth_projected = FALSE
climb_allowed = FALSE
density = FALSE
circuit = /obj/item/circuitboard/guestpass

var/obj/item/card/id/giver
Expand Down
4 changes: 3 additions & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,9 @@
light_color = "#5284e7"
circuit = /obj/item/circuitboard/med_data/pcu
density = FALSE

depth_level = 0
depth_projected = FALSE
climb_allowed = FALSE

#undef FIELD
#undef MED_FIELD
3 changes: 3 additions & 0 deletions code/game/machinery/computer/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
req_one_access = list(ACCESS_COMMAND_BRIDGE)
circuit = /obj/item/circuitboard/skills/pcu
density = FALSE
depth_level = 0
depth_projected = FALSE
climb_allowed = FALSE
var/obj/item/card/id/scan = null
var/authenticated = null
var/rank = null
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/computer/timeclock_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
density = FALSE
circuit = /obj/item/circuitboard/timeclock
clicksound = null
climb_allowed = FALSE
depth_projected = FALSE
var/channel = "Common" //Radio channel to announce on

var/obj/item/card/id/card // Inserted Id card
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
icon_state = "cellconsole"
circuit = /obj/item/circuitboard/cryopodcontrol
density = FALSE
climb_allowed = FALSE
depth_projected = FALSE
interaction_flags_machine = INTERACT_MACHINE_OFFLINE | INTERACT_MACHINE_ALLOW_SILICON
var/mode = null

Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/holopad.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE)
active_power_usage = 100
light_range = 1.5
light_power = 0
depth_projected = FALSE
climb_allowed = FALSE

//? balancing
/// base power used to project at all
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/lathes/lathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
circuit = /obj/item/circuitboard/machine/lathe
default_deconstruct = 0 SECONDS
default_panel = 0 SECONDS
depth_projected = TRUE
depth_level = 8
climb_allowed = TRUE

/// icon state when printing, if any
var/active_icon_state
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 @@ -4,6 +4,9 @@
w_class = ITEMSIZE_NORMAL
// todo: better way, for now, block all rad contamination to interior
rad_flags = RAD_BLOCK_CONTENTS
obj_flags = OBJ_IGNORE_MOB_DEPTH
depth_level = 0
climb_allowed = FALSE

//? Flags
/// Item flags.
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/items/poi_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
icon_state = "poireactor"
icon_opened = "poireactor_open"
icon_closed = "poireactor"
climbable = 0

starts_with = list(
/obj/item/fuel_assembly/deuterium = 6)
Expand Down
Loading

0 comments on commit 0023250

Please sign in to comment.