Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/hazelrat/Aurora.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hazelrat committed Sep 9, 2024
2 parents 4b46f2b + 029a7f4 commit 691f2ee
Show file tree
Hide file tree
Showing 82 changed files with 75,654 additions and 4,415 deletions.
14 changes: 13 additions & 1 deletion aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@
#include "code\__DEFINES\modular_guns.dm"
#include "code\__DEFINES\move_force.dm"
#include "code\__DEFINES\movement.dm"
#include "code\__DEFINES\movespeed_modification.dm"
#include "code\__DEFINES\multiz.dm"
#include "code\__DEFINES\obj.dm"
#include "code\__DEFINES\obj_flags.dm"
#include "code\__DEFINES\organs.dm"
#include "code\__DEFINES\origin_traits.dm"
#include "code\__DEFINES\outfit.dm"
Expand Down Expand Up @@ -258,6 +260,7 @@
#include "code\_globalvars\edible.dm"
#include "code\_globalvars\logging.dm"
#include "code\_globalvars\tgui.dm"
#include "code\_globalvars\lists\mobs.dm"
#include "code\_onclick\adjacent.dm"
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
Expand Down Expand Up @@ -1335,6 +1338,7 @@
#include "code\game\objects\items\weapons\storage\pill_bottle.dm"
#include "code\game\objects\items\weapons\storage\secure.dm"
#include "code\game\objects\items\weapons\storage\slime_core_bag.dm"
#include "code\game\objects\items\weapons\storage\stickersheets.dm"
#include "code\game\objects\items\weapons\storage\storage.dm"
#include "code\game\objects\items\weapons\storage\toolbox.dm"
#include "code\game\objects\items\weapons\storage\uplink_kits.dm"
Expand Down Expand Up @@ -2919,6 +2923,10 @@
#include "code\modules\modular_computers\NTNet\NTNRC\message.dm"
#include "code\modules\modular_computers\NTNet\NTNRC\ntnrc.dm"
#include "code\modules\modular_computers\NTNet\NTNRC\user.dm"
#include "code\modules\movespeed\_movespeed_modifier.dm"
#include "code\modules\movespeed\modifiers\mobs.dm"
#include "code\modules\movespeed\modifiers\reagents.dm"
#include "code\modules\movespeed\modifiers\spells.dm"
#include "code\modules\multiz\_stubs.dm"
#include "code\modules\multiz\basic.dm"
#include "code\modules\multiz\hoist.dm"
Expand Down Expand Up @@ -3767,12 +3775,12 @@
#include "code\ZAS\Zone.dm"
#include "code\ze_genesis_call\genesis_call.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "interface\fonts\fonts_datum.dm"
#include "interface\fonts\grand_9k.dm"
#include "interface\fonts\pixellari.dm"
#include "interface\fonts\spess_font.dm"
#include "interface\fonts\tiny_unicode.dm"
#include "interface\skin.dmf"
#include "maps\_common\areas\ai.dm"
#include "maps\_common\areas\areas.dm"
#include "maps\_common\areas\asteroid_areas.dm"
Expand Down Expand Up @@ -3960,6 +3968,10 @@
#include "maps\away\ships\konyang\water_barge\water_barge.dm"
#include "maps\away\ships\konyang\water_barge\water_barge_areas.dm"
#include "maps\away\ships\konyang\water_barge\water_barge_ghostroles.dm"
#include "maps\away\ships\lone_spacer\lone_spacer.dm"
#include "maps\away\ships\lone_spacer\lone_spacer_areas.dm"
#include "maps\away\ships\lone_spacer\lone_spacer_ghostroles.dm"
#include "maps\away\ships\lone_spacer\lone_spacer_landmarks.dm"
#include "maps\away\ships\nka\nka_merchant\nka_merchant.dm"
#include "maps\away\ships\nka\nka_merchant\nka_merchant_areas.dm"
#include "maps\away\ships\nka\nka_merchant\nka_merchant_ghostroles.dm"
Expand Down
10 changes: 10 additions & 0 deletions code/__DEFINES/_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define PASSTRACE (1<<16) //Used by turrets in the check_trajectory proc to target mobs hiding behind certain things (such as closets)
#define PASSRAILING (1<<17)

