Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/PvE-CMSS13/PvE-CMSS13 int…
Browse files Browse the repository at this point in the history
…o sharps
  • Loading branch information
AndroBetel committed Jul 8, 2024
2 parents 9e82d6c + 76771ee commit 69aa5b4
Show file tree
Hide file tree
Showing 67 changed files with 717 additions and 397 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ var/MAX_EXPLOSION_RANGE = 14
#define VENT_GAS_SMOKE "Smoke"
#define VENT_GAS_CN20 "CN20 Nerve Gas"
#define VENT_GAS_CN20_XENO "CN20-X Nerve Gas"
#define VENT_GAS_LSD "ALD-91 LSD Gas"
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
3 changes: 2 additions & 1 deletion code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,9 @@ world
// From /datum/preferences/proc/copy_appearance_to
body.age = original.age
body.gender = original.gender
body.ethnicity = original.ethnicity
body.skin_color = original.skin_color
body.body_type = original.body_type
body.body_size = original.body_size

body.r_eyes = original.r_eyes
body.g_eyes = original.g_eyes
Expand Down
9 changes: 6 additions & 3 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#define isdeaf(A) (ismob(A) && ((A?:sdisabilities & DISABILITY_DEAF) || A?:ear_deaf))
#define xeno_hivenumber(A) (isxeno(A) ? A?:hivenumber : FALSE)

/proc/random_ethnicity()
return pick(GLOB.ethnicities_list)
/proc/random_skin_color()
return pick(GLOB.skin_color_list)

/proc/random_body_type()
return pick(GLOB.body_types_list)
return pick(GLOB.body_type_list)

/proc/random_body_size()
return pick(GLOB.body_size_list)

/proc/random_hair_style(gender, species = "Human")
var/h_style = "Crewcut"
Expand Down
16 changes: 11 additions & 5 deletions code/__HELPERS/sanitize_values.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,24 @@
else return default
return default

/proc/sanitize_ethnicity(ethnicity, default = "Western")
if (ethnicity in GLOB.ethnicities_list)
return ethnicity
/proc/sanitize_skin_color(skin_color, default = "Pale 2")
if(skin_color in GLOB.skin_color_list)
return skin_color

return default

/proc/sanitize_body_type(body_type, default = "Mesomorphic (Average)")
if (body_type in GLOB.body_types_list)
/proc/sanitize_body_type(body_type, default = "Lean")
if(body_type in GLOB.body_type_list)
return body_type

return default

/proc/sanitize_body_size(body_size, default = "Average")
if(body_size in GLOB.body_size_list)
return body_size

return default

/proc/sanitize_hexcolor(color, default="#000000")
if(!istext(color)) return default
var/len = length(color)
Expand Down
1 change: 0 additions & 1 deletion code/__pragmas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma TooManyArguments error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
Expand Down
9 changes: 5 additions & 4 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ GLOBAL_LIST_INIT(custom_event_info_list, setup_custom_event_info())
GLOBAL_LIST_INIT(poster_designs, subtypesof(/datum/poster))

//Preferences stuff
// Ethnicities
GLOBAL_REFERENCE_LIST_INDEXED(ethnicities_list, /datum/ethnicity, name) // Stores /datum/ethnicity indexed by name
// Body Types
GLOBAL_REFERENCE_LIST_INDEXED(body_types_list, /datum/body_type, name) // Stores /datum/body_type indexed by name
// Skin colors
GLOBAL_REFERENCE_LIST_INDEXED(skin_color_list, /datum/skin_color, name) // Stores /datum/skin_color indexed by name
// Body
GLOBAL_REFERENCE_LIST_INDEXED(body_type_list, /datum/body_type, name) // Stores /datum/body_type indexed by name
GLOBAL_REFERENCE_LIST_INDEXED(body_size_list, /datum/body_size, name) // Stores /datum/body_size indexed by name
//Hairstyles
GLOBAL_REFERENCE_LIST_INDEXED(hair_styles_list, /datum/sprite_accessory/hair, name) //stores /datum/sprite_accessory/hair indexed by name
GLOBAL_REFERENCE_LIST_INDEXED(facial_hair_styles_list, /datum/sprite_accessory/facial_hair, name) //stores /datum/sprite_accessory/facial_hair indexed by name
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 @@ -175,3 +175,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: 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
35 changes: 21 additions & 14 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,31 +355,38 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/icon/icobase = H.species.icobase
var/icon/temp

