Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions cev_eris.dme
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include "code\__DEFINES\process_scheduler.dm"
#include "code\__DEFINES\projectile_defines.dm"
#include "code\__DEFINES\protect.dm"
#include "code\__DEFINES\psi.dm"
#include "code\__DEFINES\qdel.dm"
#include "code\__DEFINES\reagents.dm"
#include "code\__DEFINES\research.dm"
Expand Down Expand Up @@ -158,6 +159,7 @@
#include "code\__HELPERS\mobs.dm"
#include "code\__HELPERS\nameof.dm"
#include "code\__HELPERS\names.dm"
#include "code\__HELPERS\overlays.dm"
#include "code\__HELPERS\sanitize_values.dm"
#include "code\__HELPERS\screen_atoms.dm"
#include "code\__HELPERS\shell.dm"
Expand Down Expand Up @@ -368,6 +370,7 @@
#include "code\controllers\subsystems\processing\nano.dm"
#include "code\controllers\subsystems\processing\objs.dm"
#include "code\controllers\subsystems\processing\processing.dm"
#include "code\controllers\subsystems\processing\psi.dm"
#include "code\controllers\subsystems\processing\reagents.dm"
#include "code\controllers\subsystems\processing\turf.dm"
#include "code\controllers\subsystems\processing\organs\internal_wounds.dm"
Expand Down Expand Up @@ -675,6 +678,8 @@
#include "code\game\antagonist\station\inquisitor.dm"
#include "code\game\antagonist\station\marshal.dm"
#include "code\game\antagonist\station\rogue_ai.dm"
#include "code\game\antagonist\station\thrall.dm"
#include "code\game\antagonist\station\psionic\paramount.dm"
#include "code\game\antagonist\station\revolutionary\excel_faction.dm"
#include "code\game\antagonist\station\revolutionary\excelsior.dm"
#include "code\game\area\ai_monitored.dm"
Expand Down Expand Up @@ -2685,6 +2690,48 @@
#include "code\modules\projectiles\projectile\plasma.dm"
#include "code\modules\projectiles\projectile\projectilegrenades.dm"
#include "code\modules\projectiles\projectile\special.dm"
#include "code\modules\psionics\complexus\complexus.dm"
#include "code\modules\psionics\complexus\complexus_helpers.dm"
#include "code\modules\psionics\complexus\complexus_latency.dm"
#include "code\modules\psionics\complexus\complexus_power_cache.dm"
#include "code\modules\psionics\complexus\complexus_process.dm"
#include "code\modules\psionics\complexus\complexus_topic.dm"
#include "code\modules\psionics\equipment\cerebro_enhancers.dm"
#include "code\modules\psionics\equipment\foundation_implanter.dm"
#include "code\modules\psionics\equipment\foundation_weapon.dm"
#include "code\modules\psionics\equipment\implant.dm"
#include "code\modules\psionics\equipment\null_ammo.dm"
#include "code\modules\psionics\equipment\psimeter.dm"
#include "code\modules\psionics\equipment\psimonitor.dm"
#include "code\modules\psionics\equipment\psipower.dm"
#include "code\modules\psionics\equipment\psipower_blade.dm"
#include "code\modules\psionics\equipment\psipower_tinker.dm"
#include "code\modules\psionics\equipment\psipower_tk.dm"
#include "code\modules\psionics\events\_psi.dm"
#include "code\modules\psionics\events\mini_spasm.dm"
#include "code\modules\psionics\events\psi_balm.dm"
#include "code\modules\psionics\events\psi_wail.dm"
#include "code\modules\psionics\faculties\_faculty.dm"
#include "code\modules\psionics\faculties\_power.dm"
#include "code\modules\psionics\faculties\coercion.dm"
#include "code\modules\psionics\faculties\energistics.dm"
#include "code\modules\psionics\faculties\psychokinesis.dm"
#include "code\modules\psionics\faculties\redaction.dm"
#include "code\modules\psionics\interface\ui.dm"
#include "code\modules\psionics\interface\ui_hub.dm"
#include "code\modules\psionics\interface\ui_toggles.dm"
#include "code\modules\psionics\mob\mob.dm"
#include "code\modules\psionics\mob\mob_assay.dm"
#include "code\modules\psionics\mob\mob_interactions.dm"
#include "code\modules\psionics\null\_null.dm"
#include "code\modules\psionics\null\chemistry.dm"
#include "code\modules\psionics\null\flooring.dm"
#include "code\modules\psionics\null\material.dm"
#include "code\modules\psionics\null\material_sheet.dm"
#include "code\modules\psionics\null\material_weapon.dm"
#include "code\modules\psionics\null\turf_floor.dm"
#include "code\modules\psionics\null\turf_wall.dm"
#include "code\modules\psionics\null\~null.dm"
#include "code\modules\pulsar_engine\_defines.dm"
#include "code\modules\pulsar_engine\pulsar_consoles.dm"
#include "code\modules\pulsar_engine\pulsar_events.dm"
Expand Down
3 changes: 2 additions & 1 deletion code/__DEFINES/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
#define BP_IS_REMOVED(org) (org.nature == MODIFICATION_REMOVED)
#define BP_IS_ASSISTED(org) (org.nature == MODIFICATION_ASSISTED)
#define BP_IS_LIFELIKE(org) (org.nature == MODIFICATION_LIFELIKE)

