Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Stable <= Beta-Dev #38

Merged
merged 31 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0997683
Добавление наших карт комплекса
MysticalFaceLesS Apr 10, 2024
2caa292
AI and Robot lights keybind (#1600)
Saicchi Apr 9, 2024
7c80e2c
Map renderer hide_invisible set (#1649)
cheesePizza2 Apr 9, 2024
b0fae0e
Codeword highlighting (#1633)
cheesePizza2 Apr 9, 2024
a3282c6
Armbands fit in more loadouts (#1652)
chesse20 Apr 10, 2024
cbe7949
Chess
Furrytomat Apr 11, 2024
b88d1b3
Merge pull request #35 from Furrytomat/beta-dev
MysticalFaceLesS Apr 11, 2024
ad4f2b5
HotFix: buttons
MysticalFaceLesS Feb 25, 2024
0a04e71
Усмирение голода паука SCP 2427-3
MysticalFaceLesS Mar 3, 2024
2171924
Fix отображения трейторских целек
MysticalFaceLesS Feb 10, 2024
53ddeac
Fix отображение тикетов, логов, факсов и т.д.
MysticalFaceLesS Feb 10, 2024
9aa4e76
Update README.md
MysticalFaceLesS Feb 10, 2024
534b8f2
Добавлена кнопка с фиксом раскладки
MysticalFaceLesS Apr 11, 2024
98a1630
OFF goirep and fix chat
MysticalFaceLesS Feb 1, 2024
b34d472
Исправлено: Кривое отображение флаворов и текста на бумаге, исправлен…
MysticalFaceLesS Apr 11, 2024
66591d6
New LCZ checkpoint
Furrytomat Apr 12, 2024
59dd2c5
Merge pull request #36 from Furrytomat/beta-dev
MysticalFaceLesS Apr 13, 2024
83de8ed
Добавлен "Оранжевый код" и переведены все сигналы тревог. - Pofea
MysticalFaceLesS Apr 13, 2024
f8df827
Fix кодировки при опьянении и аварийное освещение для кодов выше крас…
MysticalFaceLesS Apr 13, 2024
fef6b26
Small containment engineer access fix
MysticalFaceLesS Apr 13, 2024
dd14497
Give LCZ serg sec lvl 3 access
MysticalFaceLesS Apr 13, 2024
522e2b9
HotFix: Outfits
MysticalFaceLesS Apr 13, 2024
06eebf9
Correction of the year in the game
MysticalFaceLesS Apr 13, 2024
a985f9f
fix: Mateba sprite
MysticalFaceLesS Apr 13, 2024
0cb684a
Изменены сьюты для MTF, добавлен новый шлем и пара сьютов
MysticalFaceLesS Apr 13, 2024
1b16705
hotfix: map
MysticalFaceLesS Apr 13, 2024
cbdab42
Hotfix: Map #2
MysticalFaceLesS Apr 13, 2024
0233c46
Revert "hotfix: map"
MysticalFaceLesS Apr 13, 2024
07cdc8c
Changing the location of the buttons
MysticalFaceLesS Feb 25, 2024
a56a3c9
Support Html for Admin Announce
MysticalFaceLesS Apr 13, 2024
bfa3d7d
Добавлен Build Mod на F8
MysticalFaceLesS Apr 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
<p align="center">Secure. Contain. Protect.

# Foundation-19
### Welcome to the code repository for **Foundation-19**, a modified fork of [BayStation 12](https://github.com/Baystation12/Baystation12), rebased onto [TeguStation](https://github.com/vlggms/tegustation).
### Welcome to the code repository for **Celadon-SCP**, a modified fork of [Foundation-19](https://github.com/foundation-19/foundation-19), [BayStation 12](https://github.com/Baystation12/Baystation12), rebased onto [TeguStation](https://github.com/vlggms/tegustation).

[![forthebadge](https://forthebadge.com/images/badges/built-with-resentment.svg)](#) [![forthebadge](https://forthebadge.com/images/badges/contains-tasty-spaghetti-code.svg)](#) [![forinfinityandbyond](https://user-images.githubusercontent.com/5211576/29499758-4efff304-85e6-11e7-8267-62919c3688a9.gif)](https://www.reddit.com/r/SS13/comments/5oplxp/what_is_the_main_problem_with_byond_as_an_engine/dclbu1a)

[![Build Status](https://github.com/foundation-19/foundation-19/workflows/CI%20Suite/badge.svg)](https://github.com/foundation-19/foundation-19/actions?query=workflow%3A%22CI+Suite%22)
[![Percentage of issues still open](https://isitmaintained.com/badge/open/foundation-19/foundation-19.svg)](https://isitmaintained.com/project/vlggms/tegustation "Percentage of issues still open")
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/foundation-19/foundation-19.svg)](https://isitmaintained.com/project/vlggms/tegustation "Average time to resolve an issue")
[![Discord Shield](https://discordapp.com/api/guilds/896489363599417345/widget.png?style=shield)](https://discord.gg/4GSVA4TRuS)
[![Discord Shield](https://discordapp.com/api/guilds/896489363599417345/widget.png?style=shield)]([https://discord.com/invite/rxsggTJzY3](https://discord.com/invite/rxsggTJzY3))

## Community
[<img src=".github/assets/discord.png" alt="Discord" width="150" align="left">](https://discord.gg/4GSVA4TRuS)
[<img src=".github/assets/discord.png" alt="Discord" width="150" align="left">](https://discord.com/invite/rxsggTJzY3)
Discord is the place where most of the discussion happens, due to absence of a forum. Here you can contact administrators, ask mentors for help, or simply discuss your rounds. It is also a place where you can find links to ban appeals, admin applications and others, which could be really useful.

**Space Station 13** is a paranoia-laden round-based roleplaying game set against the backdrop of a nonsensical, metal death trap masquerading as a space station, with charming spritework designed to represent the sci-fi setting and its dangerous undertones. This is an SCP inspired flavour, set on **Site 53**.

## Information
* **Code:** https://github.com/foundation-19/foundation-19
* **SS13 Coderbus Discord:** https://discord.gg/Vh8TJp9
* **Foundation-19 Wiki:** https://scp13.miraheze.org/wiki/Main_Page
* **Code:** https://github.com/MysticalFaceLesS/Foundation-19
* **Celadon SCP Wiki:** https://scp.celadon.pro
* **Celadon Map:** https://map.celadon.pro/SCP

## :exclamation: How to compile :exclamation:

Expand Down
6 changes: 6 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[langserver]
dreamchecker = true

[map_renderer]
hide_invisible = [
"/obj/effect/landmark",
"/turf/unsimulated/mineral",
]

[diagnostics]
var_in_proc_parameter = "error"

Expand Down
2 changes: 1 addition & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@
#include "code\datums\recipe.dm"
#include "code\datums\reference_tracking.dm"
#include "code\datums\ruins.dm"
#include "code\datums\security_state.dm"
#include "code\datums\shackle_law_sets.dm"
#include "code\datums\sound_player.dm"
#include "code\datums\suit_sensor_jammer_method.dm"
Expand All @@ -355,6 +354,7 @@
#include "code\datums\communication\pray.dm"
#include "code\datums\communication\~defines.dm"
#include "code\datums\components\_component.dm"
#include "code\datums\components\codeword_hearing.dm"
#include "code\datums\components\helpers.dm"
#include "code\datums\components\memetic.dm"
#include "code\datums\disease\_disease.dm"
Expand Down
4 changes: 3 additions & 1 deletion code/__defines/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@
#define COMSIG_ATOM_EXAMINED "atomExamined"
/// Called in '/mob/living/say' on the mob who heard speech (/mob/living/speaker, message)
#define COMSIG_MOB_HEARD_SPEECH "mobHeardSpeech"
/// Called in '/mob/living/say' on the mob who heard the whisper (/mob/living/speaker, message)
/// Called in '/mob/living/say' on the mob who heard the whisper (/mob/living/speaker, list(message)). Message is passed in a list so that back-editing is possible.
#define COMSIG_MOB_HEARD_WHISPER "mobHeardWhisper"
/// Called in 'mob/on_hear_say' on the mob who heard whatever message (/mob/hearer, message)
#define COMSIG_MOB_HEAR "mob_hear"

/*
* Photos
Expand Down
8 changes: 0 additions & 8 deletions code/_helpers/global_access.dm
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,6 @@
return global.swapmaps_mode;
if("syndicate_access")
return global.syndicate_access;
if("syndicate_code_phrase")
return global.syndicate_code_phrase;
if("syndicate_code_response")
return global.syndicate_code_response;
if("syndicate_name")
return global.syndicate_name;
if("tail_icon_cache")
Expand Down Expand Up @@ -1608,10 +1604,6 @@
global.swapmaps_mode=newval;
if("syndicate_access")
global.syndicate_access=newval;
if("syndicate_code_phrase")
global.syndicate_code_phrase=newval;
if("syndicate_code_response")
global.syndicate_code_response=newval;
if("syndicate_name")
global.syndicate_name=newval;
if("tail_icon_cache")
Expand Down
87 changes: 35 additions & 52 deletions code/_helpers/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,85 +98,68 @@ var/syndicate_name = null


//Traitors and traitor silicons will get these. Revs will not.
var/syndicate_code_phrase//Code phrase for traitors.
var/syndicate_code_response//Code response for traitors.

/*
Should be expanded.
How this works:
Instead of "I'm looking for James Smith," the traitor would say "James Smith" as part of a conversation.
Another traitor may then respond with: "They enjoy running through the void-filled vacuum of the derelict."
The phrase should then have the words: James Smith.
The response should then have the words: run, void, and derelict.
This way assures that the code is suited to the conversation and is unpredicatable.
Obviously, some people will be better at this than others but in theory, everyone should be able to do it and it only enhances roleplay.
Can probably be done through "{ }" but I don't really see the practical benefit.
One example of an earlier system is commented below.
-N
*/

/proc/generate_code_phrase()//Proc is used for phrase and response in subsystem init.

var/code_phrase = ""//What is returned when the proc finishes.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.

//Cached regex search - for checking if codewords are used.
GLOBAL_DATUM(syndicate_code_phrase_regex, /regex)
GLOBAL_DATUM(syndicate_code_response_regex, /regex)

/// This proc generates a list of 2-5 words, used for traitor phrase/response generation.
/proc/generate_codephrase_list()

. = list() //What is returned when the proc finishes.
var/words = pick(//How many words there will be. Minimum of two. 2, 4 and 5 have a lesser chance of being selected. 3 is the most likely.
50; 2,
200; 3,
50; 4,
25; 5
)

var/safety[] = list(1,2,3)//Tells the proc which options to remove later on.
var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
var/locations[] = length(stationlocs) ? stationlocs : drinks//if null, defaults to drinks instead.
var/list/safety = list(1,2,3)//Tells the proc which options to remove later on.
var/list/nouns = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
var/list/drinks = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee","manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
var/list/locations = length(stationlocs) ? stationlocs : drinks//if null, defaults to drinks instead.

var/names[] = list()
for(var/datum/computer_file/report/crew_record/t in GLOB.all_crew_records)//Picks from crew manifest.
var/list/names = list()
for(var/datum/computer_file/report/crew_record/t in GLOB.all_crew_records) //Picks from crew manifest.
names += t.get_name()

var/maxwords = words//Extra var to check for duplicates.
var/maxwords = words //Extra var to check for duplicates.

for(words,words>0,words--)//Randomly picks from one of the choices below.
for(words, words > 0, words--) //Randomly picks from one of the choices below.

if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
safety = list(pick(1,2))//Select choice 1 or 2.
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
safety = list(3)//Default to list 3
if(words == 1 && (1 in safety) && (2 in safety)) //If there is only one word remaining and choice 1 or 2 have not been selected.
safety = list(pick(1,2)) //Select choice 1 or 2.
else if(words == 1 && maxwords == 2) //Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
safety = list(3) //Default to list 3

switch(pick(safety))//Chance based on the safety list.
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
switch(rand(1,2))//Mainly to add more options later.
switch(pick(safety)) //Chance based on the safety list.
if(1) //1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
switch(rand(1, 2)) //Mainly to add more options later.
if(1)
if(names.len&&prob(70))
code_phrase += pick(names)
if(names.len && prob(70))
. += pick(names)
else
code_phrase += pick(pick(GLOB.first_names_male,GLOB.first_names_female))
code_phrase += " "
code_phrase += pick(GLOB.last_names)
. += "[pick(pick(GLOB.first_names_male, GLOB.first_names_female))] [pick(GLOB.last_names)]"
if(2)
code_phrase += pick(SSjobs.titles_to_datums) //Returns a job.
. += pick(SSjobs.titles_to_datums) //Returns a job.
safety -= 1
if(2)
switch(rand(1,2))//Places or things.
if(1)
code_phrase += pick(drinks)
. += pick(drinks)
if(2)
code_phrase += pick(locations)
. += pick(locations)
safety -= 2
if(3)
switch(rand(1,3))//Nouns, adjectives, verbs. Can be selected more than once.
if(1)
code_phrase += pick(nouns)
. += pick(nouns)
if(2)
code_phrase += pick(GLOB.adjectives)
. += pick(GLOB.adjectives)
if(3)
code_phrase += pick(GLOB.verbs)
if(words==1)
code_phrase += "."
else
code_phrase += ", "

return code_phrase
. += pick(GLOB.verbs)

/proc/get_name(atom/A)
return A.name
Expand Down
45 changes: 23 additions & 22 deletions code/_helpers/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(t as text)
var/sqltext = dbcon.Quote(t);
return copytext(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that
return copytext_char(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that

// Adds a prefix to the table parameter, used in SQL to unify all tables under a common prefix, i.e. "tegu__[tablename]"
/proc/format_table_name(table as text)
Expand All @@ -28,7 +28,7 @@

//Used for preprocessing entered text
//Added in an additional check to alert players if input is too long
/proc/sanitize(input, max_length = MAX_MESSAGE_LEN, encode = 1, trim = 1, extra = 1)
/proc/sanitize(input, max_length = MAX_MESSAGE_LEN, encode = 0, trim = 1, extra = 1)
if(!input)
return

Expand All @@ -38,7 +38,7 @@
var/overflow = ((length(input)+1) - max_length)
to_chat(usr, SPAN_WARNING("Your message is too long by [overflow] character\s."))
return
input = copytext(input,1,max_length)
input = copytext_char(input,1,max_length)

if(extra)
input = replace_characters(input, list("\n"=" ","\t"=" "))
Expand All @@ -55,7 +55,7 @@
input = replace_characters(input, list("<"=" ", ">"=" "))

if(trim)
//Maybe, we need trim text twice? Here and before copytext?
//Maybe, we need trim text twice? Here and before copytext_char?
input = trim(input)

return input
Expand Down Expand Up @@ -126,7 +126,7 @@
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"

if(last_char_group == 1)
output = copytext(output,1,length(output)) //removes the last character (in this case a space)
output = copytext_char(output,1,length(output)) //removes the last character (in this case a space)

for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names
if(cmptext(output,bad_name)) return //(not case sensitive)
Expand Down Expand Up @@ -255,14 +255,14 @@
/proc/trim_left(text)
for (var/i = 1 to length(text))
if (text2ascii(text, i) > 32)
return copytext(text, i)
return copytext_char(text, i)
return ""

//Returns a string with reserved characters and spaces after the last letter removed
/proc/trim_right(text)
for (var/i = length(text), i > 0, i--)
if (text2ascii(text, i) > 32)
return copytext(text, 1, i + 1)
return copytext_char(text, 1, i + 1)
return ""

//Returns a string with reserved characters and spaces before the first word and after the last word removed.
Expand All @@ -271,7 +271,7 @@

//Returns a string with the first element of the string capitalized.
/proc/capitalize(t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
return uppertext(copytext_char(t, 1, 2)) + copytext_char(t, 2)

//This proc strips html properly, remove < > and all text between
//for complete text sanitizing should be used sanitize()
Expand All @@ -295,6 +295,7 @@
input = copytext(input, (closetag + 1))
else
break
break

return input

Expand All @@ -306,15 +307,15 @@
if(length(text) != length(compare))
return 0
for(var/i = 1, i < length(text), i++)
var/a = copytext(text,i,i+1)
var/b = copytext(compare,i,i+1)
var/a = copytext_char(text,i,i+1)
var/b = copytext_char(compare,i,i+1)
//if it isn't both the same letter, or if they are both the replacement character
//(no way to know what it was supposed to be)
if(a != b)
if(a == replace) //if A is the replacement char
newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1)
newtext = copytext_char(newtext,1,i) + b + copytext_char(newtext, i+1)
else if(b == replace) //if B is the replacement char
newtext = copytext(newtext,1,i) + a + copytext(newtext, i+1)
newtext = copytext_char(newtext,1,i) + a + copytext_char(newtext, i+1)
else //The lists disagree, Uh-oh!
return 0
return newtext
Expand All @@ -326,15 +327,15 @@
return 0
var/count = 0
for(var/i = 1, i <= length(text), i++)
var/a = copytext(text,i,i+1)
var/a = copytext_char(text,i,i+1)
if(a == character)
count++
return count

/proc/reverse_text(text = "")
var/new_text = ""
for(var/i = length(text); i > 0; i--)
new_text += copytext(text, i, i+1)
new_text += copytext_char(text, i, i+1)
return new_text

//Used in preferences' SetFlavorText and human's set_flavor verb
Expand All @@ -350,7 +351,7 @@

//alternative copytext() for encoded text, doesn't break html entities (&#34; and other)
/proc/copytext_preserve_html(text, first, last)
return html_encode(copytext(html_decode(text), first, last))
return html_encode(copytext_char(html_decode(text), first, last))

/proc/create_text_tag(tagname, tagdesc = tagname, client/C = null)
if(!(C?.get_preference_value(/datum/client_preference/chat_tags) == GLOB.PREF_SHOW))
Expand Down Expand Up @@ -671,9 +672,9 @@
if(!next_space) //trailing bs
return string

var/base = next_backslash == 1 ? "" : copytext(string, 1, next_backslash)
var/macro = lowertext(copytext(string, next_backslash + 1, next_space))
var/rest = next_backslash > leng ? "" : copytext(string, next_space + 1)
var/base = next_backslash == 1 ? "" : copytext_char(string, 1, next_backslash)
var/macro = lowertext(copytext_char(string, next_backslash + 1, next_space))
var/rest = next_backslash > leng ? "" : copytext_char(string, next_space + 1)

//See http://www.byond.com/docs/ref/info.html#/DM/text/macros
switch(macro)
Expand Down Expand Up @@ -750,8 +751,8 @@
/proc/text2regex(text)
var/end = findlasttext(text, "/")
if (end > 2 && length(text) > 2 && text[1] == "/")
var/flags = end == length(text) ? FALSE : copytext(text, end + 1)
var/matcher = copytext(text, 2, end)
var/flags = end == length(text) ? FALSE : copytext_char(text, end + 1)
var/matcher = copytext_char(text, 2, end)
try
return flags ? regex(matcher, flags) : regex(matcher)
catch()
Expand Down Expand Up @@ -779,7 +780,7 @@
if(isnull(user_input)) // User pressed cancel
return
if(no_trim)
return copytext(html_encode(user_input), 1, max_length)
return copytext_char(html_encode(user_input), 1, max_length)
else
return trim(html_encode(user_input), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into &lt;)

Expand All @@ -798,7 +799,7 @@
if(isnull(user_input)) // User pressed cancel
return
if(no_trim)
return copytext(html_encode(user_input), 1, max_length)
return copytext_char(html_encode(user_input), 1, max_length)
else
return trim(html_encode(user_input), max_length)

Expand Down
Loading
Loading