Skip to content

Commit

Permalink
Merge branch 'forest/pred/locktoggle' into forest/pred/HOLDER
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jul 16, 2023
2 parents 2288622 + 9de94b5 commit 545e5bd
Show file tree
Hide file tree
Showing 106 changed files with 1,052 additions and 854 deletions.
1 change: 0 additions & 1 deletion code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
#define MOD_CHANNEL "MSAY"
#define ADMIN_CHANNEL "ASAY"
#define MENTOR_CHANNEL "Mentor"
2 changes: 2 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
/// The time against away_timer when an AFK xeno (not larva) can be replaced
#define XENO_LEAVE_TIMER 300 //300 seconds
/// The time against away_timer when an AFK facehugger converts to a npc
#define XENO_FACEHUGGER_LEAVE_TIMER 420 //420 seconds
/// The time against away_timer when an AFK xeno gets listed in the available list so ghosts can get ready
#define XENO_AVAILABLE_TIMER 60 //60 seconds

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/x_evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define EVOLUTION_INCREMENT_TIME (30 MINUTES) // Evolution increases by 1 every 25 minutes.

SUBSYSTEM_DEF(xevolution)
name = "Evilution"
name = "Evilution" //This is not a typo, do not change it.
wait = 1 MINUTES
priority = SS_PRIORITY_INACTIVITY

Expand Down
9 changes: 7 additions & 2 deletions code/datums/components/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
var/falloff
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
var/drag_sounds

/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large")
/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large", drag_sounds_ = 'sound/effects/alien_dragsound_large.ogg')
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
steps = steps_
volume = volume_
range = range_
falloff = falloff_
footstep_sounds = footstep_sounds_
drag_sounds = drag_sounds_

RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), PROC_REF(play_simplestep))

Expand All @@ -44,5 +46,8 @@
var/turf/open/T = prepare_step()
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
var/mob/living/parent_mob = parent
if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
7 changes: 0 additions & 7 deletions code/datums/keybinding/communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
full_name = "IC Comms (;)"
keybind_signal = COMSIG_KG_CLIENT_RADIO_DOWN

/datum/keybinding/client/communication/mod_say
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = MOD_CHANNEL
full_name = "Mod Say"
keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN

/datum/keybinding/client/communication/asay
hotkey_keys = list("F3")
classic_keys = list("F5")
Expand Down
16 changes: 0 additions & 16 deletions code/datums/redis/callbacks/msay.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Parameters are passed from New.
if(!ismovable(src))
var/turf/curturf = get_turf(src)
if(curturf)
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRANSFORM, "Modify Transform")
VV_DROPDOWN_OPTION(VV_HK_ADD_REAGENT, "Add Reagent")
VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EMP, "EMP Pulse")
Expand Down
31 changes: 18 additions & 13 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,28 @@ Additional game mode variables.
/datum/game_mode/proc/check_xeno_late_join(mob/xeno_candidate)
if(jobban_isbanned(xeno_candidate, JOB_XENOMORPH)) // User is jobbanned
to_chat(xeno_candidate, SPAN_WARNING("You are banned from playing aliens and cannot spawn as a xenomorph."))
return
return 1
return FALSE
return TRUE

/datum/game_mode/proc/attempt_to_join_as_xeno(mob/xeno_candidate, instant_join = 0)
/datum/game_mode/proc/attempt_to_join_as_xeno(mob/xeno_candidate, instant_join = FALSE)
var/list/available_xenos = list()
var/list/available_xenos_non_ssd = list()

for(var/mob/living/carbon/xenomorph/X in GLOB.living_xeno_list)
var/area/A = get_area(X)
if(is_admin_level(X.z) && (!A || !(A.flags_area & AREA_ALLOW_XENO_JOIN)) || X.aghosted)
continue //xenos on admin z level and aghosted ones don't count
if(istype(X) && ((!islarva(X) && (XENO_LEAVE_TIMER - X.away_timer < XENO_AVAILABLE_TIMER)) || (islarva(X) && (XENO_LEAVE_TIMER_LARVA - X.away_timer < XENO_AVAILABLE_TIMER))))
if(!X.client)
available_xenos += X
else
available_xenos_non_ssd += X