//Movement Types
#define GROUND (1<<0)
#define FLYING (1<<1)
#define VENTCRAWLING (1<<2)
#define FLOATING (1<<3)
/// When moving, will Cross() everything, but won't stop or Bump() anything.
#define PHASING (1<<4)
/// The mob is walking on the ceiling. Or is generally just, upside down.
#define UPSIDE_DOWN (1<<5)

//TURF FLAGS
/// If a turf is an usused reservation turf awaiting assignment
#define UNUSED_RESERVATION_TURF BITFLAG(1)
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -810,3 +810,8 @@
id = ACCESS_TRAMP_FREIGHTER
desc = "Independent Freighter Access"

#define ACCESS_LONE_SPACER 243
/datum/access/lone_spacer_access
id = ACCESS_LONE_SPACER
desc = "Independent Skiff Access"

1 change: 0 additions & 1 deletion code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#define CE_NOPULSE "heartstop" // Stops heartbeat
#define CE_SEDATE "sedation"
#define CE_SLOWDOWN "goslow"
#define CE_SPEEDBOOST "gofast" // Hyperzine
#define CE_STABLE "stable" // Epinephrine
#define CE_PACIFIED "pacified"
#define CE_PAINKILLER "painkiller"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
#define MOVE_ARG_NEW_LOC 1
/// The arugment of move_args which dictates our movement direction
#define MOVE_ARG_DIRECTION 2

///From base of mob/update_movespeed():area
#define COMSIG_MOB_MOVESPEED_UPDATED "mob_update_movespeed"
15 changes: 15 additions & 0 deletions code/__DEFINES/movespeed_modification.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//flags
#define IGNORE_NOSLOW (1 << 0)

//conflict types

#define MOVE_CONFLICT_JETPACK "JETPACK"

//ids
#define MOVESPEED_ID_SANITY "sanity_component"
#define MOVESPEED_ID_STIMULANTS "movespeed_stimulants"

#define MOVESPEED_ID_MOB_GRAB_STATE "mob_grab_state"
#define MOVESPEED_ID_MOB_WALK_RUN "mob_walk_run"

#define MOVESPEED_ID_MIDAS_BLIGHT "midas_blight_debuff"
4 changes: 4 additions & 0 deletions code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// Flags for specifically what kind of items to get in get_equipped_items
#define INCLUDE_POCKETS (1<<0)
// #define INCLUDE_ACCESSORIES (1<<1) //We use a different system for this
#define INCLUDE_HELD (1<<2)
1 change: 1 addition & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
9 changes: 8 additions & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
/// We do it like this to prevent people trying to mutate them and to save memory on holding the lists ourselves
var/spatial_grid_key

/**
* In case you have multiple types, you automatically use the most useful one.
* IE: Skating on ice, flippers on water, flying over chasm/space, etc.
* I recommend you use the movetype_handler system and not modify this directly, especially for living mobs. -- this isn't in our codebase yet, however
*/
var/movement_type = GROUND

/// Either [EMISSIVE_BLOCK_NONE], [EMISSIVE_BLOCK_GENERIC], or [EMISSIVE_BLOCK_UNIQUE]
var/blocks_emissive = EMISSIVE_BLOCK_NONE
///Internal holder for emissive blocker object, DO NOT USE DIRECTLY. Use blocks_emissive
Expand Down Expand Up @@ -274,7 +281,7 @@

//They are moving! Wouldn't it be cool if we calculated their momentum and added it to the throw?
if (thrower && thrower.last_move && thrower.client && thrower.client.move_delay >= world.time + world.tick_lag*2)
var/user_momentum = world.tick_lag //Used to be thrower.cached_multiplicative_slowdown but we don't have this
var/user_momentum = thrower.cached_multiplicative_slowdown
if (!user_momentum) //no movement_delay, this means they move once per byond tick, lets calculate from that instead.
user_momentum = world.tick_lag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
H.dna = daddy.dna.Clone()
H.sync_organ_dna()
H.UpdateAppearance()
for(var/obj/item/entry in daddy.get_equipped_items(TRUE))
for(var/obj/item/entry in daddy.get_equipped_items(INCLUDE_POCKETS|INCLUDE_HELD))
daddy.remove_from_mob(entry) //steals instead of copies so we don't end up with duplicates
H.equip_to_appropriate_slot(entry)
else
Expand Down
5 changes: 2 additions & 3 deletions code/game/gamemodes/technomancer/spells/modifier/haste.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.move_delay_mod += -0.8
H.add_movespeed_modifier(/datum/movespeed_modifier/spell/technomancer/haste)
H.sprint_cost_factor += -0.2

