Skip to content

Commit

Permalink
Merge branch 'master' into verbs_subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyGhoster committed Jan 11, 2025
2 parents 250ef3e + a2e61c5 commit 3eb9f0b
Show file tree
Hide file tree
Showing 161 changed files with 1,750 additions and 1,331 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/byond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,23 @@ jobs:
- name: Set ENV variables
run: bash dependencies.sh

- name: Download OpenDream Compiler
#Setup the .NET dependency to what is needed by OpenDream
- name: Setup DotNet Dependency
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.100

#Prepare the precompiled OpenDream compiler
- name: Prepare OpenDream Compiler
run: |
bash tools/ci/install_od.sh
cd $HOME
wget -v https://github.com/OpenDreamProject/OpenDream/releases/download/latest/DMCompiler_linux-x64.tar.gz
tar -xf DMCompiler_linux-x64.tar.gz
#Run OpenDream on the DME
- name: Run OpenDream
run: |
tools/ci/run_od.sh
dotnet $HOME/DMCompiler_linux-x64/DMCompiler.dll --suppress-unimplemented aurorastation.dme
###########################################
############### TGUI LINTING ##############
Expand Down
11 changes: 8 additions & 3 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@
#include "code\_onclick\adjacent.dm"
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
#include "code\_onclick\click_ctrl.dm"
#include "code\_onclick\click_handling.dm"
#include "code\_onclick\cyborg.dm"
#include "code\_onclick\drag_drop.dm"
#include "code\_onclick\item_attack.dm"
Expand Down Expand Up @@ -1862,7 +1864,9 @@
#include "code\modules\client\preference_setup\loadout\items\gloves.dm"
#include "code\modules\client\preference_setup\loadout\items\head.dm"
#include "code\modules\client\preference_setup\loadout\items\mask.dm"
#include "code\modules\client\preference_setup\loadout\items\pants.dm"
#include "code\modules\client\preference_setup\loadout\items\religion.dm"
#include "code\modules\client\preference_setup\loadout\items\shirts.dm"
#include "code\modules\client\preference_setup\loadout\items\shoes.dm"
#include "code\modules\client\preference_setup\loadout\items\smoking.dm"
#include "code\modules\client\preference_setup\loadout\items\suit.dm"
Expand Down Expand Up @@ -1949,6 +1953,9 @@
#include "code\modules\clothing\masks\xeno\skrell.dm"
#include "code\modules\clothing\masks\xeno\tajara.dm"
#include "code\modules\clothing\masks\xeno\unathi.dm"
#include "code\modules\clothing\pants\pants.dm"
#include "code\modules\clothing\pants\shorts.dm"
#include "code\modules\clothing\pants\skirts.dm"
#include "code\modules\clothing\rings\material.dm"
#include "code\modules\clothing\rings\rings.dm"
#include "code\modules\clothing\rings\xeno\tajara.dm"
Expand Down Expand Up @@ -2022,9 +2029,6 @@
#include "code\modules\clothing\under\color.dm"
#include "code\modules\clothing\under\dresses.dm"
#include "code\modules\clothing\under\miscellaneous.dm"
#include "code\modules\clothing\under\pants.dm"
#include "code\modules\clothing\under\shorts.dm"
#include "code\modules\clothing\under\skirts.dm"
#include "code\modules\clothing\under\syndicate.dm"
#include "code\modules\clothing\under\accessories\accessory.dm"
#include "code\modules\clothing\under\accessories\armband.dm"
Expand All @@ -2049,6 +2053,7 @@
#include "code\modules\clothing\under\jobs\medsci.dm"
#include "code\modules\clothing\under\jobs\security.dm"
#include "code\modules\clothing\under\jobs\sol.dm"
#include "code\modules\clothing\under\shirts\shirts.dm"
#include "code\modules\clothing\under\xenos\diona.dm"
#include "code\modules\clothing\under\xenos\skrell.dm"
#include "code\modules\clothing\under\xenos\tajara.dm"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#define ACCESSORY_SLOT_ARM_GUARDS "arm guards"
#define ACCESSORY_SLOT_ARMOR_PIN "armor pin"
#define ACCESSORY_SLOT_ARMOR_POCKETS "armor pockets"
#define ACCESSORY_SLOT_HEAD "head"
#define ACCESSORY_SLOT_HEAD "head"
#define ACCESSORY_SLOT_PANTS "pants"

// Accessory Layering

Expand Down
15 changes: 15 additions & 0 deletions code/__DEFINES/dcs/signals/signals_atom/signals_atom_mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@
// When the signal is called: (signal arguments)
// All signals send the source datum of the signal as the first argument

