Files
Bubberstation/code/modules/buildmode/submodes/smite.dm
SkyratBot 7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00

41 lines
1.2 KiB
Plaintext

/datum/buildmode_mode/smite
key = "smite"
var/datum/smite/selected_smite
/datum/buildmode_mode/smite/Destroy()
selected_smite = null
return ..()
/datum/buildmode_mode/smite/show_help(client/user)
to_chat(user, "<span class='notice'>***********************************************************\n\
Right Mouse Button on buildmode button = Select smite to use.\n\
Left Mouse Button on mob/living = Smite the mob.\n\
***********************************************************</span>")
/datum/buildmode_mode/smite/change_settings(client/user)
var/punishment = input(user, "Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
var/smite_path = GLOB.smites[punishment]
var/datum/smite/picking_smite = new smite_path
var/configuration_success = picking_smite.configure(user)
if (configuration_success == FALSE)
return
selected_smite = picking_smite
/datum/buildmode_mode/smite/handle_click(client/user, params, object)
var/list/modifiers = params2list(params)
if (!check_rights(R_ADMIN | R_FUN))
return
if (!LAZYACCESS(modifiers, LEFT_CLICK))
return
if (!isliving(object))
return
if (selected_smite == null)
to_chat(user, span_notice("No smite selected."))
return
selected_smite.effect(user, object)