var/datum/ethnicity/ET = GLOB.ethnicities_list[H.ethnicity]
var/datum/body_type/B = GLOB.body_types_list[H.body_type]
var/datum/skin_color/set_skin_color = GLOB.skin_color_list[H.skin_color]
var/datum/body_type/set_body_type = GLOB.body_type_list[H.body_type]
var/datum/body_size/set_body_size = GLOB.body_size_list[H.body_size]

var/e_icon
var/b_icon
var/skin_color_icon
var/body_type_icon
var/body_size_icon

if (!ET)
e_icon = "western"
if(!set_skin_color)
skin_color_icon = "pale2"
else
e_icon = ET.icon_name
skin_color_icon = set_skin_color.icon_name

if (!B)
b_icon = "mesomorphic"
if(!set_body_type)
body_type_icon = "lean"
else
b_icon = B.icon_name
body_type_icon = set_body_type.icon_name

preview_icon = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "torso", e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "groin", e_icon))
if(!set_body_size)
body_size_icon = "avg"
else
body_size_icon = set_body_size.icon_name

preview_icon = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "torso", skin_color_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "groin", skin_color_icon))
preview_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "head", e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "head", skin_color_icon))
preview_icon.Blend(temp, ICON_OVERLAY)

for(var/obj/limb/E in H.limbs)
if(E.status & LIMB_DESTROYED) continue
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, E.name, e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, E.name, skin_color_icon))
if(E.status & LIMB_ROBOT)
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
Expand Down
10 changes: 0 additions & 10 deletions code/datums/global_variables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,11 @@

/client/proc/debug_global_variable(name, value, level)
var/html = ""
var/change = 0
//to make the value bold if changed
if(!(admin_holder.rights & R_DEBUG))
return html

html += "<li style='backgroundColor:white'><a href='?_src_=glob_vars;varnameedit=[name]'>E</a><a href='?_src_=glob_vars;varnamechange=[name]'>C</a> "
if(value != initial(global.vars[name]))
html += "<font color='#B300B3'>"
change = 1

if (isnull(value))
html += "[name] = <span class='value'>null</span>"
Expand Down Expand Up @@ -175,8 +171,6 @@

else
html += "[name] = <span class='value'>[value]</span>"
if(change)
html += "</font>"

html += "</li>"

Expand Down Expand Up @@ -353,7 +347,6 @@
if(admin_holder && admin_holder.marked_datum)
possible_classes += "marked datum"
possible_classes += "edit referenced object"
possible_classes += "restore to default"

class = tgui_input_list(usr, "What kind of variable?","Variable Type", possible_classes)
if(!class)
Expand All @@ -365,9 +358,6 @@
mod_list(global.vars[variable])
return

if("restore to default")
global.vars[variable] = initial(global.vars[variable])

if("edit referenced object")
return .(global.vars[variable])

Expand Down
2 changes: 1 addition & 1 deletion code/defines/procs/records.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
G.fields["real_rank"] = "Unassigned"
G.fields["sex"] = "Male"
G.fields["age"] = "Unknown"
G.fields["ethnicity"] = "Unknown"
G.fields["skin_color"] = "Unknown"
G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable"
G.fields["species"] = "Human"
Expand Down
50 changes: 48 additions & 2 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
var/xeno_affecting = FALSE
opacity = FALSE
alpha = 75
time_to_live = 20

