Skip to content

Commit

Permalink
Global shit
Browse files Browse the repository at this point in the history
  • Loading branch information
AmShegars committed Dec 17, 2023
1 parent 4b8dbeb commit 306e764
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 3 additions & 1 deletion code/__defines/antagonists.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define ANTAG_SERVANT "servant"
#define ANTAG_APPRENTICE "apprentice"
#define ANTAG_WIZARD "Space Wizard"
#define ANTAG_WIZARD "Space Wizard"
GLOBAL_VAR_INIT(MaxMech, 0)
GLOBAL_VAR_INIT(WarDeclared, 0)
2 changes: 0 additions & 2 deletions code/datums/uplink/uplink_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ var/datum/uplink/uplink = new()
var/list/datum/antagonist/antag_roles = list("Exclude", MODE_DEITY) // Antag roles this item is displayed to. If empty, display to all. If it includes 'Exclude", anybody except this role can view it

/datum/uplink_item/item
var/static/MAX_MECH = 0
var/static/WAR_DECLARED = FALSE
var/path = null

/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
Expand Down
6 changes: 3 additions & 3 deletions infinity/code/datums/uplink/badassery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
antag_roles = list(MODE_MERCENARY)

/datum/uplink_item/item/badassery/mech/get_goods(var/obj/item/device/uplink/U, var/loc)
if(WAR_DECLARED == FALSE)
if(GLOB.WarDeclared == FALSE)
U.visible_message("[U.loc] Война не обьявлена, бронетехника не может быть вызвана. Обьявите войну для получения доступа к бронетехнике.\"")
return new /obj/item/stack/telecrystal(loc, 400)
if(MAX_MECH <= 0)
if(GLOB.MaxMech <= 0)
U.visible_message("[U.loc] Превышен лимит бронетехники для данной миссии.\"")
return new /obj/item/stack/telecrystal(loc, 400)
MAX_MECH--
GLOB.MaxMech--
U.visible_message("[U.loc] Запрос на бронетехнику Горлекса обработан, единица телепортирована на ваше местоположение.\"")
command_announcement.Announce("В секторе была замечена телепортация бронетехники Мародёров Горлекса.", "Показания датчиков [station_name()]" , msg_sanitized = 1, zlevels = GLOB.using_map.station_levels)
return new /mob/living/exosuit/premade/merc(loc)
Expand Down
6 changes: 3 additions & 3 deletions infinity/code/datums/uplink/services.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
antag_roles = list(MODE_MERCENARY)

/datum/uplink_item/item/services/assault_declaration/get_goods(var/obj/item/device/uplink/U, var/loc)
if(world.time > 10 MINUTES)
if(world.time > 10 MINUTES && GLOB.WarDeclared)
U.visible_message("[U.loc] buzzez and declares, \"Unable to teleport telecrystals.\"")
return 0
command_announcement.Announce("В секторе была замечена телепортация большого объема телекристаллов, использующихся Горлекскими Мародерами. Рекомендуется вызвать поддержку с ЦК для урегулирования ситуации.", "Показания датчиков [station_name()]" , msg_sanitized = 1, zlevels = GLOB.using_map.station_levels)
MAX_MECH = 2
WAR_DECLARED = TRUE
GLOB.MaxMech = 2
GLOB.WarDeclared = TRUE
return new /obj/item/stack/telecrystal(loc, 781)
4 changes: 2 additions & 2 deletions infinity/code/modules/mechs/premade/ERT.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "Nanotrasen special combat mech"
desc = "A sleek, modern combat exosuit created by Nanotrasen for specific missions."

/mob/living/exosuit/premade/Ert/Initialize()
/mob/living/exosuit/premade/ert/Initialize()
if(!arms)
arms = new /obj/item/mech_component/manipulators/Ert(src)
arms = new /obj/item/mech_component/manipulators/ert(src)
arms.color = COLOR_CYAN_BLUE
if(!legs)
legs = new /obj/item/mech_component/propulsion/merc(src)
Expand Down

0 comments on commit 306e764

Please sign in to comment.