///from base of client/Click(): (atom/target, atom/location, control, params, mob/user)
#define COMSIG_CLIENT_CLICK "atom_client_click"
///from base of atom/Click(): (atom/location, control, params, mob/user)
#define COMSIG_CLICK "atom_click"
///from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_SHIFT "shift_click"
#define COMPONENT_ALLOW_EXAMINATE (1<<0) //! Allows the user to examinate regardless of client.eye.
///from base of atom/ShiftClick()
#define COMSIG_SHIFT_CLICKED_ON "shift_clicked_on"

///from base of atom/base_click_alt_secondary(): (/mob)
#define COMSIG_CLICK_ALT_SECONDARY "click_alt_secondary"
#define COMPONENT_CANCEL_CLICK_ALT_SECONDARY (1<<0)

///from base of atom/MouseDrop(): (/atom/over, /mob/user)
#define COMSIG_MOUSEDROP_ONTO "mousedrop_onto"
#define COMPONENT_CANCEL_MOUSEDROP_ONTO (1<<0)
///from base of atom/handle_mouse_drop_receive: (/atom/from, /mob/user)
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
#define COMPONENT_CANCEL_MOUSEDROPPED_ONTO (1<<0)
///from base of mob/MouseWheelOn(): (/atom, delta_x, delta_y, params)
#define COMSIG_MOUSE_SCROLL_ON "mousescroll_on"
13 changes: 13 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

///from base of mob/clickon(): (atom/A, params)
#define COMSIG_MOB_CLICKON "mob_clickon"
///from base of mob/MiddleClickOn(): (atom/A)
#define COMSIG_MOB_MIDDLECLICKON "mob_middleclickon"
///from base of mob/AltClickOn(): (atom/A)
#define COMSIG_MOB_ALTCLICKON "mob_altclickon"
#define COMSIG_MOB_CANCEL_CLICKON (1<<0)
///from base of mob/alt_click_on_secodary(): (atom/A)
#define COMSIG_MOB_ALTCLICKON_SECONDARY "mob_altclickon_secondary"

/// From base of /client/Move(): (list/move_args)
#define COMSIG_MOB_CLIENT_PRE_LIVING_MOVE "mob_client_pre_living_move"
/// Should we stop the current living movement attempt
Expand All @@ -20,6 +31,8 @@

///from base of /obj/item/attack(): (mob/M, mob/user)
#define COMSIG_MOB_ITEM_ATTACK "mob_item_attack"
///from base of mob/RangedAttack(): (atom/A, modifiers)
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged"

///From base of mob/update_movespeed():area
#define COMSIG_MOB_MOVESPEED_UPDATED "mob_update_movespeed"
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_object/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

///from base of /obj/item/attack(): (mob/living, mob/living, params)
#define COMSIG_ITEM_ATTACK "item_attack"
///from base of obj/item/attack_self(): (/mob)
#define COMSIG_ITEM_ATTACK_SELF "item_attack_self"
//from base of obj/item/attack_self_secondary(): (/mob)
#define COMSIG_ITEM_ATTACK_SELF_SECONDARY "item_attack_self_secondary"

