Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a new verb that calls for help over nearby radios #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
*
* Parent call
*/

/mob/living
var/last_radio_assist = 0 // To prevent spam


/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
remove_from_mob_list()
remove_from_dead_mob_list()
Expand Down Expand Up @@ -685,6 +690,29 @@
else
to_chat(src, "You don't have a mind datum for some reason, so you can't look at your notes, if you had any.")

/mob/verb/radio_assist()
set name = "Radio Assist"
set category = "IC"
set desc = "Call for help using nearby radios."

var/turf/T = get_turf(src)
if(!T)
return

var/area/A = get_area(src)
if(!A)
return

var/obj/item/radio/R = locate() in range(1, src)
if(!R)
to_chat(src, "<span class='warning'>There are no radios nearby to use!</span>")
return

var/message = "[src] is calling for help at [T.x], [T.y], [T.z] ([A.name])"
R.talk_into(src, message, null, list(SPAN_COMMAND, SPAN_ROBOT))

to_chat(src, "<span class='notice'>You call for help using the nearby [R.name].</span>")

/**
* Add a note to the mind datum
*/
Expand Down
Loading