for(var/mob/living/carbon/xenomorph/cur_xeno as anything in GLOB.living_xeno_list)
if(cur_xeno.aghosted)
continue //aghosted xenos don't count
var/area/area = get_area(cur_xeno)
if(is_admin_level(cur_xeno.z) && (!area || !(area.flags_area & AREA_ALLOW_XENO_JOIN)))
continue //xenos on admin z level don't count
if(!istype(cur_xeno))
continue
var/required_time = islarva(cur_xeno) ? XENO_LEAVE_TIMER_LARVA - cur_xeno.away_timer : XENO_LEAVE_TIMER - cur_xeno.away_timer
if(required_time > XENO_AVAILABLE_TIMER)
continue
if(!cur_xeno.client)
available_xenos += cur_xeno
else
available_xenos_non_ssd += cur_xeno

var/datum/hive_status/hive
for(var/hivenumber in GLOB.hive_datum)
Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/vending/vendor_types/crew/staff_officer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@

GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer, list(
list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null),
list("Uniform", 0, /obj/item/clothing/under/marine/officer/bridge, MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY),
list("Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY),
list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY),
list("Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY),
list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY),

list("JACKET (CHOOSE 1)", 0, null, null, null),
list("Service Jacket", 0, /obj/item/clothing/suit/storage/jacket/marine/service, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_RECOMMENDED),

list("HAT (CHOOSE 1)", 0, null, null, null),
list("Beret, Green", 0, /obj/item/clothing/head/beret/cm, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),
list("Beret, Tan", 0, /obj/item/clothing/head/beret/cm/tan, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),
list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),