///from base of [obj/item/attack()]: (atom/target, mob/user, proximity_flag, click_parameters)
#define COMSIG_ITEM_AFTERATTACK "item_afterattack"
Expand Down
77 changes: 40 additions & 37 deletions code/__DEFINES/icon_layering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,43 @@
#define TAIL_SOUTH_LAYER 6
#define TAIL_SOUTH_ACC_LAYER 7
#define SHOES_LAYER_ALT 8
#define WRISTS_LAYER_UNDER 9
#define UNIFORM_LAYER 10
#define MOB_DAMAGE_LAYER 11
#define ID_LAYER 12
#define BANDAGE_LAYER 13
#define SHOES_LAYER 14
#define GLOVES_LAYER 15
#define BELT_LAYER 16
#define WRISTS_LAYER_UNIFORM 17
#define SUIT_LAYER 18
#define ID_LAYER_ALT 19
#define TAIL_NORTH_LAYER 20
#define TAIL_NORTH_ACC_LAYER 21
#define HAIR_LAYER_ALT 22
#define HAIR_LAYER_ALT_EMISSIVE 23
#define GLASSES_LAYER 24
#define BELT_LAYER_ALT 25
#define SUIT_STORE_LAYER 26
#define BACK_LAYER 27
#define HAIR_LAYER 28
#define HAIR_LAYER_EMISSIVE 29
#define GLASSES_LAYER_ALT 30
#define L_EAR_LAYER 31
#define R_EAR_LAYER 32
#define FACEMASK_LAYER 33
#define HEAD_LAYER 34
#define L_EAR_LAYER_ALT 35
#define R_EAR_LAYER_ALT 36
#define GLASSES_LAYER_OVER 37
#define COLLAR_LAYER 38
#define WRISTS_LAYER_OVER 39
#define HANDCUFF_LAYER 40
#define LEGCUFF_LAYER 41
#define L_HAND_LAYER 42
#define R_HAND_LAYER 43
#define FIRE_LAYER_UPPER 44
#define TOTAL_LAYERS 44
#define UNDER_UNIFORM_LAYER_WR 9
#define UNDER_UNIFORM_LAYER_PA 10
#define UNIFORM_LAYER 11
#define ABOVE_UNIFORM_LAYER_PA 12
#define MOB_DAMAGE_LAYER 13
#define ID_LAYER 14
#define BANDAGE_LAYER 15
#define SHOES_LAYER 16
#define GLOVES_LAYER 17
#define BELT_LAYER 18
#define ABOVE_UNIFORM_LAYER_WR 19
#define SUIT_LAYER 20
#define ABOVE_SUIT_LAYER_PA 21
#define ID_LAYER_ALT 22
#define TAIL_NORTH_LAYER 23
#define TAIL_NORTH_ACC_LAYER 24
#define HAIR_LAYER_ALT 25
#define HAIR_LAYER_ALT_EMISSIVE 26
#define GLASSES_LAYER 27
#define BELT_LAYER_ALT 28
#define SUIT_STORE_LAYER 29
#define BACK_LAYER 30
#define HAIR_LAYER 31
#define HAIR_LAYER_EMISSIVE 32
#define GLASSES_LAYER_ALT 33
#define L_EAR_LAYER 34
#define R_EAR_LAYER 35
#define FACEMASK_LAYER 36
#define HEAD_LAYER 37
#define L_EAR_LAYER_ALT 38
#define R_EAR_LAYER_ALT 39
#define GLASSES_LAYER_OVER 40
#define COLLAR_LAYER 41
#define ABOVE_SUIT_LAYER_WR 42
#define HANDCUFF_LAYER 43
#define LEGCUFF_LAYER 44
#define L_HAND_LAYER 45
#define R_HAND_LAYER 46
#define FIRE_LAYER_UPPER 47
#define TOTAL_LAYERS 47
12 changes: 8 additions & 4 deletions code/__DEFINES/items_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define SLOT_HOLSTER BITFLAG(14)
#define SLOT_WRISTS BITFLAG(15)
#define SLOT_S_STORE BITFLAG(16)
#define SLOT_PANTS BITFLAG(17)

// Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses.
#define HIDEGLOVES 0x1
Expand All @@ -32,9 +33,10 @@
#define HIDEEYES 0x80 // Glasses.
#define HIDEFACE 0x100// Dictates whether we appear as "Unknown".
#define HIDEWRISTS 0x200
#define BLOCKHEADHAIR 0x400// Hides the user's hair overlay. Leaves facial hair.
#define BLOCKHAIR 0x800/// Hides the user's hair, facial and otherwise.
#define ALWAYSDRAW 0x1000//If set, this item is always rendered even if its slot is hidden by other clothing
#define HIDEPANTS 0x400
#define BLOCKHEADHAIR 0x800// Hides the user's hair overlay. Leaves facial hair.
#define BLOCKHAIR 0x1000/// Hides the user's hair, facial and otherwise.
#define ALWAYSDRAW 0x2000//If set, this item is always rendered even if its slot is hidden by other clothing
//Note that the item may still not be visible if its sprite is actually covered up.

// Slots.
Expand All @@ -59,7 +61,7 @@
#define slot_in_backpack 19
#define slot_legcuffed 20
#define slot_r_ear 21
#define slot_legs 22
#define slot_pants 22
#define slot_tie 23
#define slot_in_belt 24
#define slot_wrists 25
Expand All @@ -81,6 +83,7 @@
#define slot_wear_suit_str "slot_suit"
#define slot_l_ear_str "slot_l_ear"
#define slot_r_ear_str "slot_r_ear"
#define slot_pants_str "slot_pants"
#define slot_shoes_str "slot_shoes"
#define slot_wrists_str "slot_wrists"
#define slot_gloves_str "slot_gloves"
Expand All @@ -105,6 +108,7 @@
#define WORN_ID "_id"
#define WORN_MASK "_ma"
#define WORN_WRISTS "_wr"
#define WORN_PANTS "_pa"

