Skip to content

Commit

Permalink
Merge branch 'master' into SMOKE-FLAMER
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveloopers authored Apr 24, 2024
2 parents 695ca15 + 88955d7 commit ca1fe84
Show file tree
Hide file tree
Showing 42 changed files with 414 additions and 131 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
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
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
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
5 changes: 2 additions & 3 deletions code/datums/ammo/bullet/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
/datum/ammo/bullet/revolver
name = "revolver bullet"
headshot_state = HEADSHOT_OVERLAY_MEDIUM

damage = 55
damage = 72
penetration = ARMOR_PENETRATION_TIER_1
accuracy = HIT_ACCURACY_TIER_1

/datum/ammo/bullet/revolver/marksman
name = "marksman revolver bullet"

damage = 55
shrapnel_chance = 0
damage_falloff = 0
accurate_range = 12
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
12 changes: 9 additions & 3 deletions code/datums/effects/bleeding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
if(affected_mob.reagents.get_reagent_amount("thwei"))
blood_loss -= THWEI_BLOOD_REDUCTION

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
var/obj/structure/machinery/cryo_cell/cryo = affected_mob.loc
if(istype(cryo) && cryo.on && cryo.operable())
blood_loss -= CRYO_BLOOD_REDUCTION

var/mob/living/carbon/human/affected_human = affected_mob
if(istype(affected_human))
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
Expand All @@ -95,18 +100,19 @@
if(affected_mob.in_stasis == STASIS_IN_BAG)
return FALSE

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents && affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
blood_loss -= CRYO_BLOOD_REDUCTION

if(affected_mob.reagents) // Annoying QC check
if(affected_mob.reagents.get_reagent_amount("thwei"))
blood_loss -= THWEI_BLOOD_REDUCTION

if(affected_mob.bodytemperature < T0C && (affected_mob.reagents.get_reagent_amount("cryoxadone") || affected_mob.reagents.get_reagent_amount("clonexadone")))
blood_loss -= CRYO_BLOOD_REDUCTION

var/mob/living/carbon/human/affected_human = affected_mob
if(istype(affected_human))
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
return FALSE

blood_loss = max(blood_loss, 0) // Bleeding shouldn't give extra blood even if its only 1 tick
affected_mob.blood_volume = max(affected_mob.blood_volume - blood_loss, 0)

return TRUE
Expand Down
1 change: 1 addition & 0 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ COMMAND STAFF
SKILL_LEADERSHIP = SKILL_LEAD_EXPERT,
SKILL_OVERWATCH = SKILL_OVERWATCH_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_MEDIC,
SKILL_SURGERY = SKILL_SURGERY_NOVICE,
SKILL_POLICE = SKILL_POLICE_FLASH,
SKILL_FIREMAN = SKILL_FIREMAN_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_SMALL,
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bioscan.Add(new /datum/ares_record/bioscan(title, input))

/proc/log_ares_bombardment(user_name, ob_name, coordinates)
/proc/log_ares_bombardment(user_name, ob_name, message)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, "Bombardment fired at [coordinates].", user_name))
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, message, user_name))

/proc/log_ares_announcement(title, message)
if(!ares_can_log())
Expand Down
94 changes: 79 additions & 15 deletions code/game/machinery/kitchen/gibber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,28 @@
to_chat(user, SPAN_WARNING("You need a better grip to do that!"))
return

if(victim.abiotic(1))
if(victim.abiotic(TRUE))
to_chat(user, SPAN_WARNING("Subject may not have abiotic items on."))
return

user.visible_message(SPAN_DANGER("[user] starts to put [victim] into the gibber!"))
add_fingerprint(user)

///If synth is getting gibbed, we will 'soft gib' them, but this is still pretty LRP so let admin know.
if(issynth(victim) && ishuman_strict(user) && !occupant)
var/turf/turf_ref = get_turf(user)
var/area/area = get_area(user)
message_admins("ALERT: [user] ([user.key]) is trying to shove [victim] in a gibber! (They are a synth, so this will delimb them) ([victim.key]) in [area.name] [ADMIN_JMP(turf_ref)]</font>")
log_attack("[key_name(user)] tried to delimb [victim] using a gibber ([victim.key]) in [area.name]")
to_chat(user, SPAN_DANGER("What are you doing..."))
if(do_after(user, 30 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE && grabbed && grabbed.grabbed_thing && !occupant))
user.visible_message(SPAN_DANGER("[user] stuffs [victim] into the gibber!"))
victim.forceMove(src)
occupant = victim
update_icon()