list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null),
list("M44 Revolver", 0, /obj/item/storage/belt/gun/m44/mp, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
list("M4A3 Pistol", 0, /obj/item/storage/belt/gun/m4a3/commander, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
Expand Down
14 changes: 8 additions & 6 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,25 @@

/obj/effect/landmark/yautja_teleport
name = "yautja_teleport"
/// The index we registered as in mainship_yautja_desc or yautja_teleport_descs
var/desc_index

/obj/effect/landmark/yautja_teleport/Initialize(mapload, ...)
. = ..()
var/turf/T = get_turf(src)
var/turf/turf = get_turf(src)
desc_index = turf.loc.name + turf.loc_to_string()
if(is_mainship_level(z))
GLOB.mainship_yautja_teleports += src
GLOB.mainship_yautja_desc[T.loc.name + T.loc_to_string()] = src
GLOB.mainship_yautja_desc[desc_index] = src
else
GLOB.yautja_teleports += src
GLOB.yautja_teleport_descs[T.loc.name + T.loc_to_string()] = src
GLOB.yautja_teleport_descs[desc_index] = src

/obj/effect/landmark/yautja_teleport/Destroy()
var/turf/T = get_turf(src)
GLOB.mainship_yautja_teleports -= src
GLOB.yautja_teleports -= src
GLOB.mainship_yautja_desc -= T.loc.name + T.loc_to_string()
GLOB.yautja_teleport_descs -= T.loc.name + T.loc_to_string()
GLOB.mainship_yautja_desc -= desc_index
GLOB.yautja_teleport_descs -= desc_index
return ..()


Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/landmarks/survivor_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

/obj/effect/landmark/survivor_spawner/bigred_crashed_pmc
equipment = /datum/equipment_preset/survivor/pmc
synth_equipment = /datum/equipment_preset/pmc/synth
synth_equipment = /datum/equipment_preset/synth/survivor/pmc
intro_text = list("<h2>You are a survivor of a crash landing!</h2>",\
"<span class='notice'>You are NOT aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to heal up and survive. If you want to assault the hive - adminhelp.</span>")
Expand All @@ -80,7 +80,7 @@

/obj/effect/landmark/survivor_spawner/bigred_crashed_cl
equipment = /datum/equipment_preset/survivor/wy/manager
synth_equipment = /datum/equipment_preset/pmc/synth
synth_equipment = /datum/equipment_preset/synth/survivor/pmc
intro_text = list("<h2>You are a survivor of a crash landing!</h2>",\
"<span class='notice'>You are NOT aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to heal up and survive. If you want to assault the hive - adminhelp.</span>")
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,9 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
storage_close(watcher)

/obj/item/storage/proc/dump_objectives()
for(var/obj/item/I in src)
if(I.is_objective)
I.forceMove(loc)
for(var/obj/item/cur_item in src)
if(cur_item.is_objective)
remove_from_storage(cur_item, loc)


/obj/item/storage/Destroy()
Expand Down
15 changes: 9 additions & 6 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,22 @@
else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/explosive/plastic))
return
else if(iswelder(W))
if(material != MATERIAL_METAL && material != MATERIAL_PLASTEEL)
to_chat(user, SPAN_WARNING("You cannot weld [material]!"))
return FALSE//Can't weld wood/plastic.
if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH))
to_chat(user, SPAN_WARNING("You need a stronger blowtorch!"))
return
return FALSE
var/obj/item/tool/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, SPAN_WARNING("\The [WT] needs to be on!"))
return
return FALSE
if(!WT.remove_fuel(0, user))
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
return
return FALSE
playsound(src, 'sound/items/Welder.ogg', 25, 1)
if(!do_after(user, 10 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
return FALSE
welded = !welded
update_icon()
for(var/mob/M as anything in viewers(src))
Expand All @@ -266,9 +269,9 @@
if(isxeno(user))
var/mob/living/carbon/xenomorph/opener = user
src.attack_alien(opener)
return
return FALSE
src.attack_hand(user)
return
return TRUE

/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
if(!opened)
Expand Down
12 changes: 8 additions & 4 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,13 @@
/// Checks whether a table is a straight line along a given axis
/obj/structure/surface/table/proc/straight_table_check(direction)
var/obj/structure/surface/table/table = src
while(table)
var/obj/structure/surface/table/side_table
var/tables_count = 7 // Lazy extra safety against infinite loops. If table big, can't flip, i guess.
while(--tables_count)
// Check whether there are connected tables perpendicular to the axis
for(var/angle in list(-90, 90))
table = locate() in get_step(loc, turn(direction, angle))
if(table && !table.flipped)
side_table = locate() in get_step(table, turn(direction, angle))
if(side_table && !side_table.flipped)
return FALSE
table = locate() in get_step(table, direction)
if(!table || table.flipped)
Expand All @@ -339,6 +341,8 @@
var/obj/structure/surface/table/reinforced/reinforced_table = table
if(reinforced_table.status == RTABLE_NORMAL)
return FALSE
if(!tables_count)
return FALSE
return TRUE

/obj/structure/surface/table/verb/do_flip()
Expand Down Expand Up @@ -421,7 +425,7 @@
to_chat(usr, SPAN_WARNING("You have moved a table too recently."))
return FALSE

if(!skip_straight_check && (!straight_table_check(turn(direction, 90)) || !straight_table_check(turn(direction, -90))))
if(!skip_straight_check && !(straight_table_check(turn(direction, 90)) && straight_table_check(turn(direction, -90))))
to_chat(usr, SPAN_WARNING("[src] is too wide to be flipped."))
return FALSE

Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var/list/admin_verbs_default = list(
/client/proc/invismin,
/client/proc/set_explosive_antigrief,
/client/proc/check_explosive_antigrief,
/client/proc/cmd_mod_say,
/client/proc/dsay,
/client/proc/chem_panel, /*chem panel, allows viewing, editing and creation of reagent and chemical_reaction datums*/
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
Expand Down Expand Up @@ -68,6 +67,8 @@ var/list/admin_verbs_default = list(
/datum/admins/proc/alertall,
/datum/admins/proc/imaginary_friend,
/client/proc/toggle_ares_ping,
/client/proc/cmd_admin_say, /*staff-only ooc chat*/
/client/proc/cmd_mod_say, /* alternate way of typing asay, no different than cmd_admin_say */
)

var/list/admin_verbs_admin = list(
Expand All @@ -80,7 +81,6 @@ var/list/admin_verbs_admin = list(
/client/proc/toggleprayers, /*toggles prayers on/off*/
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
/client/proc/event_panel,
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
/client/proc/free_slot, /*frees slot for chosen job*/
/client/proc/modify_slot,
/client/proc/cmd_admin_rejuvenate,
Expand Down
Loading

0 comments on commit 545e5bd

Please sign in to comment.