Skip to content

Commit

Permalink
Merge branch 'project/ares/supplydrop' into project/ares/tm_holder
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Apr 5, 2024
2 parents e5bf69f + 3669ae8 commit 4929558
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 28 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
// target_hive integer the target hive to see if the source_hive is allied to it.
#define HIVE_ALLIED_TO_HIVE(source_hive, target_hive) ((source_hive) == (target_hive) || GLOB.hive_datum[source_hive]?.faction_is_ally(GLOB.hive_datum[target_hive]?.internal_faction))

#define QUEEN_SPAWN_TIMEOUT (2 MINUTES)
#define QUEEN_SPAWN_TIMEOUT (1 MINUTES)

#define FIRE_IMMUNITY_NONE 0
#define FIRE_IMMUNITY_NO_DAMAGE (1<<0)
Expand Down
7 changes: 5 additions & 2 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ Additional game mode variables.
return TRUE

/// Pick and setup a queen spawn from landmarks, then spawns the player there alongside any required setup
/datum/game_mode/proc/pick_queen_spawn(datum/mind/ghost_mind, hivenumber = XENO_HIVE_NORMAL)
/datum/game_mode/proc/pick_queen_spawn(mob/player, hivenumber = XENO_HIVE_NORMAL)
RETURN_TYPE(/turf)

var/datum/mind/ghost_mind = player.mind
var/mob/living/original = ghost_mind.current
var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
if(hive.living_xeno_queen || !original || !original.client)
Expand All @@ -710,6 +710,9 @@ Additional game mode variables.
spawn_list_map[spawn_name] = T

var/selected_spawn = tgui_input_list(original, "Where do you want you and your hive to spawn?", "Queen Spawn", spawn_list_map, QUEEN_SPAWN_TIMEOUT, theme="hive_status")
if(hive.living_xeno_queen)
to_chat(original, SPAN_XENOANNOUNCE("You have taken too long to pick a spawn location, a queen has already evolved before you."))
player.send_to_lobby()
if(!selected_spawn)
selected_spawn = pick(spawn_list_map)
to_chat(original, SPAN_XENOANNOUNCE("You have taken too long to pick a spawn location, one has been chosen for you."))
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/xenovsxeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
var/mob/living/carbon/xenomorph/larva/L = new(xeno_turf, null, hivenumber)
ghost_mind.transfer_to(L)

/datum/game_mode/xenovs/pick_queen_spawn(datum/mind/ghost_mind, hivenumber = XENO_HIVE_NORMAL)
/datum/game_mode/xenovs/pick_queen_spawn(mob/player, hivenumber = XENO_HIVE_NORMAL)
. = ..()
if(!.) return
// Spawn additional hive structures
Expand Down
4 changes: 2 additions & 2 deletions code/game/jobs/job/antag/xeno/queen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
/datum/job/antag/xenos/queen/set_spawn_positions(count)
return spawn_positions

/datum/job/antag/xenos/queen/transform_to_xeno(mob/new_player/NP, hive_index)
SSticker.mode.pick_queen_spawn(NP.mind, hive_index)
/datum/job/antag/xenos/queen/transform_to_xeno(mob/living/carbon/human/human_to_transform, hive_index)
SSticker.mode.pick_queen_spawn(human_to_transform, hive_index)

/datum/job/antag/xenos/queen/announce_entry_message(mob/new_queen, account, whitelist_status)
to_chat(new_queen, "<B>You are now the alien queen!</B>")
Expand Down
15 changes: 6 additions & 9 deletions code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,12 @@

