Skip to content

Commit

Permalink
Merge branch 'project/ares/flightdelfix' into project/ares/tm_holder
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Apr 23, 2024
2 parents b30a7d0 + 5f39b90 commit 4c23734
Show file tree
Hide file tree
Showing 32 changed files with 242 additions and 118 deletions.
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
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
4 changes: 4 additions & 0 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@
new_title = "[record.title] at [record.time]"
new_details = record.details
datacore.records_tech -= record
if(ARES_RECORD_FLIGHT)
new_title = "[record.title] at [record.time]"
new_details = record.details
datacore.records_flight -= record

new_delete.details = new_details
new_delete.user = last_login
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)

15 changes: 8 additions & 7 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -543,27 +543,28 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
log_ahelp(id, "Defer", "Deferred to mentors by [usr.key]", null, usr.ckey)
Close(silent = TRUE)

/datum/admin_help/proc/mark_ticket()
/datum/admin_help/proc/mark_ticket(mob/marking_admin)
var/mob/user = marking_admin || usr
if(marked_admin)
if(marked_admin == usr.ckey)
if(marked_admin == user.ckey)
unmark_ticket()
return
to_chat(usr, SPAN_WARNING("This ticket has already been marked by [marked_admin]."))
var/unmark_option = tgui_alert(usr, "This message has been marked by [marked_admin]. Do you want to override?", "Marked Ticket", list("Overwrite Mark", "Unmark", "Cancel"))
to_chat(user, SPAN_WARNING("This ticket has already been marked by [marked_admin]."))
var/unmark_option = tgui_alert(user, "This message has been marked by [marked_admin]. Do you want to override?", "Marked Ticket", list("Overwrite Mark", "Unmark", "Cancel"))
if(unmark_option == "Unmark")
unmark_ticket()
return
if(unmark_option != "Overwrite Mark")
return

var/key_name = key_name_admin(usr)
var/key_name = key_name_admin(user)
AddInteraction("Marked by [key_name].", player_message = "Ticket marked!")
to_chat(initiator, SPAN_ADMINHELP("An admin is preparing to respond to your ticket."))
var/msg = "Ticket [TicketHref("#[id]")] marked by [key_name]."
message_admins(msg)
log_admin_private(msg)
log_ahelp(id, "Marked", "Marked by [usr.key]", sender = usr.ckey)
marked_admin = usr.ckey
log_ahelp(id, "Marked", "Marked by [user.key]", sender = user.ckey)
marked_admin = user.ckey

/datum/admin_help/proc/unmark_ticket()
var/key_name = key_name_admin(usr)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/admin/verbs/adminpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@

var/message_prompt = "Message:"

if(AH && !AH.marked_admin)
AH.mark_ticket()

if((AH?.opening_responders && length(AH.ticket_interactions) == 1 ) || ((AH?.marked_admin && AH?.marked_admin != usr.ckey) && length(AH.ticket_interactions) == 2))
SEND_SOUND(src, sound('sound/machines/buzz-sigh.ogg', volume=30))
message_prompt += "\n\n**This ticket is already being responded to by: [length(AH.opening_responders) ? english_list(AH.opening_responders) : AH.marked_admin]**"
Expand Down
48 changes: 22 additions & 26 deletions code/modules/cm_marines/marines_consoles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
ui = new(user, src, "CardMod", name)
ui.open()

/obj/structure/machinery/computer/card/ui_act(action, params)
/obj/structure/machinery/computer/card/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return

var/mob/user = usr
var/mob/user = ui.user