// Bitflags for clothing parts.
#define HEAD 0x1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
#define INV_R_EAR_DEF_ICON 'icons/mob/r_ear.dmi'
#define INV_SHOES_DEF_ICON 'icons/mob/feet.dmi'
#define INV_WRISTS_DEF_ICON 'icons/mob/wrist.dmi'
#define INV_PANTS_DEF_ICON 'icons/mob/pants.dmi'

// IPC tags
#define IPC_OWNERSHIP_SELF "Self Owned"
Expand Down
8 changes: 8 additions & 0 deletions code/__HELPERS/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -881,3 +881,11 @@
else
used_key_list[input_key] = 1
return input_key

// Gets the first instance that is of the given type (strictly)
/proc/get_instance_of_strict_type(list/L, T)
RETURN_TYPE(/atom)
for(var/key in L)
var/atom/A = key
if(A.type == T)
return A
30 changes: 19 additions & 11 deletions code/__HELPERS/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,26 @@
if(turfs.len)
return pick(turfs)

/proc/screen_loc2turf(text, turf/origin)
if(!origin)
///Returns a turf based on text inputs, original turf and viewing client
/proc/parse_caught_click_modifiers(list/modifiers, turf/origin, client/viewing_client)
if(!modifiers)
return null
var/tZ = splittext(text, ",")
var/tX = splittext(tZ[1], "-")
var/tY = text2num(tX[2])
tX = splittext(tZ[2], "-")
tX = text2num(tX[2])
tZ = origin.z
tX = max(1, min(origin.x + 7 - tX, world.maxx))
tY = max(1, min(origin.y + 7 - tY, world.maxy))
return locate(tX, tY, tZ)

var/screen_loc = splittext(LAZYACCESS(modifiers, SCREEN_LOC), ",")
var/list/actual_view = getviewsize(viewing_client ? viewing_client.view : world.view)
var/click_turf_x = splittext(screen_loc[1], ":")
var/click_turf_y = splittext(screen_loc[2], ":")
var/click_turf_z = origin.z

var/click_turf_px = text2num(click_turf_x[2])
var/click_turf_py = text2num(click_turf_y[2])
click_turf_x = origin.x + text2num(click_turf_x[1]) - round(actual_view[1] / 2) - 1
click_turf_y = origin.y + text2num(click_turf_y[1]) - round(actual_view[2] / 2) - 1

var/turf/click_turf = locate(clamp(click_turf_x, 1, world.maxx), clamp(click_turf_y, 1, world.maxy), click_turf_z)
LAZYSET(modifiers, ICON_X, "[(click_turf_px - click_turf.pixel_x) + ((click_turf_x - click_turf.x) * ICON_SIZE_X)]")
LAZYSET(modifiers, ICON_Y, "[(click_turf_py - click_turf.pixel_y) + ((click_turf_y - click_turf.y) * ICON_SIZE_Y)]")
return click_turf

// This proc will check if a neighboring tile in the stated direction "dir" is dense or not
// Will return 1 if it is dense and zero if not
Expand Down
36 changes: 23 additions & 13 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
Note that AI have no need for the adjacency proc, and so this proc is a lot cleaner.
*/
/mob/living/silicon/ai/DblClickOn(var/atom/A, params)
if(control_disabled || stat) return
/mob/living/silicon/ai/DblClickOn(atom/A, params)
if(control_disabled || stat)
return

if(ismob(A))
ai_actual_track(A)
else
A.move_camera_by_click()


/mob/living/silicon/ai/ClickOn(var/atom/A, params)
/mob/living/silicon/ai/ClickOn(atom/A, params)
if(world.time <= next_click)
return
next_click = world.time + 1
Expand All @@ -27,19 +28,28 @@
return

var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
return
if(modifiers["middle"])
MiddleClickOn(A)
return
if(modifiers["shift"])
if(LAZYACCESS(modifiers, SHIFT_CLICK))
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
ShiftMiddleClickOn(A)
return
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlShiftClickOn(A)
return
ShiftClickOn(A)
return
if(modifiers["alt"]) // alt and alt-gr (rightalt)
AltClickOn(A)
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlMiddleClickOn(A)
else
MiddleClickOn(A, params)
return
if(LAZYACCESS(modifiers, ALT_CLICK)) // alt and alt-gr (rightalt)
if(LAZYACCESS(modifiers, RIGHT_CLICK))
AltClickSecondaryOn(A)
else
AltClickOn(A)
return
if(modifiers["ctrl"])
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlClickOn(A)
return

Expand Down
Loading

0 comments on commit 3eb9f0b

Please sign in to comment.