Skip to content

Commit

Permalink
Merge branch 'synth_vendor_additions' of https://github.com/v7-c/cmss13
Browse files Browse the repository at this point in the history
… into synth_vendor_additions
  • Loading branch information
s5nt committed May 12, 2024
2 parents 2f1a5d8 + 62d8082 commit fbe8c46
Show file tree
Hide file tree
Showing 318 changed files with 5,860 additions and 3,831 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
#define SEE_INVISIBLE_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized.
#define INVISIBILITY_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized.

#define HIDE_INVISIBLE_OBSERVER 59 // define for when we want to hide all observer mobs.

#define INVISIBILITY_OBSERVER 60
#define SEE_INVISIBLE_OBSERVER 60

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/_math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define ROUND_UP(x) ( -round(-(x)))

// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
#define FLOOR(x, y) ( floor((x) / (y)) * (y) )

// Real modulus that handles decimals
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
Expand Down
8 changes: 3 additions & 5 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
#define NOTE_ADMIN 1
///This note is used by staff for positive record keeping.
#define NOTE_MERIT 2
///These notes are used by respective whitelist councils for record keeping.
#define NOTE_COMMANDER 3
#define NOTE_SYNTHETIC 4
#define NOTE_YAUTJA 5
///These notes are automatically applied by the Whitelist Panel.
#define NOTE_WHITELIST 3
///Note categories in text form, in order of their numerical #defines.
GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja"))
GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Whitelist"))

#define ADMIN_FLW(user) "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
Expand Down
4 changes: 3 additions & 1 deletion code/__DEFINES/dcs/signals/atom/signals_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@

#define COMSIG_ITEM_PICKUP "item_pickup"

///from /obj/item/device/camera/broadcasting/attack_self
///from /obj/item/device/camera/broadcasting
#define COMSIG_BROADCAST_GO_LIVE "broadcast_live"
#define COMSIG_BROADCAST_HEAR_TALK "broadcast_hear_talk"
#define COMSIG_BROADCAST_SEE_EMOTE "broadcast_see_emote"

/// from /obj/item/proc/mob_can_equip
#define COMSIG_ITEM_ATTEMPTING_EQUIP "item_attempting_equip"
Expand Down
10 changes: 9 additions & 1 deletion code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@
#define COMSIG_TENT_COLLAPSING "tent_collapsing"

/// from /obj/proc/afterbuckle()
#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"
#define COMSIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"

/// from /datum/cm_objective/retrieve_data/disk/process()
#define COMSIG_INTEL_DISK_LOST_POWER "intel_disk_lost_power"

/// from /datum/cm_objective/retrieve_data/disk/complete()
#define COMSIG_INTEL_DISK_COMPLETED "intel_disk_completed"

/// from /obj/vehicle/multitile/arc/toggle_antenna()
#define COMSIG_ARC_ANTENNA_TOGGLED "arc_antenna_toggled"
/// from /obj/structure/machinery/cryopod/go_out()
#define COMSIG_CRYOPOD_GO_OUT "cryopod_go_out"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
/// From /proc/biohazard_lockdown()
#define COMSIG_GLOB_RESEARCH_LOCKDOWN "!research_lockdown_closed"
#define COMSIG_GLOB_RESEARCH_LIFT "!research_lockdown_opened"
/// From /proc/aicore_lockdown()
#define COMSIG_GLOB_AICORE_LOCKDOWN "!aicore_lockdown_closed"
#define COMSIG_GLOB_AICORE_LIFT "!aicore_lockdown_opened"

/// From /obj/structure/machinery/power/reactor/proc/set_overloading() : (set_overloading)
#define COMSIG_GLOB_GENERATOR_SET_OVERLOADING "!generator_set_overloading"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#define USES_HEARING (1<<17)
/// Should we use the initial icon for display? Mostly used by overlay only objects
#define HTML_USE_INITAL_ICON (1<<18)
// Whether or not the object sees emotes
#define USES_SEEING (1<<19)