/obj/effect/particle_effect/smoke/cn20/xeno
name = "CN20-X nerve gas"
Expand All @@ -276,10 +277,14 @@
/obj/effect/particle_effect/smoke/cn20/affect(mob/living/carbon/creature)
var/mob/living/carbon/xenomorph/xeno_creature
var/mob/living/carbon/human/human_creature
var/datum/internal_organ/lungs/lungs
var/datum/internal_organ/eyes/eyes
if(isxeno(creature))
xeno_creature = creature
else if(ishuman(creature))
human_creature = creature
lungs = human_creature.internal_organs_by_name["lungs"]
eyes = human_creature.internal_organs_by_name["eyes"]
if(!istype(creature) || issynth(creature) || creature.stat == DEAD)
return FALSE
if(!xeno_affecting && xeno_creature)
Expand All @@ -297,14 +302,18 @@
if(xeno_creature)
if(xeno_creature.interference < 4)
to_chat(xeno_creature, SPAN_XENOHIGHDANGER("Your awareness dims to a small area!"))
creature.apply_damage(20, BRUTE)
xeno_creature.interference = 10
xeno_creature.blinded = TRUE
else
creature.apply_damage(12, OXY)
creature.apply_damage(12, TOX)
creature.apply_damage(2, BRAIN)
lungs.take_damage(2)
creature.SetEarDeafness(max(creature.ear_deaf, round(effect_amt*1.5))) //Paralysis of hearing system, aka deafness
if(!xeno_creature && !creature.eye_blind) //Eye exposure damage
if(!xeno_creature) //Eye exposure damage
to_chat(creature, SPAN_DANGER("Your eyes sting. You can't see!"))
creature.SetEyeBlind(round(effect_amt/3))
eyes.take_damage(2)
if(!xeno_creature && creature.coughedtime != 1 && !creature.stat) //Coughing/gasping
creature.coughedtime = 1
if(prob(50))
Expand All @@ -330,6 +339,40 @@
human_creature.recalculate_move_delay = TRUE
return TRUE

/////////////////////////////////////////////
// ALD-91 LSD Gas
/////////////////////////////////////////////

/obj/effect/particle_effect/smoke/LSD
name = "ALD-91 LSD Gas"
smokeranking = SMOKE_RANK_HIGH
color = "#6e006e"
opacity = FALSE
alpha = 75
time_to_live = 20
var/stun_chance = 60

/obj/effect/particle_effect/smoke/LSD/Move()
. = ..()
for(var/mob/living/carbon/human/human in get_turf(src))
affect(human)

/obj/effect/particle_effect/smoke/LSD/affect(mob/living/carbon/human/creature)
if(!istype(creature) || issynth(creature) || creature.stat == DEAD || isyautja(creature))
return FALSE

if(creature.wear_mask && (creature.wear_mask.flags_inventory & BLOCKGASEFFECT))
return FALSE
if(creature.head.flags_inventory & BLOCKGASEFFECT)
return FALSE

creature.hallucination += 15
creature.druggy += 1

if(prob(stun_chance))
creature.apply_effect(1, WEAKEN)


//////////////////////////////////////
// FLASHBANG SMOKE
////////////////////////////////////
Expand Down Expand Up @@ -633,6 +676,9 @@
/datum/effect_system/smoke_spread/cn20/xeno
smoke_type = /obj/effect/particle_effect/smoke/cn20/xeno

/datum/effect_system/smoke_spread/LSD
smoke_type = /obj/effect/particle_effect/smoke/LSD

// XENO SMOKES

/datum/effect_system/smoke_spread/xeno_acid
Expand Down
22 changes: 22 additions & 0 deletions code/game/objects/effects/temporary_visuals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,25 @@
splatter_type = "csplatter"
color = BLOOD_COLOR_SYNTHETIC

//------------------------------------------
//Shockwaves
//------------------------------------------

/obj/effect/shockwave
icon = 'icons/effects/light_overlays/shockwave.dmi'
icon_state = "shockwave"
plane = DISPLACEMENT_PLATE_RENDER_LAYER
pixel_x = -496
pixel_y = -496

/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset)
. = ..()
if(!speed)
speed = 1
if(y_offset)
pixel_y += y_offset
if(x_offset)
pixel_x += x_offset
QDEL_IN(src, 0.5 * radius * speed)
transform = matrix().Scale(32 / 1024, 32 / 1024)
animate(src, time = 0.5 * radius * speed, transform=matrix().Scale((32 / 1024) * radius * 1.5, (32 / 1024) * radius * 1.5), easing = easing_type)
Loading

0 comments on commit 69aa5b4

Please sign in to comment.