///If someone's being LRP and doing funny chef shit, this lets admins know. This *shouldn't* flag preds, though.
if(ishuman(victim) && ishuman_strict(user) && !occupant)
else if(ishuman(victim) && ishuman_strict(user) && !occupant)
var/turf/turf_ref = get_turf(user)
var/area/area = get_area(user)
message_admins("ALERT: [user] ([user.key]) is trying to gib [victim] ([victim.key]) in [area.name] [ADMIN_JMP(turf_ref)]</font>")
Expand Down Expand Up @@ -142,18 +155,23 @@
add_fingerprint(usr)
return

/obj/structure/machinery/gibber/proc/go_out()
/obj/structure/machinery/gibber/proc/go_out(launch = FALSE)
if (!occupant)
return
return FALSE
for(var/obj/O in src)
O.forceMove(loc)
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(loc)
if(launch)
// yeet them out of the gibber
visible_message(SPAN_DANGER("[occupant] suddenly is launched out of the [src]!"))
var/turf/Tx = locate(x - 3, y, z)
occupant.throw_atom(Tx, 3, SPEED_FAST, src, TRUE)
occupant = null
update_icon()
return
return TRUE


/obj/structure/machinery/gibber/proc/startgibbing(mob/user as mob)
Expand All @@ -162,13 +180,18 @@
if(!occupant)
visible_message(SPAN_DANGER("You hear a loud metallic grinding sound."))
return
var/synthetic = issynth(occupant)
use_power(1000)
visible_message(SPAN_DANGER("You hear a loud squelchy grinding sound."))
operating = 1
if(synthetic)
visible_message(SPAN_BOLDWARNING("[src] begins to emitt sparks out the top as a banging noise can be heard!"), SPAN_BOLDWARNING("You hear a myriad of loud bangs!"))
else
visible_message(SPAN_DANGER("You hear a loud squelchy grinding sound."))
operating = TRUE
update_icon()

var/totalslabs = 2


var/obj/item/reagent_container/food/snacks/meat/meat_template = /obj/item/reagent_container/food/snacks/meat/monkey
if(istype(occupant, /mob/living/carbon/xenomorph))
var/mob/living/carbon/xenomorph/X = occupant
Expand All @@ -186,6 +209,35 @@
meat_template = /obj/item/reagent_container/food/snacks/meat/human
totalslabs = 3

// Synths only get delimbed from this. 1 meat per limb
if(synthetic)
meat_template = /obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh
totalslabs = 0
var/mob/living/carbon/human/victim = occupant

// Remove all limbs to allow synth to park closer at the supermarket
var/obj/limb/limb

if(victim.has_limb("l_leg"))
limb = victim.get_limb("r_leg")
totalslabs += 1
limb.droplimb(FALSE, TRUE, "gibber")

if(victim.has_limb("l_leg"))
limb = victim.get_limb("l_leg")
totalslabs += 1
limb.droplimb(FALSE, TRUE, "gibber")

if(victim.has_limb("r_arm"))
limb = victim.get_limb("r_arm")
totalslabs += 1
limb.droplimb(FALSE, TRUE, "gibber")

if(victim.has_limb("l_arm"))
limb = victim.get_limb("l_arm")
totalslabs += 1
limb.droplimb(FALSE, TRUE, "gibber")

var/obj/item/reagent_container/food/snacks/meat/allmeat[totalslabs]
for(var/i in 1 to totalslabs)
var/obj/item/reagent_container/food/snacks/meat/newmeat
Expand All @@ -194,26 +246,38 @@
newmeat.name = newmeat.made_from_player + newmeat.name
allmeat[i] = newmeat