//==========================================================================================

Expand Down Expand Up @@ -84,6 +86,8 @@
#define IGNITING_ITEM (1<<13)
/// Overrides NODROP in some cases (stripping)
#define FORCEDROP_CONDITIONAL (1<<14)
/// Overrides smartgunner not being able to wear backpacks
#define SMARTGUNNER_BACKPACK_OVERRIDE (1<<15)
//==========================================================================================


Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

//-------- WY Goons --------//
#define JOB_WY_GOON "WY Corporate Security"
#define JOB_WY_GOON_TECH "WY Corporate Security Technician"
#define JOB_WY_GOON_LEAD "WY Corporate Security Lead"
#define JOB_WY_GOON_RESEARCHER "WY Research Consultant"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

//#define AREA_LAYER 1

#define DISPLACEMENT_PLATE_RENDER_LAYER 1
#define DISPLACEMENT_PLATE_RENDER_TARGET "*DISPLACEMENT_PLATE_RENDER_TARGET"

#define UNDER_TURF_LAYER 1.99

#define TURF_LAYER 2
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#define CANDAZE (1<<18)
#define CANSLOW (1<<19)
#define NO_PERMANENT_DAMAGE (1<<20)
#define CORRUPTED_ALLY (1<<21)

// =============================
// hive types
Expand Down
22 changes: 13 additions & 9 deletions code/__DEFINES/turfs.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
#define RANGE_TURFS(RADIUS, CENTER) \
block( \
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
)
block( \
(CENTER).x-(RADIUS), (CENTER).y-(RADIUS), (CENTER).z, \
(CENTER).x+(RADIUS), (CENTER).y+(RADIUS), (CENTER).z \
)

#define RECT_TURFS(H_RADIUS, V_RADIUS, CENTER) \
block( \
locate(max((CENTER).x-(H_RADIUS),1), max((CENTER).y-(V_RADIUS),1), (CENTER).z), \
locate(min((CENTER).x+(H_RADIUS),world.maxx), min((CENTER).y+(V_RADIUS),world.maxy), (CENTER).z) \
(CENTER).x-(H_RADIUS), (CENTER).y-(V_RADIUS), (CENTER).z, \
(CENTER).x+(H_RADIUS), (CENTER).y+(V_RADIUS), (CENTER).z \
)

///Returns all turfs in a zlevel
#define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL))
#define Z_TURFS(ZLEVEL) block(1, 1, (ZLEVEL), world.maxx, world.maxy, (ZLEVEL))

/// Returns a list of turfs in the rectangle specified by BOTTOM LEFT corner and height/width, checks for being outside the world border for you
/// Returns a list of turfs in the rectangle specified by BOTTOM LEFT corner and height/width
#define CORNER_BLOCK(corner, width, height) CORNER_BLOCK_OFFSET(corner, width, height, 0, 0)

/// Returns a list of turfs similar to CORNER_BLOCK but with offsets
#define CORNER_BLOCK_OFFSET(corner, width, height, offset_x, offset_y) ((block(locate(corner.x + offset_x, corner.y + offset_y, corner.z), locate(min(corner.x + (width - 1) + offset_x, world.maxx), min(corner.y + (height - 1) + offset_y, world.maxy), corner.z))))
#define CORNER_BLOCK_OFFSET(corner, width, height, offset_x, offset_y) \
block( \
(corner).x + (offset_x), (corner).y + (offset_y), (corner).z, \
(corner).x + ((width) - 1) + (offset_x), (corner).y + ((height) - 1) + (offset_y), (corner).z \
)

/// Returns an outline (neighboring turfs) of the given block
#define CORNER_OUTLINE(corner, width, height) ( \
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define HDPT_TURRET "turret"
#define HDPT_SPECIAL "special" //special pre-installed hardpoints with unique behaviour