/datum/modifier/technomancer/haste/deactivate()
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.move_delay_mod += 0.8
H.remove_movespeed_modifier(/datum/movespeed_modifier/spell/technomancer/haste)
H.sprint_cost_factor += 0.2

6 changes: 5 additions & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
* This is called after the _new_ location (`loc`) is set on the object, so if it's eg. put in a container,
* the loc inside here would point to the container, not the mob that had it in hand
*
* * user - The `/mob` that dropped the object
* * user - The `/mob` that dropped the object (was removed from, not necessarily who clicked the button)
*/
/obj/item/proc/dropped(mob/user)
SHOULD_CALL_PARENT(TRUE)
Expand All @@ -508,6 +508,8 @@
if(user && (z_flags & ZMM_MANGLE_PLANES))
addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE)

user?.update_equipment_speed_mods()

/obj/item/proc/remove_item_verbs(mob/user)
if(ismech(user)) //very snowflake, but necessary due to how mechs work
return
Expand Down Expand Up @@ -616,6 +618,8 @@
if(user && (z_flags & ZMM_MANGLE_PLANES))
addtimer(CALLBACK(user, /mob/proc/check_emissive_equipment), 0, TIMER_UNIQUE)

user.update_equipment_speed_mods()

/obj/item/proc/check_equipped(var/mob/user, var/slot, var/assisted_equip = FALSE)
return TRUE

Expand Down
58 changes: 39 additions & 19 deletions code/game/objects/items/devices/personal_shield.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,65 @@
. = ..()
if(is_adjacent)
. += SPAN_NOTICE("\The [src] has [cell.charge] charge remaining.")
. += SPAN_NOTICE("Shield upkeep costs [upkeep_cost] charge, and blocking a shot costs [SPAN_NOTICE(charge_per_shot)] charge.")
. += SPAN_NOTICE("Shield upkeep costs [upkeep_cost] charge, and blocking a shot costs [SPAN_NOTICE("[charge_per_shot]")] charge.")

/obj/item/device/personal_shield/Initialize()
. = ..()
cell = new(src)
cell.charge = cell.maxcharge //1000 charge
START_PROCESSING(SSprocessing, src)

/obj/item/device/personal_shield/Destroy()
dissipate()
STOP_PROCESSING(SSprocessing, src)
QDEL_NULL(cell)

return ..()

/obj/item/device/personal_shield/get_cell()
return cell

/obj/item/device/personal_shield/process()
/obj/item/device/personal_shield/process(seconds_per_tick)
if(shield)
cell.use(upkeep_cost)
if(!ismob(src.loc))
deactivate()
return
cell.use(upkeep_cost*seconds_per_tick)

/obj/item/device/personal_shield/attack_self(mob/living/user)
if(cell.charge && !shield)
activate(user)
else
deactivate(user)

/**
* Activates the shield
*
* * user - The user that activated the shield
*/
/obj/item/device/personal_shield/proc/activate(mob/living/user)
if(cell.charge && !shield)
shield = new /obj/aura/personal_shield/device(user)
shield.added_to(user)
shield.set_shield(src)
user.update_inv_belt()
else
dissipate()
user.update_inv_belt()

START_PROCESSING(SSprocessing, src)

update_icon()

/obj/item/device/personal_shield/Move()
dissipate()
return ..()
/**
* Deactivates the shield
*
* * user - The user that deactivated the shield, if any
*/
/obj/item/device/personal_shield/proc/deactivate(mob/living/user)
if(shield)
dissipate()
user?.update_inv_belt()

/obj/item/device/personal_shield/forceMove()
dissipate()
return ..()
STOP_PROCESSING(SSprocessing, src)

update_icon()

/obj/item/device/personal_shield/proc/take_charge()
cell.use(charge_per_shot)
Expand All @@ -67,12 +93,6 @@
icon_state = "[initial(icon_state)]"
item_state = "[initial(item_state)]"

/obj/item/device/personal_shield/Destroy()
dissipate()
STOP_PROCESSING(SSprocessing, src)
QDEL_NULL(cell)
return ..()

/obj/item/device/personal_shield/proc/dissipate()
if(shield?.user)
to_chat(shield.user, FONT_LARGE(SPAN_WARNING("\The [src] fades around you, dissipating.")))
Expand Down
Loading

0 comments on commit 691f2ee

Please sign in to comment.