Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HammerAtmosia
Browse files Browse the repository at this point in the history
  • Loading branch information
SerynEngi committed Jun 2, 2023
2 parents 9528b01 + 33f2f25 commit 42205a7
Show file tree
Hide file tree
Showing 72 changed files with 556 additions and 452 deletions.
1 change: 1 addition & 0 deletions _maps/snake.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"map_name": "NSV Snake",
"map_link": "Snake",
"map_path": "map_files/Snake",
"map_file": [
"snake_lower.dmm",
Expand Down
34 changes: 34 additions & 0 deletions code/__DEFINES/devices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#define THEME_SYNDICATE "syndicate"

/// Map of theme name -> theme ID
GLOBAL_LIST_INIT(ntos_device_themes_default, list(
"NtOS Default" = THEME_NTOS,
"Thinktronic Classic" = THEME_THINKTRONIC,
Expand All @@ -67,6 +68,39 @@ GLOBAL_LIST_INIT(ntos_device_themes_default, list(
"Retro" = THEME_RETRO
))

// I hate BYOND lists. just let me reverse the map please
/// Sanitization list for the database, allowed roundstart theme IDs
GLOBAL_LIST_INIT(ntos_device_themes_default_content, list(
THEME_NTOS,
THEME_THINKTRONIC,
THEME_NTOS_LIGHT,
THEME_NTOS_DARK,
THEME_NTOS_RED,
THEME_NTOS_ORANGE,
THEME_NTOS_YELLOW,
THEME_NTOS_OLIVE,
THEME_NTOS_GREEN,
THEME_NTOS_TEAL,
THEME_NTOS_BLUE,
THEME_NTOS_VIOLET,
THEME_NTOS_PURPLE,
THEME_NTOS_PINK,
THEME_NTOS_BROWN,
THEME_NTOS_GREY,
THEME_NTOS_CLOWN_PINK,
THEME_NTOS_CLOWN_YELLOW,
THEME_NTOS_HACKERMAN,
THEME_HACKERMAN,
THEME_RETRO
))

GLOBAL_LIST_INIT(ntos_device_themes_emagged, list(
"Syndix" = THEME_SYNDICATE
) + GLOB.ntos_device_themes_default)

/// Reverse map of GLOB.ntos_device_themes_emagged
/proc/theme_name_for_id(id)
for(var/key in GLOB.ntos_device_themes_emagged)
if(GLOB.ntos_device_themes_emagged[key] == id)
return key
return null
9 changes: 0 additions & 9 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,6 @@ GLOBAL_LIST_INIT(ghost_accs_options, list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST

GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING)) //Same as ghost_accs_options.

//pda fonts
#define MONO "Monospaced"
#define VT "VT323"
#define ORBITRON "Orbitron"
#define SHARE "Share Tech Mono"

GLOBAL_LIST_INIT(pda_styles, sortList(list(MONO, VT, ORBITRON, SHARE)))


// Consider these images/atoms as part of the UI/HUD
#define APPEARANCE_UI_IGNORE_ALPHA (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|RESET_ALPHA|PIXEL_SCALE)
#define APPEARANCE_UI (RESET_COLOR|RESET_TRANSFORM|NO_CLIENT_COLOR|PIXEL_SCALE)
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
#define PREFERENCE_TAG_PIXELSIZE "19"
#define PREFERENCE_TAG_SCALING_METHOD "20"
#define PREFERENCE_TAG_TIP_DELAY "21"
#define PREFERENCE_TAG_PDA_STYLE "22"
#define PREFERENCE_TAG_PDA_THEME "22"
#define PREFERENCE_TAG_PDA_COLOUR "23"
#define PREFERENCE_TAG_KEYBINDS "24"
#define PREFERENCE_TAG_PURCHASED_GEAR "25"
Expand Down
6 changes: 3 additions & 3 deletions code/__HELPERS/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@
if (CONFIG_GET(flag/log_job_debug))
WRITE_LOG(GLOB.world_job_debug_log, "JOB: [text]")

/proc/log_href_exploit(atom/user)
WRITE_LOG(GLOB.href_exploit_attempt_log, "HREF: [key_name(user)] has potentially attempted an href exploit.")
message_admins("[key_name_admin(user)] has potentially attempted an href exploit.")
/proc/log_href_exploit(atom/user, data = "")
WRITE_LOG(GLOB.href_exploit_attempt_log, "HREF: [key_name(user)] has potentially attempted an href exploit.[data]")
message_admins("[key_name_admin(user)] has potentially attempted an href exploit.[data]")

/* Log to both DD and the logfile. */
/proc/log_world(text)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/drag_drop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
var/obj/item/H = get_active_held_item()
if(H)
. = H.canItemMouseDown(object, location, params)
else if(src.overmap_ship && (src.overmap_ship.gunner == src) || (GetComponent(/datum/component/overmap_gunning))) //NSV13 - let us mouse-down if we're a gunner
else if(src.overmap_ship && (src.overmap_ship.gunner == src || (GetComponent(/datum/component/overmap_gunning)))) //NSV13 - let us mouse-down if we're a ship operator
. = src.overmap_ship

/obj/item/proc/CanItemAutoclick(object, location, params)
Expand Down
39 changes: 39 additions & 0 deletions code/datums/components/sound_player.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Sound Player component
*
* Component that will play a sound upon recieving some signal
*/
/datum/component/sound_player
///Volume of the sound when played
var/volume
///The list of sounds played, picked randomly.
var/list/sounds
///Uses left before the sound player deletes itself. If set to a negative number that will mean infinite uses.
var/uses

/datum/component/sound_player/Initialize(
volume = 30,
sounds = list('sound/items/bikehorn.ogg'),
uses = -1,
signal_list = list(COMSIG_ATOM_ATTACK_HAND),
)
src.volume = volume
src.sounds = sounds
src.uses = uses

RegisterSignal(parent, signal_list, PROC_REF(play_sound))

/**
* Attempt to play the sound on parent
*
* If out of uses, will qdel itself.
*/
/datum/component/sound_player/proc/play_sound()
SIGNAL_HANDLER

playsound(parent, pick(sounds), volume, TRUE)
if(uses <= -1)
return
uses--
if(!uses)
qdel(src)
41 changes: 0 additions & 41 deletions code/datums/components/soundplayer.dm

This file was deleted.

8 changes: 5 additions & 3 deletions code/datums/mood_events/generic_negative_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@
var/mob/living/T = L.parent
if(ishuman(T))
var/mob/living/carbon/human/H = T
if(iscatperson(H))
H.dna.species.start_wagging_tail(H)
addtimer(CALLBACK(H.dna.species, TYPE_PROC_REF(/datum/species, stop_wagging_tail), H), 30)
if(iscatperson(H) || (istype(H.getorganslot(ORGAN_SLOT_EARS), /obj/item/organ/ears/cat) && istype(H.getorganslot(ORGAN_SLOT_TAIL), /obj/item/organ/tail/cat)))
var/obj/item/organ/tail/tail = H.getorganslot(ORGAN_SLOT_TAIL)
if(tail)
tail.set_wagging(H, TRUE)
addtimer(CALLBACK(tail, TYPE_PROC_REF(/obj/item/organ/tail, set_wagging), H, FALSE), 3 SECONDS)
description = "<span class='nicegreen'>They want to play on the table!</span>\n"
mood_change = 2

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/granters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
return
if(do_after(user,50, user))
on_reading_finished(user)
reading = FALSE
reading = FALSE
return TRUE

///ACTION BUTTONS///
Expand Down
4 changes: 2 additions & 2 deletions code/modules/NTNet/network.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,12 @@
#endif

// Checks whether NTNet operates. If parameter is passed checks whether specific function is enabled.
/datum/ntnet/station_root/proc/check_function(specific_action = 0, zlevel)
/datum/ntnet/station_root/proc/check_function(specific_action = 0, zlevel, ignore_relay = FALSE)
if(!SSnetworks.relays || !SSnetworks.relays.len) // No relays found. NTNet is down
return FALSE

// Check all relays. If we have at least one working relay, network is up.
if(!SSnetworks.check_relay_operation(zlevel))
if(!ignore_relay && !SSnetworks.check_relay_operation(zlevel))
return FALSE

if(setting_disabled)
Expand Down
14 changes: 7 additions & 7 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/ghost_accs = GHOST_ACCS_DEFAULT_OPTION
var/ghost_others = GHOST_OTHERS_DEFAULT_OPTION
var/preferred_map = null
var/pda_style = MONO
var/pda_theme = THEME_NTOS
var/pda_color = "#808000"

// Custom Keybindings
Expand Down Expand Up @@ -623,8 +623,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Action Buttons:</b> <a href='?_src_=prefs;preference=action_buttons'>[(toggles2 & PREFTOGGLE_2_LOCKED_BUTTONS) ? "Locked In Place" : "Unlocked"]</a><br>"
dat += "<b>Hotkey Mode:</b> <a href='?_src_=prefs;preference=hotkeys'>[(toggles2 & PREFTOGGLE_2_HOTKEYS) ? "Hotkeys" : "Default"]</a><br>"
dat += "<br>"
dat += "<b>PDA Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
dat += "<b>PDA Style:</b> <a href='?_src_=prefs;task=input;preference=pda_style'>[pda_style]</a><br>"
dat += "<b>PDA Theme:</b> <a href='?_src_=prefs;task=input;preference=pda_theme'>[theme_name_for_id(pda_theme)]</a><br>"
dat += "<b>PDA Classic Color:</b> <span style='border:1px solid #161616; background-color: [pda_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=pda_color;task=input'>Change</a><BR>"
dat += "<br>"
dat += "<b>Crew Objectives:</b> <a href='?_src_=prefs;preference=crewobj'>[(toggles2 & PREFTOGGLE_2_CREW_OBJECTIVES) ? "Yes" : "No"]</a><br>"
dat += "<br>"
Expand Down Expand Up @@ -1825,12 +1825,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
UI_style = pickedui
if (parent && parent.mob && parent.mob.hud_used)
parent.mob.hud_used.update_ui_style(ui_style2icon(UI_style))
if("pda_style")
var/pickedPDAStyle = input(user, "Choose your PDA style.", "Character Preference", pda_style) as null|anything in GLOB.pda_styles
if("pda_theme")
var/pickedPDAStyle = input(user, "Choose your default PDA theme.", "Character Preference", pda_theme) as null|anything in GLOB.ntos_device_themes_default
if(pickedPDAStyle)
pda_style = pickedPDAStyle
pda_theme = GLOB.ntos_device_themes_default[pickedPDAStyle]
if("pda_color")
var/pickedPDAColor = input(user, "Choose your PDA Interface color.", "Character Preference", pda_color) as color|null
var/pickedPDAColor = input(user, "Choose your default Thinktronic Classic theme background color.", "Character Preference", pda_color) as color|null
if(pickedPDAColor)
pda_color = pickedPDAColor
if ("see_balloon_alerts")
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences2/preferences2.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
READPREF_RAW(ghost_orbit, PREFERENCE_TAG_GHOST_ORBIT)
READPREF_RAW(ghost_accs, PREFERENCE_TAG_GHOST_ACCS)
READPREF_RAW(ghost_others, PREFERENCE_TAG_GHOST_OTHERS)
READPREF_RAW(pda_style, PREFERENCE_TAG_PDA_STYLE)
READPREF_RAW(pda_theme, PREFERENCE_TAG_PDA_THEME)
READPREF_RAW(pda_color, PREFERENCE_TAG_PDA_COLOUR)
READPREF_RAW(preferred_syndie_role, PREFERENCE_TAG_PREFERRED_SYNDIE_ROLE) //NSV13

Expand Down Expand Up @@ -106,7 +106,7 @@
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
be_special = SANITIZE_LIST(be_special)

pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
pda_theme = sanitize_inlist(pda_theme, GLOB.ntos_device_themes_default_content, initial(pda_theme))
pda_color = sanitize_hexcolor(pda_color, 6, TRUE, initial(pda_color))
preferred_syndie_role = sanitize_text(preferred_syndie_role, CONQUEST_ROLE_GRUNT) //NSV13

Expand Down Expand Up @@ -147,7 +147,7 @@
PREP_WRITEPREF_RAW(parallax, PREFERENCE_TAG_PARALLAX)
PREP_WRITEPREF_RAW(pixel_size, PREFERENCE_TAG_PIXELSIZE)
PREP_WRITEPREF_RAW(tip_delay, PREFERENCE_TAG_TIP_DELAY)
PREP_WRITEPREF_RAW(pda_style, PREFERENCE_TAG_PDA_STYLE)
PREP_WRITEPREF_RAW(pda_theme, PREFERENCE_TAG_PDA_THEME)
PREP_WRITEPREF_RAW(pda_color, PREFERENCE_TAG_PDA_COLOUR)
PREP_WRITEPREF_RAW(preferred_syndie_role, PREFERENCE_TAG_PREFERRED_SYNDIE_ROLE) //NSV13

Expand Down
15 changes: 6 additions & 9 deletions code/modules/mob/living/carbon/human/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,22 @@
if(!.)
return
var/mob/living/carbon/human/H = user
if(!istype(H) || !H.dna || !H.dna.species || !H.dna.species.can_wag_tail(H))
var/obj/item/organ/tail/tail = H?.getorganslot(ORGAN_SLOT_TAIL)
if(!tail)
return
if(!H.dna.species.is_wagging_tail())
H.dna.species.start_wagging_tail(H)
else
H.dna.species.stop_wagging_tail(H)
tail.toggle_wag(H)

/datum/emote/living/carbon/human/wag/can_run_emote(mob/user, status_check = TRUE , intentional)
if(!..())
return FALSE
var/mob/living/carbon/human/H = user
return H.dna && H.dna.species && H.dna.species.can_wag_tail(user)
return istype(H?.getorganslot(ORGAN_SLOT_TAIL), /obj/item/organ/tail)

/datum/emote/living/carbon/human/wag/select_message_type(mob/user, intentional)
. = ..()
var/mob/living/carbon/human/H = user
if(!H.dna || !H.dna.species)
return
if(H.dna.species.is_wagging_tail())
var/obj/item/organ/tail/tail = H.getorganslot(ORGAN_SLOT_TAIL)
if(tail?.is_wagging(H))
. = null

/datum/emote/living/carbon/human/wing
Expand Down
10 changes: 2 additions & 8 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2086,15 +2086,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
//Tail Wagging//
////////////////

/datum/species/proc/can_wag_tail(mob/living/carbon/human/H)
return FALSE

/datum/species/proc/is_wagging_tail(mob/living/carbon/human/H)
return FALSE

/datum/species/proc/start_wagging_tail(mob/living/carbon/human/H)

/datum/species/proc/stop_wagging_tail(mob/living/carbon/human/H)
var/obj/item/organ/tail/tail = H?.getorganslot(ORGAN_SLOT_TAIL)
tail?.set_wagging(H, FALSE)

///////////////
//FLIGHT SHIT//
Expand Down
18 changes: 0 additions & 18 deletions code/modules/mob/living/carbon/human/species_types/felinid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,6 @@
stop_wagging_tail(H)
. = ..()

/datum/species/human/felinid/can_wag_tail(mob/living/carbon/human/H)
return ("tail_human" in mutant_bodyparts) || ("waggingtail_human" in mutant_bodyparts)

/datum/species/human/felinid/is_wagging_tail(mob/living/carbon/human/H)
return ("waggingtail_human" in mutant_bodyparts)

/datum/species/human/felinid/start_wagging_tail(mob/living/carbon/human/H)
if("tail_human" in mutant_bodyparts)
mutant_bodyparts -= "tail_human"
mutant_bodyparts |= "waggingtail_human"
H.update_body()

/datum/species/human/felinid/stop_wagging_tail(mob/living/carbon/human/H)
if("waggingtail_human" in mutant_bodyparts)
mutant_bodyparts -= "waggingtail_human"
mutant_bodyparts |= "tail_human"
H.update_body()

/datum/species/human/felinid/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
if(ishuman(C))
var/mob/living/carbon/human/H = C
Expand Down
22 changes: 0 additions & 22 deletions code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,6 @@
stop_wagging_tail(H)
. = ..()

/datum/species/lizard/can_wag_tail(mob/living/carbon/human/H)
return ("tail_lizard" in mutant_bodyparts) || ("waggingtail_lizard" in mutant_bodyparts)

/datum/species/lizard/is_wagging_tail(mob/living/carbon/human/H)
return ("waggingtail_lizard" in mutant_bodyparts)

/datum/species/lizard/start_wagging_tail(mob/living/carbon/human/H)
if("tail_lizard" in mutant_bodyparts)
mutant_bodyparts -= "tail_lizard"
mutant_bodyparts -= "spines"
mutant_bodyparts |= "waggingtail_lizard"
mutant_bodyparts |= "waggingspines"
H.update_body()

/datum/species/lizard/stop_wagging_tail(mob/living/carbon/human/H)
if("waggingtail_lizard" in mutant_bodyparts)
mutant_bodyparts -= "waggingtail_lizard"
mutant_bodyparts -= "waggingspines"
mutant_bodyparts |= "tail_lizard"
mutant_bodyparts |= "spines"
H.update_body()

/*
Lizard subspecies: ASHWALKERS
*/
Expand Down
Loading

0 comments on commit 42205a7

Please sign in to comment.