#define HDPT_LAYER_WHEELS 1
#define HDPT_LAYER_WHEELS 0.01 // so it appears below xenomorphs and other mobs
#define HDPT_LAYER_SUPPORT 2
#define HDPT_LAYER_ARMOR 3
#define HDPT_LAYER_TURRET 4
Expand Down
3 changes: 1 addition & 2 deletions code/__HELPERS/#maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
#define Csc(x) (1 / sin(x))

#define Default(a, b) ((a) ? (a) : (b))
#define Floor(x) (round(x))

// Greatest Common Divisor - Euclid's algorithm
#define Gcd(a, b) ((b) ? Gcd((b), (a) % (b)) : (a))

#define Inverse(x) (1 / (x))
#define IsEven(x) ((x) % 2 == 0)

#define IsInteger(x) (Floor(x) == (x))
#define IsInteger(x) (floor(x) == (x))
#define IsOdd(x) (!IsEven(x))
#define IsMultiple(x, y) ((x) % (y) == 0)

Expand Down
6 changes: 3 additions & 3 deletions code/__HELPERS/_time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
return "right now"
if(second < 60)
return "[second] second[(second != 1)? "s":""]"
var/minute = Floor(second / 60)
var/minute = floor(second / 60)
second = FLOOR(MODULUS(second, 60), round_seconds_to)
var/secondT
if(second)
secondT = " and [second] second[(second != 1)? "s":""]"
if(minute < 60)
return "[minute] minute[(minute != 1)? "s":""][secondT]"
var/hour = Floor(minute / 60)
var/hour = floor(minute / 60)
minute = MODULUS(minute, 60)
var/minuteT
if(minute)
minuteT = " and [minute] minute[(minute != 1)? "s":""]"
if(hour < 24)
return "[hour] hour[(hour != 1)? "s":""][minuteT][secondT]"
var/day = Floor(hour / 24)
var/day = floor(hour / 24)
hour = MODULUS(hour, 24)
var/hourT
if(hour)
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@
if(L.len <= 1)
return L

var/middle = Floor(L.len / 2)
var/middle = floor(L.len / 2)
var/list/left = custom_mergesort(L.Copy(1, middle + 1))
var/list/right = custom_mergesort(L.Copy(middle + 1))
var/list/result = list()
Expand Down
6 changes: 3 additions & 3 deletions code/__HELPERS/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ GLOBAL_VAR_INIT(log_end, world.system_type == UNIX ? ascii2text(13) : "")
GLOB.STUI.admin.Add("\[[time]]OVERWATCH: [text]")
GLOB.STUI.processing |= STUI_LOG_ADMIN

/proc/log_idmod(obj/item/card/id/target_id, msg)
/proc/log_idmod(obj/item/card/id/target_id, msg, changer)
var/time = time_stamp()
if (CONFIG_GET(flag/log_idmod))
WRITE_LOG(GLOB.world_game_log, "ID MOD: [msg]")
LOG_REDIS("idmod", "\[[time]\] [msg]")
WRITE_LOG(GLOB.world_game_log, "ID MOD: ([changer]) [msg]")
LOG_REDIS("idmod", "\[[time]\] ([changer]) [msg]")
target_id.modification_log += "\[[time]]: [msg]"

/proc/log_vote(text)
Expand Down
3 changes: 1 addition & 2 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,7 @@
if(orange)
turfs -= get_turf(center)
. = list()
for(var/V in turfs)
var/turf/T = V
for(var/turf/T as anything in turfs)
. += T
. += T.contents
if(areas)
Expand Down
7 changes: 7 additions & 0 deletions code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,10 @@
plane = ESCAPE_MENU_PLANE
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
render_relay_plane = RENDER_PLANE_MASTER

/atom/movable/screen/plane_master/displacement
name = "displacement plane"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
plane = DISPLACEMENT_PLATE_RENDER_LAYER
render_target = DISPLACEMENT_PLATE_RENDER_TARGET
render_relay_plane = null
4 changes: 4 additions & 0 deletions code/_onclick/hud/rendering/render_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
plane = RENDER_PLANE_GAME
render_relay_plane = RENDER_PLANE_MASTER