/obj/effect/xenomorph/spray/Crossed(AM as mob|obj)
..()
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(H.ally_of_hivenumber(hivenumber))
return
apply_spray(AM)
else if (isxeno(AM))
var/mob/living/carbon/xenomorph/X = AM
if (X.hivenumber != hivenumber)
apply_spray(AM)
if(isliving(AM))
var/mob/living/living_mob = AM
if(living_mob.ally_of_hivenumber(hivenumber))
living_mob.ExtinguishMob()
else
apply_spray(living_mob)
else if(isVehicleMultitile(AM))
var/obj/vehicle/multitile/V = AM
V.handle_acidic_environment(src)
Expand Down
21 changes: 21 additions & 0 deletions code/game/objects/items/devices/helmet_visors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
on_light = new(attached_helmet)
on_light.set_light_on(TRUE)
START_PROCESSING(SSobj, src)
RegisterSignal(user, COMSIG_MOB_CHANGE_VIEW, PROC_REF(change_view))

/obj/item/device/helmet_visor/night_vision/deactivate_visor(obj/item/clothing/head/helmet/marine/attached_helmet, mob/living/carbon/human/user)
user.remove_client_color_matrix("nvg_visor", 1 SECONDS)
Expand All @@ -247,6 +248,7 @@
if(visor_glows)
qdel(on_light)
UnregisterSignal(user, COMSIG_HUMAN_POST_UPDATE_SIGHT)
UnregisterSignal(user, COMSIG_MOB_CHANGE_VIEW)

user.update_sight()
STOP_PROCESSING(SSobj, src)
Expand All @@ -271,6 +273,10 @@
if(!.)
return

if(user.client.view > 7)
to_chat(user, SPAN_WARNING("You cannot use [src] while using optics."))
return FALSE

if(!NVG_VISOR_USAGE(FALSE))
to_chat(user, SPAN_NOTICE("Your [src] is out of power! You'll need to recharge it."))
return FALSE
Expand All @@ -290,6 +296,21 @@
user.lighting_alpha = lighting_alpha
user.sync_lighting_plane_alpha()

/obj/item/device/helmet_visor/night_vision/proc/change_view(mob/user, new_size)
SIGNAL_HANDLER
if(new_size > 7) // cannot use binos with NVO
var/obj/item/clothing/head/helmet/marine/attached_helmet = loc
if(!istype(attached_helmet))
return
deactivate_visor(attached_helmet, user)
to_chat(user, SPAN_NOTICE("You deactivate [src] on [attached_helmet]."))
playsound_client(user.client, toggle_off_sound, null, 75)
attached_helmet.active_visor = null
attached_helmet.update_icon()
var/datum/action/item_action/cycle_helmet_huds/cycle_action = locate() in attached_helmet.actions
if(cycle_action)
cycle_action.set_default_overlay()

#undef NVG_VISOR_USAGE

/atom/movable/nvg_light
Expand Down
2 changes: 2 additions & 0 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
var/obj/structure/droppod/supply/pod = new(null, C)
C.forceMove(pod)
pod.launch(T)
log_ares_requisition("Supply Drop", "Launch [c.name] to X[x_supply], Y[y_supply].", usr.real_name)

Check failure on line 331 in code/game/supplyshuttle.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "c"

Check warning on line 331 in code/game/supplyshuttle.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "name"
log_game("[key_name(usr)] launched supply drop '[c.name]' to X[x_coord], Y[y_coord].")

Check failure on line 332 in code/game/supplyshuttle.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "c"

Check warning on line 332 in code/game/supplyshuttle.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "name"
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[C.name]' supply drop launched! Another launch will be available in five minutes.")]")

//A limited version of the above console
Expand Down
12 changes: 11 additions & 1 deletion code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
var/list/total_visors = built_in_visors + inserted_visors

if(!length(total_visors))
to_chat(user, SPAN_WARNING("There are no visors to swap to."))
return FALSE

if(active_visor)
Expand All @@ -692,6 +693,11 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
skipped_hud = TRUE
continue

if(!next_visor.can_toggle(user))
iterator++
skipped_hud = TRUE
continue

active_visor = next_visor
toggle_visor(user, visor_to_deactivate, silent = TRUE) // disables the old visor
toggle_visor(user)
Expand All @@ -703,15 +709,19 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
iterator++

