Weaponizes station charters (#1449)
This commit is contained in:
committed by
kevinz000
parent
8157797dff
commit
44f4059968
@@ -1,6 +1,6 @@
|
|||||||
#define STATION_RENAME_TIME_LIMIT 3000
|
#define STATION_RENAME_TIME_LIMIT 3000
|
||||||
|
|
||||||
/obj/item/station_charter
|
/obj/item/weapon/station_charter
|
||||||
name = "station charter"
|
name = "station charter"
|
||||||
icon = 'icons/obj/wizard.dmi'
|
icon = 'icons/obj/wizard.dmi'
|
||||||
icon_state = "scroll2"
|
icon_state = "scroll2"
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
var/static/regex/standard_station_regex
|
var/static/regex/standard_station_regex
|
||||||
|
|
||||||
/obj/item/station_charter/New()
|
/obj/item/weapon/station_charter/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(!standard_station_regex)
|
if(!standard_station_regex)
|
||||||
var/prefixes = jointext(GLOB.station_prefixes, "|")
|
var/prefixes = jointext(GLOB.station_prefixes, "|")
|
||||||
@@ -26,13 +26,13 @@
|
|||||||
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
|
var/regexstr = "(([prefixes]) )?(([names]) ?)([suffixes]) ([numerals])"
|
||||||
standard_station_regex = new(regexstr)
|
standard_station_regex = new(regexstr)
|
||||||
|
|
||||||
/obj/item/station_charter/Destroy()
|
/obj/item/weapon/station_charter/Destroy()
|
||||||
if(response_timer_id)
|
if(response_timer_id)
|
||||||
deltimer(response_timer_id)
|
deltimer(response_timer_id)
|
||||||
response_timer_id = null
|
response_timer_id = null
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/item/station_charter/attack_self(mob/living/user)
|
/obj/item/weapon/station_charter/attack_self(mob/living/user)
|
||||||
if(used)
|
if(used)
|
||||||
to_chat(user, "The [name_type] has already been named.")
|
to_chat(user, "The [name_type] has already been named.")
|
||||||
return
|
return
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
|
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
|
||||||
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;reject_custom_name=\ref[src]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
|
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;reject_custom_name=\ref[src]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
|
||||||
|
|
||||||
/obj/item/station_charter/proc/reject_proposed(user)
|
/obj/item/weapon/station_charter/proc/reject_proposed(user)
|
||||||
if(!user)
|
if(!user)
|
||||||
return
|
return
|
||||||
if(!response_timer_id)
|
if(!response_timer_id)
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
deltimer(response_timer_id)
|
deltimer(response_timer_id)
|
||||||
response_timer_id = null
|
response_timer_id = null
|
||||||
|
|
||||||
/obj/item/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
|
/obj/item/weapon/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
|
||||||
set_station_name(designation)
|
set_station_name(designation)
|
||||||
minor_announce("[ureal_name] has designated your station as [station_name()]", "Captain's Charter", 0)
|
minor_announce("[ureal_name] has designated your station as [station_name()]", "Captain's Charter", 0)
|
||||||
log_game("[ukey] has renamed the station as [station_name()].")
|
log_game("[ukey] has renamed the station as [station_name()].")
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
if(!unlimited_uses)
|
if(!unlimited_uses)
|
||||||
used = TRUE
|
used = TRUE
|
||||||
|
|
||||||
/obj/item/station_charter/admin
|
/obj/item/weapon/station_charter/admin
|
||||||
unlimited_uses = TRUE
|
unlimited_uses = TRUE
|
||||||
ignores_timeout = TRUE
|
ignores_timeout = TRUE
|
||||||
|
|
||||||
@@ -99,14 +99,14 @@
|
|||||||
/obj/item/weapon/station_charter/flag
|
/obj/item/weapon/station_charter/flag
|
||||||
name = "nanotrasen banner"
|
name = "nanotrasen banner"
|
||||||
icon = 'icons/obj/items.dmi'
|
icon = 'icons/obj/items.dmi'
|
||||||
var/name_type = "planet"
|
name_type = "planet"
|
||||||
icon_state = "banner"
|
icon_state = "banner"
|
||||||
item_state = "banner"
|
item_state = "banner"
|
||||||
desc = "A cunning device used to claim ownership of planets."
|
desc = "A cunning device used to claim ownership of planets."
|
||||||
w_class = 5
|
w_class = 5
|
||||||
force = 15
|
force = 15
|
||||||
|
|
||||||
/obj/item/station_charter/flag/rename_station(designation, uname, ureal_name, ukey)
|
/obj/item/weapon/station_charter/flag/rename_station(designation, uname, ureal_name, ukey)
|
||||||
set_station_name(designation)
|
set_station_name(designation)
|
||||||
minor_announce("[ureal_name] has designated the planet as [station_name()]", "Captain's Banner", 0)
|
minor_announce("[ureal_name] has designated the planet as [station_name()]", "Captain's Banner", 0)
|
||||||
log_game("[ukey] has renamed the planet as [station_name()].")
|
log_game("[ukey] has renamed the planet as [station_name()].")
|
||||||
@@ -116,6 +116,4 @@
|
|||||||
if(!unlimited_uses)
|
if(!unlimited_uses)
|
||||||
used = TRUE
|
used = TRUE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#undef STATION_RENAME_TIME_LIMIT
|
#undef STATION_RENAME_TIME_LIMIT
|
||||||
@@ -1739,7 +1739,7 @@
|
|||||||
else if(href_list["reject_custom_name"])
|
else if(href_list["reject_custom_name"])
|
||||||
if(!check_rights(R_ADMIN))
|
if(!check_rights(R_ADMIN))
|
||||||
return
|
return
|
||||||
var/obj/item/station_charter/charter = locate(href_list["reject_custom_name"])
|
var/obj/item/weapon/station_charter/charter = locate(href_list["reject_custom_name"])
|
||||||
if(istype(charter))
|
if(istype(charter))
|
||||||
charter.reject_proposed(usr)
|
charter.reject_proposed(usr)
|
||||||
else if(href_list["jumpto"])
|
else if(href_list["jumpto"])
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ Captain
|
|||||||
suit = /obj/item/clothing/suit/armor/vest/capcarapace
|
suit = /obj/item/clothing/suit/armor/vest/capcarapace
|
||||||
shoes = /obj/item/clothing/shoes/sneakers/brown
|
shoes = /obj/item/clothing/shoes/sneakers/brown
|
||||||
head = /obj/item/clothing/head/caphat
|
head = /obj/item/clothing/head/caphat
|
||||||
backpack_contents = list(/obj/item/weapon/melee/classic_baton/telescopic=1, /obj/item/station_charter=1)
|
backpack_contents = list(/obj/item/weapon/melee/classic_baton/telescopic=1, /obj/item/weapon/station_charter=1)
|
||||||
|
|
||||||
backpack = /obj/item/weapon/storage/backpack/captain
|
backpack = /obj/item/weapon/storage/backpack/captain
|
||||||
satchel = /obj/item/weapon/storage/backpack/satchel/cap
|
satchel = /obj/item/weapon/storage/backpack/satchel/cap
|
||||||
|
|||||||
+1
-1
@@ -747,7 +747,6 @@
|
|||||||
#include "code\game\objects\items\bodybag.dm"
|
#include "code\game\objects\items\bodybag.dm"
|
||||||
#include "code\game\objects\items\candle.dm"
|
#include "code\game\objects\items\candle.dm"
|
||||||
#include "code\game\objects\items\cardboard_cutouts.dm"
|
#include "code\game\objects\items\cardboard_cutouts.dm"
|
||||||
#include "code\game\objects\items\charter.dm"
|
|
||||||
#include "code\game\objects\items\control_wand.dm"
|
#include "code\game\objects\items\control_wand.dm"
|
||||||
#include "code\game\objects\items\crayons.dm"
|
#include "code\game\objects\items\crayons.dm"
|
||||||
#include "code\game\objects\items\dehy_carp.dm"
|
#include "code\game\objects\items\dehy_carp.dm"
|
||||||
@@ -817,6 +816,7 @@
|
|||||||
#include "code\game\objects\items\weapons\AI_modules.dm"
|
#include "code\game\objects\items\weapons\AI_modules.dm"
|
||||||
#include "code\game\objects\items\weapons\airlock_painter.dm"
|
#include "code\game\objects\items\weapons\airlock_painter.dm"
|
||||||
#include "code\game\objects\items\weapons\cards_ids.dm"
|
#include "code\game\objects\items\weapons\cards_ids.dm"
|
||||||
|
#include "code\game\objects\items\weapons\charter.dm"
|
||||||
#include "code\game\objects\items\weapons\chrono_eraser.dm"
|
#include "code\game\objects\items\weapons\chrono_eraser.dm"
|
||||||
#include "code\game\objects\items\weapons\cigs_lighters.dm"
|
#include "code\game\objects\items\weapons\cigs_lighters.dm"
|
||||||
#include "code\game\objects\items\weapons\clown_items.dm"
|
#include "code\game\objects\items\weapons\clown_items.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user