if(src.occupant.client) // Gibbed a cow with a client in it? log that shit
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[key_name(user)]</b>"
// Synths wont die to this (on it's own at least), dont log as a gib
if(synthetic)
if(occupant.client) // Log still
occupant.attack_log += "\[[time_stamp()]\] Was delimbed by <b>[key_name(user)]</b>"
user.attack_log += "\[[time_stamp()]\] delimbed <b>[key_name(occupant)]</b>"
msg_admin_attack("[key_name(user)] delimbed [key_name(occupant)] with a gibber in [user.loc.name]([user.x], [user.y], [user.z]).", user.x, user.y, user.z)
continue

if(occupant.client) // Gibbed a cow with a client in it? log that shit
occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[key_name(user)]</b>"
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[key_name(occupant)]</b>"
msg_admin_attack("[key_name(user)] gibbed [key_name(occupant)] in [user.loc.name] ([user.x], [user.y], [user.z]).", user.x, user.y, user.z)

src.occupant.death(create_cause_data("gibber", user), TRUE)
src.occupant.ghostize()
occupant.death(create_cause_data("gibber", user), TRUE)
occupant.ghostize()

QDEL_NULL(occupant)
if(synthetic)
to_chat(occupant, SPAN_HIGHDANGER("You can detect your limbs being ripped off your body, but it begins to malfunction as it reaches your torso!"))
addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime)
addtimer(CALLBACK(src, PROC_REF(go_out), TRUE), gibtime)
return

addtimer(CALLBACK(src, PROC_REF(create_gibs), totalslabs, allmeat), gibtime)
QDEL_NULL(occupant)

/obj/structure/machinery/gibber/proc/create_gibs(totalslabs, list/obj/item/reagent_container/food/snacks/allmeat)
playsound(loc, 'sound/effects/splat.ogg', 25, 1)
operating = FALSE
var/turf/Tx = locate(x - 1, y, z)
for (var/i in 1 to totalslabs)
var/obj/item/meatslab = allmeat[i]
var/turf/Tx = locate(x - i, y, z)
meatslab.forceMove(loc)
meatslab.throw_atom(Tx, i, SPEED_FAST, src)
meatslab.throw_atom(Tx, 1, SPEED_FAST, src)
if (!Tx.density)
if(istype(meatslab, /obj/item/reagent_container/food/snacks/meat/xenomeat))
new /obj/effect/decal/cleanable/blood/gibs/xeno(Tx)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@
if(isyautja(M) || isxeno(M))
burn_damage *= xeno_yautja_reduction

var/reagent = new /datum/reagent/napalm/ut()
M.burn_skin(burn_damage)
M.adjust_fire_stacks(applied_fire_stacks)
M.fire_reagent = new /datum/reagent/napalm/ut()
M.adjust_fire_stacks(applied_fire_stacks, reagent)
M.IgniteMob()
M.updatehealth()

Expand Down
23 changes: 23 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,26 @@
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)

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
name = "synthetic meat"
desc = "A synthetic slab of flesh."

/obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh //meat made from synthetics. Slightly toxic
/// Meat made from synthetics. Slightly toxic
/obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh
name = "synthetic flesh"
desc = "A slab of artificial, inorganic 'flesh' that resembles human meat. Probably came from a synth."
icon_state = "synthmeat"
Expand Down
19 changes: 19 additions & 0 deletions code/game/objects/structures/reagent_dispensers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@
if(N)
amount_per_transfer_from_this = N

/obj/structure/reagent_dispensers/clicked(mob/user, list/mods)
if(!Adjacent(user))
return ..()

if(!ishuman(user))
return ..()

if(!reagents || reagents.locked)
return ..()

if(mods["alt"])
dispensing = !dispensing
if(dispensing)
to_chat(user, SPAN_NOTICE("[src] is now dispensing"))
else
to_chat(user, SPAN_NOTICE("[src] is now filling"))
return TRUE
return ..()

/obj/structure/reagent_dispensers/attackby(obj/item/hit_item, mob/living/user)
if(istype(hit_item, /obj/item/reagent_container))
return
Expand Down
Loading

0 comments on commit ca1fe84

Please sign in to comment.