#define BP_IS_CRYSTAL(org) (org.nature == MODIFICATION_CRYSTAL)

// Organ defines.
#define ORGAN_CUT_AWAY (1<<0)
Expand Down Expand Up @@ -139,6 +139,7 @@
#define MODIFICATION_SILICON 2 // Fully robotic, no organic parts
#define MODIFICATION_LIFELIKE 3 // Robotic, made to appear organic
#define MODIFICATION_REMOVED 4 // Removed completly
#define MODIFICATION_CRYSTAL 5 // Doesn't sound healthy

// Damage above this value must be repaired with surgery.
#define ROBOLIMB_SELF_REPAIR_CAP 30
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/gamemode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#define ROLE_BANTYPE_CARRION ROLE_CARRION
#define ROLE_BANTYPE_CREW_SIDED ROLE_MARSHAL
#define ROLE_BANTYPE_BLITZ ROLE_BLITZ
#define ROLE_BANTYPE_PARAMOUNT ROLE_PARAMOUNT
#define ROLE_BANTYPE_THRALL ROLE_THRALL

// antag template macros. commented out ones are leftover from baycode
#define ROLE_BORER "Cortical Borer"
Expand All @@ -63,6 +65,8 @@
// #define ROLE_DEATHSQUAD "Death Squad"
// #define ROLE_ARTIST "Artist"
#define ROLE_MERCENARY "Serbian Mercenary"
#define ROLE_PARAMOUNT "Paramount"
#define ROLE_THRALL "Thrall"
#define ROLE_PIRATE "Pirate"
#define ROLE_CARRION "Carrion"
#define ROLE_MONKEY "Monkey"
Expand All @@ -85,6 +89,7 @@
#define FACTION_EXCELSIOR "excelsior"
#define FACTION_BORERS "borers"
#define FACTION_SERBS "serbians"
#define FACTION_FOUNDERS "founders"
#define FACTION_PIRATES "pirates"
#define FACTION_NEOTHEOLOGY "neotheologists"

Expand Down
5 changes: 3 additions & 2 deletions code/__DEFINES/inventory_sizes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#define ITEM_SIZE_COLOSSAL 7
/// Something so large that it extends beyond the confines of its tile, (e.g. scrap beacon)
#define ITEM_SIZE_TITANIC 8

/// Use this to forbid item from being placed in a container.
#define ITEM_SIZE_NO_CONTAINER INFINITY


#define BASE_STORAGE_COST(w_class) (2**(w_class-1)) //1,2,4,8,16,...
Expand All @@ -29,4 +30,4 @@
#define DEFAULT_HUGE_STORAGE BASE_STORAGE_CAPACITY(5) //40 after BASE_STORAGE_CAPACITY calculation
#define DEFAULT_BULKY_STORAGE BASE_STORAGE_CAPACITY(4) //30 after BASE_STORAGE_CAPACITY calculation
#define DEFAULT_NORMAL_STORAGE BASE_STORAGE_CAPACITY(3) //20 after BASE_STORAGE_CAPACITY calculation
#define DEFAULT_SMALL_STORAGE BASE_STORAGE_CAPACITY(2) //10 after BASE_STORAGE_CAPACITY calculation
#define DEFAULT_SMALL_STORAGE BASE_STORAGE_CAPACITY(2) //10 after BASE_STORAGE_CAPACITY calculation
6 changes: 5 additions & 1 deletion code/__DEFINES/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#define MATERIAL_CARPET "carpet"
#define MATERIAL_BIOMATTER "biomatter"
#define MATERIAL_COMPRESSED "compressed matter"
#define MATERIAL_NULLGLASS "nullglass"
#define MATERIAL_CRYSTAL "crystal"

