Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kirieee authored Nov 19, 2023
2 parents 5a16ce4 + 9e45fbc commit f2f3cf4
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 10 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.6.2"
#define TGS_DMAPI_VERSION "6.7.0"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down
6 changes: 6 additions & 0 deletions code/_onclick/hud/radial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ GLOBAL_LIST_EMPTY(radial_menus)


/atom/movable/screen/radial/slice/clicked(mob/user)
if(QDELETED(src))
return

if(!parent)
CRASH("clicked() called on a radial slice with a null parent while not deleted/deleting")

if(user.client == parent.current_user)
if(next_page)
parent.next_page()
Expand Down
6 changes: 6 additions & 0 deletions code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,12 @@ var/list/datum/mob_hud/huds = list(
return

/mob/living/carbon/xenomorph/med_hud_set_health()
if(QDELETED(src))
return

if(!(HEALTH_HUD_XENO in hud_list))
CRASH("hud_list lacks HEALTH_HUD_XENO despite not being deleted in med_hud_set_health()")

var/image/holder = hud_list[HEALTH_HUD_XENO]

var/health_hud_type = "xenohealth"
Expand Down
6 changes: 4 additions & 2 deletions code/game/objects/items/explosives/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/obj/item/explosive/plastic/Destroy()
disarm()
. = ..()
return ..()

/obj/item/explosive/plastic/explosion_throw(severity, direction, scatter_multiplier)
if(active)
Expand Down Expand Up @@ -156,7 +156,9 @@
plant_target.overlays -= overlay
qdel(overlay)
plant_target.contents -= src
forceMove(get_turf(plant_target))
var/turf/plant_turf = get_turf(plant_target)
if(plant_turf)
forceMove(plant_turf)
plant_target = null
if(customizable)
if(active) //deactivate
Expand Down
8 changes: 7 additions & 1 deletion code/modules/admin/verbs/adminjump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
if(!src.mob)
return

var/list/area_turfs = get_area_turfs(A)

if(!length(area_turfs))
to_chat(src, "There aren't any turfs in this area!")
return

if(!isobserver(mob))
src.admin_ghost()

src.mob.on_mob_jump()
src.mob.forceMove(pick(get_area_turfs(A)))
src.mob.forceMove(pick(area_turfs))

message_admins(WRAP_STAFF_LOG(usr, "jumped to area [get_area(usr)] ([usr.loc.x],[usr.loc.y],[usr.loc.z])."), usr.loc.x, usr.loc.y, usr.loc.z)

Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/XenoProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,12 @@
to_chat(src, SPAN_INFO("shift click the compass to watch the mark, alt click to stop tracking"))

/mob/living/carbon/xenomorph/proc/stop_tracking_resin_mark(destroyed, silent = FALSE) //tracked_marker shouldnt be nulled outside this PROC!! >:C
if(QDELETED(src))
return

if(!hud_used)
CRASH("hud_used is null in stop_tracking_resin_mark")

var/atom/movable/screen/mark_locator/ML = hud_used.locate_marker
ML.overlays.Cut()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/specialist/sniper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
target.overlays -= lockon_direction_icon
qdel(laser_beam)

if(!check_can_use(target, TRUE))
if(!check_can_use(target, TRUE) || target.is_dead())
return

var/obj/projectile/aimed_proj = sniper_rifle.in_chamber
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgs/v5/__interop_version.dm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"5.6.2"
"5.7.0"
2 changes: 2 additions & 0 deletions code/modules/tgs/v5/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH 8
#define DMAPI5_TOPIC_COMMAND_SEND_CHUNK 9
#define DMAPI5_TOPIC_COMMAND_RECEIVE_CHUNK 10
#define DMAPI5_TOPIC_COMMAND_RECEIVE_BROADCAST 11

#define DMAPI5_TOPIC_PARAMETER_COMMAND_TYPE "commandType"
#define DMAPI5_TOPIC_PARAMETER_CHAT_COMMAND "chatCommand"
Expand All @@ -89,6 +90,7 @@
#define DMAPI5_TOPIC_PARAMETER_NEW_INSTANCE_NAME "newInstanceName"
#define DMAPI5_TOPIC_PARAMETER_CHAT_UPDATE "chatUpdate"
#define DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION "newServerVersion"
#define DMAPI5_TOPIC_PARAMETER_BROADCAST_MESSAGE "broadcastMessage"

#define DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE "commandResponse"
#define DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE "commandResponseMessage"
Expand Down
20 changes: 16 additions & 4 deletions code/modules/tgs/v5/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
if(DMAPI5_TOPIC_COMMAND_CHANGE_PORT)
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
if (!isnum(new_port) || !(new_port > 0))
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]")
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]")

if(event_handler != null)
event_handler.HandleEvent(TGS_EVENT_PORT_SWAP, new_port)
Expand Down Expand Up @@ -141,7 +141,7 @@
if(DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE)
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
if (!isnum(new_port) || !(new_port > 0))
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]")
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]")

server_port = new_port
return TopicResponse()
Expand All @@ -157,15 +157,15 @@
var/error_message = null
if (new_port != null)
if (!isnum(new_port) || !(new_port > 0))
error_message = "Invalid [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]"
error_message = "Invalid [DMAPI5_TOPIC_PARAMETER_NEW_PORT]"
else
server_port = new_port

var/new_version_string = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]
if (!istext(new_version_string))
if(error_message != null)
error_message += ", "
error_message += "Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]]"
error_message += "Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]"
else
var/datum/tgs_version/new_version = new(new_version_string)
if (event_handler)
Expand Down Expand Up @@ -267,4 +267,16 @@

return chunk_to_send

if(DMAPI5_TOPIC_COMMAND_RECEIVE_BROADCAST)
var/message = topic_parameters[DMAPI5_TOPIC_PARAMETER_BROADCAST_MESSAGE]
if (!istext(message))
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_BROADCAST_MESSAGE]")

TGS_WORLD_ANNOUNCE(message)
return TopicResponse()

return TopicResponse("Unknown command: [command]")

/datum/tgs_api/v5/proc/WorldBroadcast(message)
set waitfor = FALSE
TGS_WORLD_ANNOUNCE(message)
4 changes: 4 additions & 0 deletions code/modules/tgs/v5/undefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
#undef DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE
#undef DMAPI5_TOPIC_COMMAND_HEALTHCHECK
#undef DMAPI5_TOPIC_COMMAND_WATCHDOG_REATTACH
#undef DMAPI5_TOPIC_COMMAND_SEND_CHUNK
#undef DMAPI5_TOPIC_COMMAND_RECEIVE_CHUNK
#undef DMAPI5_TOPIC_COMMAND_RECEIVE_BROADCAST

#undef DMAPI5_TOPIC_PARAMETER_COMMAND_TYPE
#undef DMAPI5_TOPIC_PARAMETER_CHAT_COMMAND
Expand All @@ -87,6 +90,7 @@
#undef DMAPI5_TOPIC_PARAMETER_NEW_INSTANCE_NAME
#undef DMAPI5_TOPIC_PARAMETER_CHAT_UPDATE
#undef DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION
#undef DMAPI5_TOPIC_PARAMETER_BROADCAST_MESSAGE

#undef DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE
#undef DMAPI5_TOPIC_RESPONSE_COMMAND_RESPONSE_MESSAGE
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4946.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Zonespace27"
delete-after: True
changes:
- bugfix: "Jump-to-area verb will now warn you if there aren't any turfs in the given area."

0 comments on commit f2f3cf4

Please sign in to comment.