/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner)
. = ..()
add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10))

///render plate for OOC stuff like ghosts, hud-screen effects, etc
/atom/movable/screen/plane_master/rendering_plate/non_game
name = "non-game rendering plate"
Expand Down
3 changes: 2 additions & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
return FALSE

/atom/movable/attackby(obj/item/W, mob/living/user)
if(W)
. = ..()
if(W && !.)
if(!(W.flags_item & NOBLUDGEON))
visible_message(SPAN_DANGER("[src] has been hit by [user] with [W]."), null, null, 5, CHAT_TYPE_MELEE_HIT)
user.animation_attack_on(src)
Expand Down
3 changes: 1 addition & 2 deletions code/controllers/subsystem/interior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ SUBSYSTEM_DEF(interior)

var/list/bounds = template.load(locate(bottom_left.x + (INTERIOR_BORDER_SIZE / 2), bottom_left.y + (INTERIOR_BORDER_SIZE / 2), bottom_left.z), centered = FALSE)

var/list/turfs = block( locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
var/list/turfs = block(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ], bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])

var/list/areas = list()
for(var/turf/current_turf as anything in turfs)
Expand Down
4 changes: 1 addition & 3 deletions code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,7 @@ SUBSYSTEM_DEF(mapping)
if(!level_trait(z,ZTRAIT_RESERVED))
clearing_reserved_turfs = FALSE
CRASH("Invalid z level prepared for reservations.")
var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,z))
var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,z))
var/block = block(A, B)
var/block = block(SHUTTLE_TRANSIT_BORDER, SHUTTLE_TRANSIT_BORDER, z, world.maxx - SHUTTLE_TRANSIT_BORDER, world.maxy - SHUTTLE_TRANSIT_BORDER, z)
for(var/turf/T as anything in block)
// No need to empty() these, because they just got created and are already /turf/open/space/basic.
T.turf_flags = UNUSED_RESERVATION_TURF
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ SUBSYSTEM_DEF(minimaps)
else if(yval < smallest_y)
smallest_y = yval

minimaps_by_z["[level]"].x_offset = Floor((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE)
minimaps_by_z["[level]"].y_offset = Floor((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE)
minimaps_by_z["[level]"].x_offset = floor((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE)
minimaps_by_z["[level]"].y_offset = floor((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE)

icon_gen.Shift(EAST, minimaps_by_z["[level]"].x_offset)
icon_gen.Shift(NORTH, minimaps_by_z["[level]"].y_offset)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(ticker)

var/totalPlayers = 0 //used for pregame stats on statpanel
var/totalPlayersReady = 0 //used for pregame stats on statpanel
var/tutorial_disabled = FALSE //zonenote
var/tutorial_disabled = FALSE

/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
Expand Down
14 changes: 14 additions & 0 deletions code/datums/ammo/bullet/arc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/ammo/bullet/re700
name = "rotary cannon bullet"
icon_state = "autocannon"
damage_falloff = 0
flags_ammo_behavior = AMMO_BALLISTIC

accuracy = HIT_ACCURACY_TIER_7
scatter = 0
damage = 30
damage_var_high = PROJECTILE_VARIANCE_TIER_8
penetration = ARMOR_PENETRATION_TIER_2
accurate_range = 10
max_range = 12
shell_speed = AMMO_SPEED_TIER_6
3 changes: 3 additions & 0 deletions code/datums/autocells/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ as having entered the turf.
if(QDELETED(E))
return

if(power >= 150) //shockwave for anything over 150 power
new /obj/effect/shockwave(epicenter, power/60)

E.power = power
E.power_falloff = falloff
E.falloff_shape = falloff_shape
Expand Down
Loading

0 comments on commit fbe8c46

Please sign in to comment.