for(var/obj/item/device/helmet_visor/new_visor in total_visors)

if(!isnull(GLOB.huds[new_visor.hud_type]?.hudusers[user]))
continue

if(!new_visor.can_toggle(user))
continue

active_visor = new_visor
toggle_visor(user)
return active_visor

to_chat(user, SPAN_WARNING("There are no visors to swap to currently."))
return FALSE

/datum/action/item_action/cycle_helmet_huds/New(Target, obj/item/holder)
. = ..()
name = "Cycle helmet HUD"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,8 @@
playsound(C.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
var/obj/structure/droppod/supply/pod = new(null, C)
pod.launch(T)
log_ares_requisition("Supply Drop", "Launch [c.name] to X[x_supply], Y[y_supply].", usr.real_name)

Check failure on line 857 in code/modules/cm_marines/overwatch.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "c"

Check warning on line 857 in code/modules/cm_marines/overwatch.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "name"
log_game("[key_name(usr)] launched supply drop '[c.name]' to X[x_coord], Y[y_coord].")

Check failure on line 858 in code/modules/cm_marines/overwatch.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "c"

Check warning on line 858 in code/modules/cm_marines/overwatch.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "name"
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[C.name]' supply drop launched! Another launch will be available in five minutes.")]")
busy = FALSE

Expand Down
4 changes: 2 additions & 2 deletions code/modules/economy/EFTPOS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
transaction_locked = 0
transaction_paid = 0
else
var/attempt_code = tgui_input_number(usr, "Enter EFTPOS access code", "Reset Transaction")
var/attempt_code = tgui_input_number(usr, "Enter EFTPOS access code", "Reset Transaction", 1000, 999999, 1000)
if(attempt_code == access_code)
transaction_locked = 0
transaction_paid = 0
Expand Down Expand Up @@ -234,7 +234,7 @@
var/attempt_pin = ""
var/datum/money_account/D = get_account(C.associated_account_number)
if(D.security_level)
attempt_pin = tgui_input_number(usr, "Enter pin code", "EFTPOS transaction")
attempt_pin = tgui_input_number(usr, "Enter pin code", "EFTPOS transaction", 1111, 111111, 1111)
D = null
D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
if(D)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//Corrosive acid is consolidated -- it checks for specific castes for strength now, but works identically to each other.
//The acid items are stored in XenoProcs.
/mob/living/carbon/xenomorph/proc/corrosive_acid(atom/O, acid_type, plasma_cost)
if(!check_state())
return
if(!O.Adjacent(src))
if(istype(O,/obj/item/explosive/plastic))
var/obj/item/explosive/plastic/E = O
Expand Down
6 changes: 0 additions & 6 deletions html/changelogs/AutoChangeLog-pr-5006.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-6067.yml

This file was deleted.

4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-6077.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "vero5123"
delete-after: True
changes:
- bugfix: "fixes queen getting stuck in the lobby if they take too long"
17 changes: 17 additions & 0 deletions html/changelogs/archive/2024-04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,20 @@
vero5123:
- bugfix: lowers the scalpel and chunk box's ability to destroy various structures.
- rscadd: chunk box is now a melee weapon
2024-04-04:
QuickLode:
- qol: Moves CL's Office and SEA's Office phone lines to "Offices" category.
realforest2001:
- rscadd: Added AI Core camera consoles to CE, CO and Brig offices, along with CIC
and Lifeboat bubble.
- maptweak: Added Tech Control Console to ARES Core.
- rscadd: Added Tech Unlock logs to ARES Interface
2024-04-05:
Drathek:
- bugfix: Fixed some number entry for your pin and access code in the EFTPOS
Git-Nivrak:
- qol: Acid sprays will now extinguish fire from other xenomorphs more consistently
ihatethisengine:
- balance: night vision optics no longer can be used with binoculars.
vero5123:
- bugfix: xenos can no longer attempt to use corrosive acid after death

0 comments on commit 4929558

Please sign in to comment.