#define MATERIAL_LIST list(\
MATERIAL_STEEL,\
Expand Down Expand Up @@ -57,7 +59,9 @@
MATERIAL_VOXALLOY,\
MATERIAL_CARPET,\
MATERIAL_BIOMATTER,\
MATERIAL_COMPRESSED)
MATERIAL_COMPRESSED,\
MATERIAL_NULLGLASS,\
MATERIAL_CRYSTAL)

#define PLASTEEL_COLOUR "#8e9799"
//Color to exactly match concept art #b0bcbe
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define MUTATION_NOPRINTS /datum/mutation/t2/noprints
#define MUTATION_ROACH_PHEROMONES /datum/mutation/t2/roach_pheromones
#define MUTATION_SPIDER_PHEROMONES /datum/mutation/t2/spider_pheromones
#define MUTATION_PSI_LOW /datum/mutation/t2/psionic_compatibility_low

#define MUTATION_REJECT /datum/mutation/t3/reject
#define MUTATION_GREATER_HEALING /datum/mutation/t3/healing_factor
Expand All @@ -29,6 +30,7 @@
#define MUTATION_PHAZING /datum/mutation/t4/phazing
#define MUTATION_MORPH /datum/mutation/t4/morph
#define MUTATION_REMOTESEE /datum/mutation/t4/remoteobserve
#define MUTATION_PSI_HIGH /datum/mutation/t4/psionic_compatibility_high

// Sdisabilities. // TODO: To be replaced with status effects -- KIROV
#define BLIND 0x1
Expand Down
17 changes: 17 additions & 0 deletions code/__DEFINES/psi.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#define PSI_IMPLANT_AUTOMATIC "Security Level Derived"
#define PSI_IMPLANT_SHOCK "Issue Neural Shock"
#define PSI_IMPLANT_WARN "Issue Reprimand"
#define PSI_IMPLANT_LOG "Log Incident"
#define PSI_IMPLANT_DISABLED "Disabled"

#define PSI_COERCION "coercion"
#define PSI_PSYCHOKINESIS "psychokinesis"
#define PSI_REDACTION "redaction"
#define PSI_ENERGISTICS "energistics"

#define PSI_RANK_BLUNT 0
#define PSI_RANK_LATENT 1
#define PSI_RANK_OPERANT 2
#define PSI_RANK_MASTER 3
#define PSI_RANK_GRANDMASTER 4
#define PSI_RANK_PARAMOUNT 5
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems-priority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096
#define FIRE_PRIORITY_PROCESSING 30 // Generic datum processor. Replaces objects processor.
#define FIRE_PRIORITY_GARBAGE 25 // Garbage collection.
#define FIRE_PRIORITY_VINES 25 // Spreading vine effects.
#define FIRE_PRIORITY_PSYCHICS 25 // Psychic complexus processing.
#define FIRE_PRIORITY_TURF 20 // Radioactive walls/blob.
#define FIRE_PRIORITY_NANO 20 // Updates to nanoui uis.
#define FIRE_PRIORITY_EVAC 20 // Processes the evac controller.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
#define INIT_ORDER_LANGUAGE 20
#define INIT_ORDER_JOBS 16
#define INIT_ORDER_CHAR_SETUP 14
#define INIT_ORDER_PSYCHICS 12
#define INIT_ORDER_MACHINES 7
#define INIT_ORDER_TIMER 1
#define INIT_ORDER_DEFAULT 0
Expand Down
28 changes: 27 additions & 1 deletion code/__HELPERS/matrices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
return list(1,0,0, 0,1,0, 0,0,1)