playsound(src, pick('sound/machines/computer_typing4.ogg', 'sound/machines/computer_typing5.ogg', 'sound/machines/computer_typing6.ogg'), 5, 1)
switch(action)
Expand Down Expand Up @@ -91,18 +91,11 @@
printing = TRUE
playsound(src.loc, 'sound/machines/fax.ogg', 15, 1)
sleep(40)
var/faction = "N/A"
if(target_id_card.faction_group && islist(target_id_card.faction_group))
faction = jointext(target_id_card.faction_group, ", ")
if(isnull(target_id_card.faction_group))
target_id_card.faction_group = list()
else
faction = target_id_card.faction_group
var/contents = {"<center><h4>Access Report</h4></center>
<u>Prepared By:</u> [user_id_card?.registered_name ? user_id_card.registered_name : "Unknown"]<br>
<u>For:</u> [target_id_card.registered_name ? target_id_card.registered_name : "Unregistered"]<br>
<hr>
<u>Faction:</u> [faction]<br>
<u>Faction:</u> [target_id_card.faction ? target_id_card.faction : "N/A"]<br>
<u>Assignment:</u> [target_id_card.assignment]<br>
<u>Account Number:</u> #[target_id_card.associated_account_number]<br>
<u>Blood Type:</u> [target_id_card.blood_type]<br><br>
Expand All @@ -112,7 +105,10 @@
var/known_access_rights = get_access(ACCESS_LIST_MARINE_ALL)
for(var/A in target_id_card.access)
if(A in known_access_rights)
contents += " [get_access_desc(A)]"
contents += " [get_access_desc(A)]<br>"
contents += "<br><u>Modification Log:</u><br>"
for(var/change in target_id_card.modification_log)
contents += " [change]<br>"

var/obj/item/paper/P = new /obj/item/paper(src.loc)
P.name = "Access Report"
Expand All @@ -139,9 +135,9 @@
GLOB.data_core.manifest_modify(target_id_card.registered_name, target_id_card.registered_ref, target_id_card.assignment, target_id_card.rank)
target_id_card.name = text("[target_id_card.registered_name]'s ID Card ([target_id_card.assignment])")
if(target_id_card.registered_name != origin_name)
log_idmod(target_id_card, "<font color='orange'> [key_name_admin(usr)] changed the registered name of the ID to '[target_id_card.registered_name]'. </font>")
log_idmod(target_id_card, "<font color='orange'> [user.real_name] changed the registered name of the ID to '[target_id_card.registered_name]'. </font>", key_name_admin(user))
if(target_id_card.assignment != origin_assignment)
log_idmod(target_id_card, "<font color='orange'> [key_name_admin(usr)] changed the assignment of the ID to the custom position '[target_id_card.assignment]'. </font>")
log_idmod(target_id_card, "<font color='orange'> [user.real_name] changed the assignment of the ID to the custom position '[target_id_card.assignment]'. </font>", key_name_admin(user))
if(ishuman(user))
target_id_card.forceMove(user.loc)
if(!user.get_active_hand())
Expand Down Expand Up @@ -170,8 +166,8 @@

target_id_card.assignment = "Terminated"
target_id_card.access = list()
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] terminated the ID. </font>")
message_admins("[key_name_admin(usr)] terminated the ID of [target_id_card.registered_name].")
log_idmod(target_id_card, "<font color='red'> [user.real_name] terminated the ID. </font>", key_name_admin(user))
message_admins("[user.real_name] terminated the ID of [target_id_card.registered_name].", key_name_admin(user))
return TRUE
if("PRG_edit")
if(!authenticated || !target_id_card)
Expand Down Expand Up @@ -221,27 +217,27 @@
target_id_card.faction_group = list()
if(params["access_target"] in target_id_card.faction_group)
target_id_card.faction_group -= params["access_target"]
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] revoked [access_type] IFF. </font>")
log_idmod(target_id_card, "<font color='red'> [user.real_name] revoked [access_type] IFF. </font>", key_name_admin(user))
else
target_id_card.faction_group |= params["access_target"]
log_idmod(target_id_card, "<font color='green'> [key_name_admin(usr)] granted [access_type] IFF. </font>")
log_idmod(target_id_card, "<font color='green'> [user.real_name] granted [access_type] IFF. </font>", key_name_admin(user))
return TRUE
access_type = text2num(params["access_target"])
if(access_type in (is_centcom ? get_access(ACCESS_LIST_WY_ALL) : get_access(ACCESS_LIST_MARINE_MAIN)))
if(access_type in target_id_card.access)
target_id_card.access -= access_type
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] revoked access '[access_type]'. </font>")
log_idmod(target_id_card, "<font color='red'> [user.real_name] revoked access '[get_access_desc(access_type)]'. </font>", key_name_admin(user))
else
target_id_card.access |= access_type
log_idmod(target_id_card, "<font color='green'> [key_name_admin(usr)] granted access '[access_type]'. </font>")
log_idmod(target_id_card, "<font color='green'> [user.real_name] granted access '[get_access_desc(access_type)]'. </font>", key_name_admin(user))
return TRUE
if("PRG_grantall")
if(!authenticated || !target_id_card)
return

target_id_card.access |= (is_centcom ? get_access(ACCESS_LIST_WY_ALL) : get_access(ACCESS_LIST_MARINE_MAIN))
target_id_card.faction_group |= factions
log_idmod(target_id_card, "<font color='green'> [key_name_admin(usr)] granted the ID all access and USCM IFF. </font>")
log_idmod(target_id_card, "<font color='green'> [user.real_name] granted the ID all access and USCM IFF. </font>", key_name_admin(user))
return TRUE
if("PRG_denyall")
if(!authenticated || !target_id_card)
Expand All @@ -250,45 +246,45 @@
var/list/access = target_id_card.access
access.Cut()
target_id_card.faction_group -= factions
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] removed all accesses and USCM IFF. </font>")
log_idmod(target_id_card, "<font color='red'> [user.real_name] removed all accesses and USCM IFF. </font>", key_name_admin(user))
return TRUE
if("PRG_grantregion")
if(!authenticated || !target_id_card)
return

if(params["region"] == "Faction (IFF system)")
target_id_card.faction_group |= factions
log_idmod(target_id_card, "<font color='green'> [key_name_admin(usr)] granted USCM IFF. </font>")
log_idmod(target_id_card, "<font color='green'> [user.real_name] granted USCM IFF. </font>", key_name_admin(user))
return TRUE
var/region = text2num(params["region"])
if(isnull(region))
return
target_id_card.access |= get_region_accesses(region)
var/additions = get_region_accesses_name(region)
log_idmod(target_id_card, "<font color='green'> [key_name_admin(usr)] granted all [additions] accesses. </font>")
log_idmod(target_id_card, "<font color='green'> [user.real_name] granted all [additions] accesses. </font>", key_name_admin(user))
return TRUE
if("PRG_denyregion")
if(!authenticated || !target_id_card)
return

if(params["region"] == "Faction (IFF system)")
target_id_card.faction_group -= factions
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] revoked USCM IFF. </font>")
log_idmod(target_id_card, "<font color='red'> [user.real_name] revoked USCM IFF. </font>", key_name_admin(user))
return TRUE
var/region = text2num(params["region"])
if(isnull(region))
return
target_id_card.access -= get_region_accesses(region)
var/additions = get_region_accesses_name(region)
log_idmod(target_id_card, "<font color='red'> [key_name_admin(usr)] revoked all [additions] accesses. </font>")
log_idmod(target_id_card, "<font color='red'> [user.real_name] revoked all [additions] accesses. </font>", key_name_admin(user))
return TRUE
if("PRG_account")
if(!authenticated || !target_id_card)
return

var/account = text2num(params["account"])
target_id_card.associated_account_number = account
log_idmod(target_id_card, "<font color='orange'> [key_name_admin(usr)] changed the account number to '[account]'. </font>")
log_idmod(target_id_card, "<font color='orange'> [user.real_name] changed the account number to '[account]'. </font>", key_name_admin(user))
return TRUE

/obj/structure/machinery/computer/card/ui_static_data(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!SSticker.HasRoundStarted())
var/time_remaining = SSticker.GetTimeLeft()
if(time_remaining > 0)
. += "Time To Start: [round(time_remaining)]s"
. += "Time To Start: [round(time_remaining)]s[SSticker.delay_start ? " (DELAYED)" : ""]"
else if(time_remaining == -10)
. += "Time To Start: DELAYED"
else
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

playsound(xeno.loc, pick(xeno.screech_sound_effect_list), 75, 0, status = 0)
xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits an ear-splitting guttural roar!"))
xeno.create_shriekwave() //Adds the visual effect. Wom wom wom
xeno.create_shriekwave(14) //Adds the visual effect. Wom wom wom, 14 shriekwaves

for(var/mob/mob in view())
if(mob && mob.client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

playsound(xeno.loc, pick(predalien_roar), 75, 0, status = 0)
xeno.visible_message(SPAN_XENOHIGHDANGER("[xeno] emits a guttural roar!"))
xeno.create_shriekwave(color = "#FF0000")

xeno.create_shriekwave(7) //Adds the visual effect. Wom wom wom, 7 shriekwaves
for(var/mob/living/carbon/carbon in view(7, xeno))
if(ishuman(carbon))
var/mob/living/carbon/human/human = carbon
Expand Down
Loading

0 comments on commit 4c23734

Please sign in to comment.