//Moves all colors angle degrees around the color wheel while maintaining intensity of the color and not affecting whites
//TODO: Need a version that only affects one color (ie shift red to blue but leave greens and blues alone)
/proc/color_rotation(angle)
if(angle == 0)
return color_identity()
Expand Down Expand Up @@ -178,6 +177,33 @@ var/list/delta_index = list(
else if (target.y > y)
pixel_y += offset

/// Clears the matrix's a-f variables to identity.
/matrix/proc/Clear()
a = 1
b = 0
c = 0
d = 0
e = 1
f = 0
return src

/// Runs Scale, Turn, and Translate if supplied parameters, then multiplies by others if set.
/matrix/proc/Update(scale_x, scale_y, rotation, offset_x, offset_y, list/others)
var/x_null = isnull(scale_x)
var/y_null = isnull(scale_y)
if (!x_null || !y_null)
Scale(x_null ? 1 : scale_x, y_null ? 1 : scale_y)
if (!isnull(rotation))
Turn(rotation)
if (offset_x || offset_y)
Translate(offset_x || 0, offset_y || 0)
if (islist(others))
for (var/other in others)
Multiply(other)
else if (others)
Multiply(others)
return src

//Does nothing
/proc/color_matrix_identity()
return list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
Expand Down
26 changes: 26 additions & 0 deletions code/__HELPERS/overlays.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// These exist for Baycode compatibility

/atom/proc/ClearOverlays()
cut_overlays()

/atom/proc/AddOverlays(overlay)
overlays += overlay

/atom/proc/CopyOverlays(atom/other, clear = FALSE)
if(clear)
cut_overlays()
overlays += other.overlays

/image/proc/AddOverlays(sources)
overlays += sources

/image/proc/CutOverlays(sources)
overlays -= sources

/image/proc/ClearOverlays()
cut_overlays()

/image/proc/CopyOverlays(atom/other, clear = FALSE)
if(clear)
cut_overlays()
overlays += other.overlays
5 changes: 5 additions & 0 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,15 @@
to_chat(src, span_warning("You cannot use \the [W] while lying down!"))
return 1

message_admins("Turf check") // TODOPSI: REMOVE
//Atoms on turfs (not on your person)
// A is a turf or is on a turf, or in something on a turf (pen in a box); but not something in something on a turf (pen in a box in a backpack)
sdepth = A.storage_depth_turf()
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
message_admins("Passed check") // TODOPSI: REMOVE
var/adjacent = A.Adjacent(src)
if(adjacent) // see adjacent.dm
message_admins("Click is adjacent") // TODOPSI: REMOVE
if(W)
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
var/resolved = (SEND_SIGNAL_OLD(W, COMSIG_IATTACK, A, src, params)) || (SEND_SIGNAL_OLD(A, COMSIG_ATTACKBY, W, src, params))
Expand All @@ -180,9 +183,11 @@
return
else // non-adjacent click
if(W)
message_admins("Hand is occupied") // TODOPSI: REMOVE
if(W.double_tact(src, A))
W.afterattack(A, src, 0, params) // 0: not Adjacent
else
message_admins("We are trying a ranged attack") // TODOPSI: REMOVE
setClickCooldown(DEFAULT_ATTACK_COOLDOWN) // no ranged spam
RangedAttack(A, params)
return 1
Expand Down
29 changes: 25 additions & 4 deletions code/_onclick/hud/screen_objects/base_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,35 @@
icon_state = _icon_state
parentmob = _parentmob

// BIG RISK CHANGE in PSIONICS - could potentially break fullauto like any change to clicks, as usual
/atom/movable/screen/inventory/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
if(!usr.can_click()) return TRUE
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened) return TRUE
if(!usr.can_click())
return TRUE
if(usr.stat || usr.paralysis || usr.stunned || usr.weakened)
return TRUE
switch(name)
if("hand") usr:swap_hand()
else usr.attack_ui(slot_id)
if("r_hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(C.hand)
C.activate_hand("r")
else
C.attack_empty_hand(slot_r_hand)
if("l_hand")
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(!C.hand)
C.activate_hand("l")
else
C.attack_empty_hand(slot_l_hand)
if("swap")
usr:swap_hand()
if("hand")
usr:swap_hand()
else
usr.attack_ui(slot_id)
return TRUE

/atom/movable/screen/inventory/hand
Expand Down
12 changes: 12 additions & 0 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@
// if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND)
. = _try_interact(user)


/**
* Called when a mob attempts to use an empty hand on itself.
*
* **Parameters**:
* - `bp_hand` (string, `BP_R_HAND` or `BP_L_HAND`) - The targeted and used hand's bodypart slot.
*/
/mob/proc/attack_empty_hand(bp_hand)
return

//Return a non FALSE value to cancel whatever called this from propagating, if it respects it.
/atom/proc/_try_interact(mob/user)
if(is_admin(user) && isghost(user)) //admin abuse
Expand Down Expand Up @@ -137,6 +147,8 @@
leap(A)
return

. = ..() // living/RangedAttack -> psi powers

// if((LASER in mutations) && a_intent == I_HURT)
// LaserEyes(A) // moved into a proc below
if(get_active_mutation(src, MUTATION_TELEKINESIS))
Expand Down
Loading
Loading