Oh hey, all of those compile fixes
This commit is contained in:
@@ -93,7 +93,7 @@ with open("..\\config\\admins.txt") as admins_file:
|
||||
matches = re.match("(.+)\\b\\s+=\\s+(.+)", line)
|
||||
ckey = "".join((c for c in matches.group(1) if c not in ckeyformat)).lower()
|
||||
rank = "".join((c for c in matches.group(2) if c not in ckeyExformat))
|
||||
cursor.execute("INSERT INTO {0} (ckey, rank) VALUES ('{1}', '{2}')".format(admin_table, ckey, rank))
|
||||
cursor.execute("INSERT INTO {0} (ckey, rank) VALUES ('{1}', '{2}')".format(admin_table, ckey, rank))
|
||||
db.commit()
|
||||
cursor.close()
|
||||
print("Import complete.")
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
|
||||
|
||||
The latest database version is 4.4; The query to update the schema revision table is:
|
||||
The latest database version is 4.7; The query to update the schema revision table is:
|
||||
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 4);
|
||||
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (4, 7);
|
||||
or
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 4);
|
||||
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (4, 7);
|
||||
|
||||
In any query remember to add a prefix to the table names if you use one.
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 4.7, 18 August 2018, by CitrusGender
|
||||
Modified table `messages`, adding column `severity` to classify notes based on their severity.
|
||||
|
||||
ALTER TABLE `messages` ADD `severity` enum('high','medium','minor','none') DEFAULT NULL AFTER `expire_timestamp`
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 4.6, 11 August 2018, by Jordie0608
|
||||
Modified table `messages`, adding column `expire_timestamp` to allow for auto-"deleting" messages.
|
||||
|
||||
ALTER TABLE `messages` ADD `expire_timestamp` DATETIME NULL DEFAULT NULL AFTER `secret`;
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 4.5, 9 July 2018, by Jordie0608
|
||||
Modified table `player`, adding column `byond_key` to store a user's key along with their ckey.
|
||||
To populate this new column run the included script 'populate_key_2018-07', see the file for use instructions.
|
||||
|
||||
ALTER TABLE `player` ADD `byond_key` VARCHAR(32) DEFAULT NULL AFTER `ckey`;
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Version 4.4, 9 May 2018, by Jordie0608
|
||||
Modified table `round`, renaming column `start_datetime` to `initialize_datetime` and `end_datetime` to `shutdown_datetime` and adding columns to replace both under the same name in preparation for changes to TGS server initialization.
|
||||
|
||||
|
||||
92
SQL/populate_key_2018-07-09.py
Normal file
92
SQL/populate_key_2018-07-09.py
Normal file
@@ -0,0 +1,92 @@
|
||||
#Python 3+ Script for populating the key of all ckeys in player table made by Jordie0608
|
||||
#
|
||||
#Before starting ensure you have installed the mysqlclient package https://github.com/PyMySQL/mysqlclient-python
|
||||
#It can be downloaded from command line with pip:
|
||||
#pip install mysqlclient
|
||||
#And that you have run the most recent commands listed in database_changelog.txt
|
||||
#
|
||||
#To view the parameters for this script, execute it with the argument --help
|
||||
#All the positional arguments are required, remember to include a prefixe in your table name if you use one
|
||||
#--useckey and --onlynull are optional arguments, see --help for their function
|
||||
#An example of the command used to execute this script from powershell:
|
||||
#python populate_key_2018-07-09.py "localhost" "root" "password" "feedback" "SS13_player" --onlynull --useckey
|
||||
#
|
||||
#This script requires an internet connection to function
|
||||
#Sometimes byond.com fails to return the page for a valid ckey, this can be a temporary problem and may be resolved by rerunning the script
|
||||
#You can have the script use the existing ckey instead if the key is unable to be parsed with the --useckey optional argument
|
||||
#To make the script only iterate on rows that failed to parse a ckey and have a null byond_key column, use the --onlynull optional argument
|
||||
#To make the script only iterate on rows that have a matching ckey and byond_key column, use the --onlyckeymatch optional argument
|
||||
#The --onlynull and --onlyckeymatch arguments are mutually exclusive, the script can't be run with both of them enabled
|
||||
#
|
||||
#It's safe to run this script with your game server(s) active.
|
||||
|
||||
import MySQLdb
|
||||
import argparse
|
||||
import re
|
||||
import sys
|
||||
from urllib.request import urlopen
|
||||
from datetime import datetime
|
||||
|
||||
if sys.version_info[0] < 3:
|
||||
raise Exception("Python must be at least version 3 for this script.")
|
||||
query_values = ""
|
||||
current_round = 0
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("address", help="MySQL server address (use localhost for the current computer)")
|
||||
parser.add_argument("username", help="MySQL login username")
|
||||
parser.add_argument("password", help="MySQL login password")
|
||||
parser.add_argument("database", help="Database name")
|
||||
parser.add_argument("playertable", help="Name of the player table (remember a prefix if you use one)")
|
||||
parser.add_argument("--useckey", help="Use the player's ckey for their key if unable to contact or parse their member page", action="store_true")
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument("--onlynull", help="Only try to update rows if their byond_key column is null, mutually exclusive with --onlyckeymatch", action="store_true")
|
||||
group.add_argument("--onlyckeymatch", help="Only try to update rows that have matching ckey and byond_key columns from the --useckey argument, mutually exclusive with --onlynull", action="store_true")
|
||||
args = parser.parse_args()
|
||||
where = ""
|
||||
if args.onlynull:
|
||||
where = " WHERE byond_key IS NULL"
|
||||
if args.onlyckeymatch:
|
||||
where = " WHERE byond_key = ckey"
|
||||
db=MySQLdb.connect(host=args.address, user=args.username, passwd=args.password, db=args.database)
|
||||
cursor=db.cursor()
|
||||
player_table = args.playertable
|
||||
cursor.execute("SELECT ckey FROM {0}{1}".format(player_table, where))
|
||||
ckey_list = cursor.fetchall()
|
||||
failed_ckeys = []
|
||||
start_time = datetime.now()
|
||||
success = 0
|
||||
fail = 0
|
||||
print("Beginning script at {0}".format(start_time.strftime("%Y-%m-%d %H:%M:%S")))
|
||||
if not ckey_list:
|
||||
print("Query returned no rows")
|
||||
for current_ckey in ckey_list:
|
||||
link = urlopen("https://secure.byond.com/members/{0}/?format=text".format(current_ckey[0]))
|
||||
data = link.read()
|
||||
data = data.decode("ISO-8859-1")
|
||||
match = re.search("\tkey = \"(.+)\"", data)
|
||||
if match:
|
||||
key = match.group(1)
|
||||
success += 1
|
||||
else:
|
||||
fail += 1
|
||||
failed_ckeys.append(current_ckey[0])
|
||||
msg = "Failed to parse a key for {0}".format(current_ckey[0])
|
||||
if args.useckey:
|
||||
msg += ", using their ckey instead"
|
||||
print(msg)
|
||||
key = current_ckey[0]
|
||||
else:
|
||||
print(msg)
|
||||
continue
|
||||
cursor.execute("UPDATE {0} SET byond_key = %s WHERE ckey = %s".format(player_table), (key, current_ckey[0]))
|
||||
db.commit()
|
||||
end_time = datetime.now()
|
||||
print("Script completed at {0} with duration {1}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), end_time - start_time))
|
||||
if failed_ckeys:
|
||||
if args.useckey:
|
||||
print("The following ckeys failed to parse a key so their ckey was used instead:")
|
||||
else:
|
||||
print("The following ckeys failed to parse a key and were skipped:")
|
||||
print("\n".join(failed_ckeys))
|
||||
print("Keys successfully parsed: {0} Keys failed parsing: {1}".format(success, fail))
|
||||
cursor.close()
|
||||
@@ -253,6 +253,8 @@ CREATE TABLE `messages` (
|
||||
`server_port` smallint(5) unsigned NOT NULL,
|
||||
`round_id` int(11) unsigned NOT NULL,
|
||||
`secret` tinyint(1) unsigned NOT NULL,
|
||||
`expire_timestamp` datetime DEFAULT NULL,
|
||||
`severity` enum('high','medium','minor','none') DEFAULT NULL,
|
||||
`lasteditor` varchar(32) DEFAULT NULL,
|
||||
`edits` text,
|
||||
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
@@ -309,6 +311,7 @@ DROP TABLE IF EXISTS `player`;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `player` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`byond_key` varchar(32) DEFAULT NULL,
|
||||
`firstseen` datetime NOT NULL,
|
||||
`firstseen_round_id` int(11) unsigned NOT NULL,
|
||||
`lastseen` datetime NOT NULL,
|
||||
|
||||
@@ -253,6 +253,8 @@ CREATE TABLE `SS13_messages` (
|
||||
`server_port` smallint(5) unsigned NOT NULL,
|
||||
`round_id` int(11) unsigned NOT NULL,
|
||||
`secret` tinyint(1) unsigned NOT NULL,
|
||||
`expire_timestamp` datetime DEFAULT NULL,
|
||||
`severity` enum('high','medium','minor','none') DEFAULT NULL,
|
||||
`lasteditor` varchar(32) DEFAULT NULL,
|
||||
`edits` text,
|
||||
`deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
@@ -309,6 +311,7 @@ DROP TABLE IF EXISTS `SS13_player`;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `SS13_player` (
|
||||
`ckey` varchar(32) NOT NULL,
|
||||
`byond_key` varchar(32) DEFAULT NULL,
|
||||
`firstseen` datetime NOT NULL,
|
||||
`firstseen_round_id` int(11) unsigned NOT NULL,
|
||||
`lastseen` datetime NOT NULL,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -100,8 +100,7 @@
|
||||
#define FIRE_HELM_MIN_TEMP_PROTECT 60 //Cold protection for fire helmets
|
||||
#define FIRE_HELM_MAX_TEMP_PROTECT 30000 //for fire helmet quality items (red and white hardhats)
|
||||
|
||||
#define FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT 35000 //what max_heat_protection_temperature is set to for firesuit quality suits. MUST NOT BE 0.
|
||||
#define FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT 35000 //for fire helmet quality items (red and white hardhats)
|
||||
#define FIRE_IMMUNITY_MAX_TEMP_PROTECT 35000 //what max_heat_protection_temperature is set to for firesuit quality suits and helmets. MUST NOT BE 0.
|
||||
|
||||
#define HELMET_MIN_TEMP_PROTECT 160 //For normal helmets
|
||||
#define HELMET_MAX_TEMP_PROTECT 600 //For normal helmets
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/datum/component/beauty
|
||||
var/beauty = 0
|
||||
|
||||
/datum/component/beauty/Initialize(beautyamount)
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
beauty = beautyamount
|
||||
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
|
||||
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
|
||||
var/area/A = get_area(parent)
|
||||
if(!A || A.outdoors)
|
||||
return
|
||||
A.totalbeauty += beauty
|
||||
A.update_beauty()
|
||||
|
||||
/datum/component/beauty/proc/enter_area(area/A)
|
||||
if(A.outdoors) //Fuck the outside.
|
||||
return FALSE
|
||||
A.totalbeauty += beauty
|
||||
A.update_beauty()
|
||||
|
||||
/datum/component/beauty/proc/exit_area(area/A)
|
||||
if(A.outdoors) //Fuck the outside.
|
||||
return FALSE
|
||||
A.totalbeauty -= beauty
|
||||
A.update_beauty()
|
||||
|
||||
/datum/component/beauty/Destroy()
|
||||
. = ..()
|
||||
var/area/A = get_area(parent)
|
||||
if(!A || A.outdoors)
|
||||
return
|
||||
A.totalbeauty -= beauty
|
||||
A.update_beauty()
|
||||
@@ -599,8 +599,6 @@
|
||||
log_whisper(log_text)
|
||||
if(LOG_EMOTE)
|
||||
log_emote(log_text)
|
||||
if(LOG_SUBTLE)
|
||||
log_subtle(log_text)
|
||||
if(LOG_DSAY)
|
||||
log_dsay(log_text)
|
||||
if(LOG_PDA)
|
||||
@@ -613,8 +611,6 @@
|
||||
log_telecomms(log_text)
|
||||
if(LOG_OOC)
|
||||
log_ooc(log_text)
|
||||
if(LOG_LOOC)
|
||||
log_looc(log_text)
|
||||
if(LOG_ADMIN)
|
||||
log_admin(log_text)
|
||||
if(LOG_ADMIN_PRIVATE)
|
||||
@@ -697,4 +693,10 @@ Proc for attack log creation, because really why not
|
||||
|
||||
/atom/movable/proc/get_filter(name)
|
||||
if(filter_data && filter_data[name])
|
||||
return filters[filter_data.Find(name)]
|
||||
return filters[filter_data.Find(name)]
|
||||
|
||||
/atom/movable/proc/remove_filter(name)
|
||||
if(filter_data[name])
|
||||
filter_data -= name
|
||||
update_filters()
|
||||
return TRUE
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
/obj/machinery/computer/shuttle/monastery_shuttle
|
||||
name = "monastery shuttle console"
|
||||
desc = "Used to control the monastery shuttle."
|
||||
circuit = /obj/item/circuitboard/computer/monastery_shuttle
|
||||
shuttleId = "pod1"
|
||||
possible_destinations = "monastery_shuttle_asteroid;monastery_shuttle_station"
|
||||
no_destination_swap = TRUE
|
||||
@@ -128,6 +128,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
@@ -183,6 +185,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
name = "lifeguard sleeper"
|
||||
id_job = "Lifeguard"
|
||||
uniform = /obj/item/clothing/under/shorts/red
|
||||
|
||||
|
||||
/datum/outfit/beachbum
|
||||
name = "Beach Bum"
|
||||
glasses = /obj/item/clothing/glasses/sunglasses
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
// Drop the dox!
|
||||
|
||||
// Selling Syndicate docs to NT
|
||||
/datum/export/intel
|
||||
cost = 25000
|
||||
k_elasticity = 0
|
||||
unit_name = "original article"
|
||||
message = "of enemy intelligence"
|
||||
var/global/originals_recieved = list()
|
||||
var/global/copies_recieved = list()
|
||||
var/copy_path = null
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
|
||||
/datum/export/intel/applies_to(obj/O, contr = 0, emag = 0)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if(emagged != emag) // Emagging the console will stop you from selling Syndicate docs to NT.
|
||||
return FALSE
|
||||
|
||||
// No docs double-selling!
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
if(!C.copy_type)
|
||||
return FALSE
|
||||
if((C.copy_type in originals_recieved) || (C.copy_type in copies_recieved))
|
||||
return FALSE
|
||||
if(copy_path && !ispath(C.copy_type, copy_path))
|
||||
return FALSE
|
||||
|
||||
else if(O.type in originals_recieved)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/export/intel/get_cost(obj/O)
|
||||
if(O.type in copies_recieved)
|
||||
return ..() - 15000 // Already have a copy of it, deduce the cost.
|
||||
return ..()
|
||||
|
||||
/datum/export/intel/sell_object(obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
copies_recieved += C.copy_type
|
||||
else
|
||||
originals_recieved += O.type
|
||||
|
||||
/datum/export/intel/photocopy
|
||||
cost = 15000 // Allows double agents to earn some cargo points without failing their objectives.
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/syndicate
|
||||
|
||||
|
||||
|
||||
// Selling NT docs to Syndicate
|
||||
/datum/export/intel/syndie
|
||||
message = "of Nanotrasen intelligence"
|
||||
export_types = list(/obj/item/documents/nanotrasen)
|
||||
emagged = TRUE
|
||||
|
||||
/datum/export/intel/syndie/photocopy
|
||||
cost = 15000
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/nanotrasen
|
||||
|
||||
// Selling Syndicate docs to Syndicate, why not?
|
||||
/datum/export/intel/syndie/recovered
|
||||
cost = 15000
|
||||
unit_name = "recovered article"
|
||||
message = "of Syndicate intelligence"
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
// Syndicate only wants originals of their docs recovered.
|
||||
@@ -1,65 +0,0 @@
|
||||
//Tendril chest artifacts and ruin loot. Includes ash drake loot since they drop two sets of armor + random item
|
||||
//Consumable or one-use items like the magic D20 and gluttony's blessing are omitted
|
||||
|
||||
/datum/export/lavaland/minor
|
||||
cost = 10000
|
||||
unit_name = "minor lava planet artifact"
|
||||
export_types = list(/obj/item/immortality_talisman,
|
||||
/obj/item/book_of_babel,
|
||||
/obj/item/gun/magic/hook,
|
||||
/obj/item/wisp_lantern,
|
||||
/obj/item/reagent_containers/glass/bottle/potion/flight,
|
||||
/obj/item/katana/cursed,
|
||||
/obj/item/clothing/glasses/godeye,
|
||||
/obj/item/melee/ghost_sword,
|
||||
/obj/item/clothing/suit/space/hardsuit/cult,
|
||||
/obj/item/voodoo,
|
||||
/obj/item/grenade/clusterbuster/inferno,
|
||||
/obj/item/clothing/neck/necklace/memento_mori,
|
||||
/obj/item/organ/heart/cursed/wizard,
|
||||
/obj/item/clothing/suit/hooded/cloak/drake,
|
||||
/obj/item/dragons_blood,
|
||||
/obj/item/lava_staff,
|
||||
/obj/item/ship_in_a_bottle,
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes,
|
||||
/obj/item/gun/magic/staff/honk,
|
||||
/obj/item/kitchen/knife/envy,
|
||||
/obj/item/gun/ballistic/revolver/russian/soul,
|
||||
/obj/item/veilrender/vealrender)
|
||||
|
||||
/datum/export/lavaland/major //valuable chest/ruin loot and staff of storms
|
||||
cost = 20000
|
||||
unit_name = "lava planet artifact"
|
||||
export_types = list(/obj/item/guardiancreator,
|
||||
/obj/item/rod_of_asclepius,
|
||||
/obj/item/clothing/suit/space/hardsuit/ert/paranormal,
|
||||
/obj/item/prisoncube,
|
||||
/obj/item/staff/storm)
|
||||
|
||||
//Megafauna loot, except for ash drakes and legion
|
||||
|
||||
/datum/export/lavaland/megafauna
|
||||
cost = 40000
|
||||
unit_name = "major lava planet artifact"
|
||||
export_types = list(/obj/item/hierophant_club,
|
||||
/obj/item/melee/transforming/cleaving_saw,
|
||||
/obj/item/organ/vocal_cords/colossus,
|
||||
/obj/machinery/anomalous_crystal,
|
||||
/obj/item/mayhem,
|
||||
/obj/item/blood_contract,
|
||||
/obj/item/gun/magic/staff/spellblade)
|
||||
|
||||
/datum/export/lavaland/megafauna/total_printout(datum/export_report/ex, notes = TRUE) //in the unlikely case a miner feels like selling megafauna loot
|
||||
. = ..()
|
||||
if(. && notes)
|
||||
. += " On behalf of the Nanotrasen RnD division: Thank you for your hard work."
|
||||
|
||||
/datum/export/lavaland/megafauna/hev/suit
|
||||
cost = 30000
|
||||
unit_name = "H.E.C.K. suit"
|
||||
export_types = list(/obj/item/clothing/suit/space/hostile_environment)
|
||||
|
||||
/datum/export/lavaland/megafauna/hev/helmet
|
||||
cost = 10000
|
||||
unit_name = "H.E.C.K. helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/space/hostile_environment)
|
||||
@@ -1,123 +0,0 @@
|
||||
// Organs.
|
||||
|
||||
|
||||
// Alien organs
|
||||
/datum/export/organ/alien/get_cost(O, contr = 0, emag = 0)
|
||||
. = ..()
|
||||
if(emag) // Syndicate really wants some new bio-weapons.
|
||||
. *= 2
|
||||
|
||||
/datum/export/organ/alien/brain
|
||||
cost = 5000
|
||||
unit_name = "alien brain"
|
||||
export_types = list(/obj/item/organ/brain/alien)
|
||||
|
||||
/datum/export/organ/alien/acid
|
||||
cost = 5000
|
||||
unit_name = "alien acid gland"
|
||||
export_types = list(/obj/item/organ/alien/acid)
|
||||
|
||||
/datum/export/organ/alien/hivenode
|
||||
cost = 5000
|
||||
unit_name = "alien hive node"
|
||||
export_types = list(/obj/item/organ/alien/hivenode)
|
||||
|
||||
/datum/export/organ/alien/neurotoxin
|
||||
cost = 5000
|
||||
unit_name = "alien neurotoxin gland"
|
||||
export_types = list(/obj/item/organ/alien/neurotoxin)
|
||||
|
||||
/datum/export/organ/alien/resinspinner
|
||||
cost = 5000
|
||||
unit_name = "alien resin spinner"
|
||||
|
||||
/datum/export/organ/alien/plasmavessel
|
||||
cost = 5000
|
||||
unit_name = "alien plasma vessel"
|
||||
export_types = list(/obj/item/organ/alien/plasmavessel)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/alien/plasmavessel/P)
|
||||
return ..() + (P.max_plasma * 2) + (P.plasma_rate * 20)
|
||||
|
||||
|
||||
|
||||
/datum/export/organ/alien/embryo
|
||||
cost = 5000 // Allows buyer to set up his own alien farm.
|
||||
unit_name = "alien embryo"
|
||||
export_types = list(/obj/item/organ/body_egg/alien_embryo)
|
||||
|
||||
/datum/export/organ/alien/eggsac
|
||||
cost = 10000 // Even better than a single embryo.
|
||||
unit_name = "alien egg sac"
|
||||
export_types = list(/obj/item/organ/alien/eggsac)
|
||||
|
||||
|
||||
// Other alien organs.
|
||||
/datum/export/organ/alien/abductor
|
||||
cost = 2500
|
||||
unit_name = "abductor gland"
|
||||
export_types = list(/obj/item/organ/heart/gland)
|
||||
|
||||
/datum/export/organ/alien/changeling_egg
|
||||
cost = 50000 // Holy. Fuck.
|
||||
unit_name = "changeling egg"
|
||||
export_types = list(/obj/item/organ/body_egg/changeling_egg)
|
||||
|
||||
|
||||
/datum/export/organ/hivelord
|
||||
cost = 1500
|
||||
unit_name = "active regenerative core"
|
||||
export_types = list(/obj/item/organ/regenerative_core)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/regenerative_core/C)
|
||||
if(C.inert)
|
||||
return ..() / 3
|
||||
if(C.preserved)
|
||||
return ..() * 2
|
||||
return ..()
|
||||
|
||||
// Mutant race organs.
|
||||
/datum/export/organ/mutant/cat_ears
|
||||
cost = 1000
|
||||
unit_name = "cat ears pair"
|
||||
export_types = list(/obj/item/organ/ears/cat)
|
||||
|
||||
/datum/export/organ/mutant/cat_tail
|
||||
cost = 1000
|
||||
unit_name = "cat tail"
|
||||
export_types = list(/obj/item/organ/tail/cat)
|
||||
|
||||
/datum/export/organ/mutant/lizard_tail
|
||||
cost = 200
|
||||
unit_name = "lizard tail"
|
||||
export_types = list(/obj/item/organ/tail/lizard)
|
||||
|
||||
// Human organs.
|
||||
|
||||
// Do not put human brains here, they are not sellable for a purpose.
|
||||
// If they would be sellable, X-Porter cannon's finishing move (selling victim's organs) will be instakill with no revive.
|
||||
|
||||
/datum/export/organ/human
|
||||
contraband = TRUE
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/organ/human/heart
|
||||
cost = 500
|
||||
unit_name = "heart"
|
||||
export_types = list(/obj/item/organ/heart)
|
||||
|
||||
/datum/export/organ/human/lungs
|
||||
cost = 400
|
||||
unit_name = "pair"
|
||||
message = "of lungs"
|
||||
export_types = list(/obj/item/organ/lungs)
|
||||
|
||||
/datum/export/organ/human/appendix
|
||||
cost = 50
|
||||
unit_name = "appendix"
|
||||
export_types = list(/obj/item/organ/appendix)
|
||||
|
||||
/datum/export/organ/human/appendix/get_cost(obj/item/organ/appendix/O)
|
||||
if(O.inflamed)
|
||||
return 0
|
||||
return ..()
|
||||
@@ -609,7 +609,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "</td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
if(3)
|
||||
if(3)
|
||||
if(!gear_tab)
|
||||
gear_tab = GLOB.loadout_items[1]
|
||||
dat += "<table align='center' width='100%'>"
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in AOOC: [msg]")
|
||||
return
|
||||
|
||||
log_talk(mob,"(AOOC) [key_name(src)] : [raw_msg]",LOGOOC)
|
||||
mob.log_message("(AOOC) [key]: [raw_msg]", INDIVIDUAL_OOC_LOG)
|
||||
mob.log_talk(raw_msg,LOG_OOC, tag="(AOOC)")
|
||||
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
||||
mob.log_message("(LOCAL): [msg]", INDIVIDUAL_OOC_LOG)
|
||||
mob.log_talk(msg,LOG_OOC, tag="(LOOC)")
|
||||
|
||||
var/list/heard = get_hearers_in_view(7, get_top_level_mob(src.mob))
|
||||
for(var/mob/M in heard)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
icon_state = "hardsuit0-knight"
|
||||
item_state = "hardsuit0-knight"
|
||||
armor = list(melee = 60, bullet = 40, laser = 40,energy = 30, bomb = 50, bio = 100, rad = 60)
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
item_color="knight"
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
slowdown = 1
|
||||
allowed = list(/obj/item/gun,/obj/item/melee/baton,/obj/item/tank,/obj/item/shield/energy,/obj/item/claymore)
|
||||
armor = list(melee = 60, bullet = 40, laser = 40,energy = 30, bomb = 50, bio = 100, rad = 60)
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
siemens_coefficient = 0.5
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/knight
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
@@ -135,5 +135,5 @@ obj/item/clothing/suit/space/bomberman
|
||||
slowdown = 0
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 100, bio = 0, rad = 0)
|
||||
siemens_coefficient = 0
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
icon = 'modular_citadel/icons/obj/clothing/vg_clothes.dmi'
|
||||
@@ -130,15 +130,12 @@ Shaft Miner
|
||||
var/obj/item/clothing/suit/hooded/S = H.wear_suit
|
||||
S.ToggleHood()
|
||||
|
||||
/datum/outfit/job/miner/equipped/asteroid
|
||||
name = "Shaft Miner (Asteroid + Equipment)"
|
||||
uniform = /obj/item/clothing/under/rank/miner
|
||||
shoes = /obj/item/clothing/shoes/workboots
|
||||
/datum/outfit/job/miner/equipped/hardsuit
|
||||
name = "Shaft Miner (Equipment + Hardsuit)"
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/mining
|
||||
mask = /obj/item/clothing/mask/breath
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Bartender
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
//If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect.
|
||||
var/req_admin_notify
|
||||
|
||||
var/custom_spawn_text
|
||||
|
||||
//If you have the use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.)
|
||||
var/minimal_player_age = 0
|
||||
|
||||
|
||||
@@ -130,11 +130,11 @@
|
||||
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
|
||||
//CITADEL EDIT Vore code required overrides
|
||||
if(istype(loc, /obj/item/dogborg/sleeper))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
if(ismob(loc))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
if(isbelly(loc))
|
||||
return FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
return FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
//END EDIT
|
||||
if(wear_suit)
|
||||
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
|
||||
|
||||
@@ -1394,7 +1394,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
user.visible_message("<span class='danger'>[user] slaps [target] in the face!</span>",
|
||||
"<span class='notice'>You slap [target] in the face! </span>",\
|
||||
"You hear a slap.")
|
||||
target.endTailWag()
|
||||
stop_wagging_tail(target)
|
||||
return FALSE
|
||||
else if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
|
||||
|
||||
@@ -1,145 +0,0 @@
|
||||
// Picture frames
|
||||
|
||||
/obj/item/wallframe/picture
|
||||
name = "picture frame"
|
||||
desc = "The perfect showcase for your favorite deathtrap memories."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
materials = list()
|
||||
flags_1 = 0
|
||||
icon_state = "frame-empty"
|
||||
result_path = /obj/structure/sign/picture_frame
|
||||
var/obj/item/photo/displayed
|
||||
|
||||
/obj/item/wallframe/picture/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/photo))
|
||||
if(!displayed)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
displayed = I
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class=notice>\The [src] already contains a photo.</span>")
|
||||
..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/wallframe/picture/attack_hand(mob/user)
|
||||
if(user.get_inactive_held_item() != src)
|
||||
..()
|
||||
return
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
user.put_in_hands(I)
|
||||
to_chat(user, "<span class='notice'>You carefully remove the photo from \the [src].</span>")
|
||||
displayed = null
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/wallframe/picture/attack_self(mob/user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/item/wallframe/picture/examine(mob/user)
|
||||
if(user.is_holding(src) && displayed)
|
||||
displayed.show(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wallframe/picture/update_icon()
|
||||
cut_overlays()
|
||||
if(displayed)
|
||||
add_overlay(getFlatIcon(displayed))
|
||||
|
||||
/obj/item/wallframe/picture/after_attach(obj/O)
|
||||
..()
|
||||
var/obj/structure/sign/picture_frame/PF = O
|
||||
PF.copy_overlays(src)
|
||||
if(displayed)
|
||||
PF.framed = displayed
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
I.forceMove(PF)
|
||||
|
||||
/obj/structure/sign/picture_frame
|
||||
name = "picture frame"
|
||||
desc = "Every time you look it makes you laugh."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "frame-empty"
|
||||
var/obj/item/photo/framed
|
||||
var/persistence_id
|
||||
|
||||
/obj/structure/sign/picture_frame/Initialize(mapload, dir, building)
|
||||
. = ..()
|
||||
LAZYADD(SSpersistence.photo_frames, src)
|
||||
if(dir)
|
||||
setDir(dir)
|
||||
if(building)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0
|
||||
|
||||
/obj/structure/sign/picture_frame/Destroy()
|
||||
LAZYREMOVE(SSpersistence.photo_frames, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/sign/picture_frame/proc/get_photo_id()
|
||||
if(istype(framed) && istype(framed.picture))
|
||||
return framed.picture.id
|
||||
|
||||
/obj/structure/sign/picture_frame/proc/load_from_id(id)
|
||||
var/obj/item/photo/P = load_photo_from_disk(id)
|
||||
if(istype(P))
|
||||
if(istype(framed))
|
||||
framed.forceMove(drop_location())
|
||||
else
|
||||
qdel(framed)
|
||||
framed = P
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/picture_frame/examine(mob/user)
|
||||
if(in_range(src, user) && framed)
|
||||
framed.show(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/sign/picture_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/screwdriver) || istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/photo))
|
||||
if(!framed)
|
||||
var/obj/item/photo/P = I
|
||||
if(!user.transferItemToLoc(P, src))
|
||||
return
|
||||
framed = P
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class=notice>\The [src] already contains a photo.</span>")
|
||||
|
||||
..()
|
||||
|
||||
/obj/structure/sign/picture_frame/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(framed)
|
||||
framed.show(user)
|
||||
|
||||
/obj/structure/sign/picture_frame/update_icon()
|
||||
cut_overlays()
|
||||
if(framed)
|
||||
add_overlay(getFlatIcon(framed))
|
||||
|
||||
/obj/structure/sign/picture_frame/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
var/obj/item/wallframe/picture/F = new /obj/item/wallframe/picture(loc)
|
||||
if(framed)
|
||||
F.displayed = framed
|
||||
framed = null
|
||||
if(contents.len)
|
||||
var/obj/item/I = pick(contents)
|
||||
I.forceMove(F)
|
||||
F.update_icon()
|
||||
qdel(src)
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Photo album
|
||||
*/
|
||||
/obj/item/storage/photo_album
|
||||
name = "photo album"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "album"
|
||||
item_state = "briefcase"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/briefcase_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/briefcase_righthand.dmi'
|
||||
resistance_flags = FLAMMABLE
|
||||
var/persistence_id
|
||||
|
||||
/obj/item/storage/photo_album/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.can_hold = typecacheof(list(/obj/item/photo))
|
||||
LAZYADD(SSpersistence.photo_albums, src)
|
||||
|
||||
/obj/item/storage/photo_album/Destroy()
|
||||
LAZYREMOVE(SSpersistence.photo_albums, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/photo_album/proc/get_picture_id_list()
|
||||
var/list/L = list()
|
||||
for(var/i in contents)
|
||||
if(istype(i, /obj/item/photo))
|
||||
L += i
|
||||
if(!L.len)
|
||||
return
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
var/obj/item/photo/P = i
|
||||
if(!istype(P.picture))
|
||||
continue
|
||||
. |= P.picture.id
|
||||
|
||||
/obj/item/storage/photo_album/proc/populate_from_id_list(list/ids)
|
||||
for(var/i in ids)
|
||||
var/obj/item/photo/P = load_photo_from_disk(i)
|
||||
if(istype(P))
|
||||
if(!SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, P, null, TRUE, TRUE))
|
||||
qdel(P)
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Photo
|
||||
*/
|
||||
/obj/item/photo
|
||||
name = "photo"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "photo"
|
||||
item_state = "paper"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 50
|
||||
grind_results = list("iodine" = 4)
|
||||
var/datum/picture/picture
|
||||
var/scribble //Scribble on the back.
|
||||
var/sillynewscastervar //Photo objects with this set to 1 will not be ejected by a newscaster. Only gets set to 1 if a silicon puts one of their images into a newscaster
|
||||
|
||||
/obj/item/photo/Initialize(mapload, datum/picture/P, datum_name = TRUE, datum_desc = TRUE)
|
||||
set_picture(P, datum_name, datum_desc)
|
||||
return ..()
|
||||
|
||||
/obj/item/photo/proc/set_picture(datum/picture/P, setname, setdesc)
|
||||
if(!istype(P))
|
||||
return
|
||||
picture = P
|
||||
update_icon()
|
||||
if(P.caption)
|
||||
scribble = P.caption
|
||||
if(setname && P.picture_name)
|
||||
name = P.picture_name
|
||||
if(setdesc && P.picture_desc)
|
||||
desc = P.picture_desc
|
||||
|
||||
/obj/item/photo/update_icon()
|
||||
var/icon/I = picture.get_small_icon()
|
||||
if(I)
|
||||
icon = I
|
||||
|
||||
/obj/item/photo/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] is taking one last look at \the [src]! It looks like [user.p_theyre()] giving in to death!</span>")//when you wanna look at photo of waifu one last time before you die...
|
||||
if (user.gender == MALE)
|
||||
playsound(user, 'sound/voice/human/manlaugh1.ogg', 50, 1)//EVERY TIME I DO IT MAKES ME LAUGH
|
||||
else if (user.gender == FEMALE)
|
||||
playsound(user, 'sound/voice/human/womanlaugh.ogg', 50, 1)
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/photo/attack_self(mob/user)
|
||||
user.examinate(src)
|
||||
|
||||
/obj/item/photo/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
|
||||
txt = copytext(txt, 1, 128)
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
scribble = txt
|
||||
..()
|
||||
|
||||
/obj/item/photo/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(in_range(src, user))
|
||||
show(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to get closer to get a good look at this photo!</span>")
|
||||
|
||||
/obj/item/photo/proc/show(mob/user)
|
||||
user << browse_rsc(picture.picture_image, "tmp_photo.png")
|
||||
user << browse("<html><head><title>[name]</title></head>" \
|
||||
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
|
||||
+ "<img src='tmp_photo.png' width='[picture.psize_y]' style='-ms-interpolation-mode:nearest-neighbor' />" \
|
||||
+ "[scribble ? "<br>Written on the back:<br><i>[scribble]</i>" : ""]"\
|
||||
+ "</body></html>", "window=photo_showing;size=[picture.psize_x + scribble? 128:0]x[picture.psize_y + scribble? 128:0]")
|
||||
onclose(user, "[name]")
|
||||
|
||||
/obj/item/photo/verb/rename()
|
||||
set name = "Rename photo"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
|
||||
//loc.loc check is for making possible renaming photos in clipboards
|
||||
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained())
|
||||
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(usr)
|
||||
@@ -1,3 +1,4 @@
|
||||
/*
|
||||
/datum/design/flightsuit
|
||||
name = "Flight Suit"
|
||||
desc = "A specialized hardsuit that is able to attach a flightpack and accessories.."
|
||||
@@ -29,7 +30,7 @@
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 5000, MAT_GOLD = 1500, MAT_SILVER = 1500, MAT_PLASMA = 2000, MAT_TITANIUM = 2000)
|
||||
construction_time = 100
|
||||
category = list("Misc")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING
|
||||
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING */
|
||||
|
||||
/datum/design/constructionhardsuit
|
||||
name = "Construction Hardsuit"
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
*
|
||||
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
|
||||
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
|
||||
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
|
||||
**/
|
||||
/datum/component/uplink
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/name = "syndicate uplink"
|
||||
var/active = FALSE
|
||||
var/lockable = TRUE
|
||||
var/locked = TRUE
|
||||
var/allow_restricted = TRUE
|
||||
var/telecrystals
|
||||
var/selected_cat
|
||||
var/owner = null
|
||||
var/datum/game_mode/gamemode
|
||||
var/datum/uplink_purchase_log/purchase_log
|
||||
var/list/uplink_items
|
||||
var/hidden_crystals = 0
|
||||
|
||||
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/interact)
|
||||
owner = _owner
|
||||
if(owner)
|
||||
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
|
||||
if(GLOB.uplink_purchase_logs_by_key[owner])
|
||||
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
|
||||
else
|
||||
purchase_log = new(owner, src)
|
||||
lockable = _lockable
|
||||
active = _enabled
|
||||
gamemode = _gamemode
|
||||
telecrystals = starting_tc
|
||||
if(!lockable)
|
||||
active = TRUE
|
||||
locked = FALSE
|
||||
|
||||
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
|
||||
lockable |= U.lockable
|
||||
active |= U.active
|
||||
if(!gamemode)
|
||||
gamemode = U.gamemode
|
||||
telecrystals += U.telecrystals
|
||||
if(purchase_log && U.purchase_log)
|
||||
purchase_log.MergeWithAndDel(U.purchase_log)
|
||||
|
||||
/datum/component/uplink/Destroy()
|
||||
GLOB.uplinks -= src
|
||||
gamemode = null
|
||||
return ..()
|
||||
|
||||
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
|
||||
var/amt = TC.amount
|
||||
telecrystals += amt
|
||||
TC.use(amt)
|
||||
|
||||
/datum/component/uplink/proc/set_gamemode(_gamemode)
|
||||
gamemode = _gamemode
|
||||
uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted)
|
||||
|
||||
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
|
||||
if(!active)
|
||||
return //no hitting everyone/everything just to try to slot tcs in!
|
||||
if(istype(I, /obj/item/stack/telecrystal))
|
||||
LoadTC(user, I)
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/UI = uplink_items[category][item]
|
||||
var/path = UI.refund_path || UI.item
|
||||
var/cost = UI.refund_amount || UI.cost
|
||||
if(I.type == path && UI.refundable && I.check_uplink_validity())
|
||||
telecrystals += cost
|
||||
purchase_log.total_spent -= cost
|
||||
to_chat(user, "<span class='notice'>[I] refunded.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/datum/component/uplink/proc/interact(mob/user)
|
||||
if(locked)
|
||||
return
|
||||
active = TRUE
|
||||
if(user)
|
||||
ui_interact(user)
|
||||
|
||||
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
active = TRUE
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.set_style("syndicate")
|
||||
ui.open()
|
||||
|
||||
/datum/component/uplink/ui_data(mob/user)
|
||||
if(!user.mind)
|
||||
return
|
||||
var/list/data = list()
|
||||
data["telecrystals"] = telecrystals
|
||||
data["lockable"] = lockable
|
||||
|
||||
data["categories"] = list()
|
||||
for(var/category in uplink_items)
|
||||
var/list/cat = list(
|
||||
"name" = category,
|
||||
"items" = (category == selected_cat ? list() : null))
|
||||
if(category == selected_cat)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
if(I.limited_stock == 0)
|
||||
continue
|
||||
if(I.restricted_roles.len)
|
||||
var/is_inaccessible = 1
|
||||
for(var/R in I.restricted_roles)
|
||||
if(R == user.mind.assigned_role)
|
||||
is_inaccessible = 0
|
||||
if(is_inaccessible)
|
||||
continue
|
||||
cat["items"] += list(list(
|
||||
"name" = I.name,
|
||||
"cost" = I.cost,
|
||||
"desc" = I.desc,
|
||||
))
|
||||
data["categories"] += list(cat)
|
||||
return data
|
||||
|
||||
/datum/component/uplink/ui_act(action, params)
|
||||
if(!active)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("buy")
|
||||
var/item = params["item"]
|
||||
|
||||
var/list/buyable_items = list()
|
||||
for(var/category in uplink_items)
|
||||
buyable_items += uplink_items[category]
|
||||
|
||||
if(item in buyable_items)
|
||||
var/datum/uplink_item/I = buyable_items[item]
|
||||
MakePurchase(usr, I)
|
||||
. = TRUE
|
||||
if("lock")
|
||||
active = FALSE
|
||||
locked = TRUE
|
||||
telecrystals += hidden_crystals
|
||||
hidden_crystals = 0
|
||||
SStgui.close_uis(src)
|
||||
if("select")
|
||||
selected_cat = params["category"]
|
||||
return TRUE
|
||||
|
||||
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
|
||||
if(!istype(U))
|
||||
return
|
||||
if (!user || user.incapacitated())
|
||||
return
|
||||
|
||||
if(telecrystals < U.cost || U.limited_stock == 0)
|
||||
return
|
||||
telecrystals -= U.cost
|
||||
|
||||
U.purchase(user, src)
|
||||
|
||||
if(U.limited_stock > 0)
|
||||
U.limited_stock -= 1
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
|
||||
return TRUE
|
||||
@@ -9,7 +9,7 @@
|
||||
if(M.mind)
|
||||
attacker_style = M.mind.martial_art
|
||||
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
|
||||
add_logs(M, H, "attempted to touch")
|
||||
log_combat(M, H, "attempted to touch")
|
||||
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
|
||||
return TRUE
|
||||
switch(M.a_intent)
|
||||
@@ -49,7 +49,7 @@
|
||||
"<span class='userdanger'>[user] has pushed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(40, EFFECT_KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
add_logs(user, target, "disarmed", " pushing them to the ground")
|
||||
log_combat(user, target, "disarmed", " pushing them to the ground")
|
||||
return
|
||||
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
/mob/living/Move(atom/newloc, direct)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(makesfootstepsounds)
|
||||
CitFootstep(newloc)
|
||||
pseudo_z_axis = newloc.get_fake_z()
|
||||
pixel_z = pseudo_z_axis
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_inv_handcuffed(0)
|
||||
to_chat(user,"<span class='notice'>You handcuff [C].</span>")
|
||||
playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
|
||||
add_logs(user, C, "handcuffed")
|
||||
playsound(loc, pick('sound/voice/beepsky/criminal.ogg', 'sound/voice/beepsky/justice.ogg', 'sound/voice/beepsky/freeze.ogg'), 50, FALSE)
|
||||
log_combat(user, C, "handcuffed")
|
||||
else
|
||||
to_chat(user,"<span class='warning'>You fail to handcuff [C]!</span>")
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
return
|
||||
|
||||
var/contained = vial.reagents.log_list()
|
||||
add_logs(user, L, "attemped to inject", src, addition="which had [contained]")
|
||||
log_combat(user, L, "attemped to inject", src, addition="which had [contained]")
|
||||
//Always log attemped injections for admins
|
||||
if(vial != null)
|
||||
switch(mode)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
add_logs(user, target, "stunned", src)
|
||||
log_combat(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
#include "code\_onclick\hud\parallax.dm"
|
||||
#include "code\_onclick\hud\picture_in_picture.dm"
|
||||
#include "code\_onclick\hud\plane_master.dm"
|
||||
#include "code\_onclick\hud\radial.dm"
|
||||
#include "code\_onclick\hud\revenanthud.dm"
|
||||
#include "code\_onclick\hud\robot.dm"
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
@@ -238,7 +239,6 @@
|
||||
#include "code\controllers\subsystem\machines.dm"
|
||||
#include "code\controllers\subsystem\mapping.dm"
|
||||
#include "code\controllers\subsystem\medals.dm"
|
||||
#include "code\controllers\subsystem\minimap.dm"
|
||||
#include "code\controllers\subsystem\mobs.dm"
|
||||
#include "code\controllers\subsystem\moods.dm"
|
||||
#include "code\controllers\subsystem\nightshift.dm"
|
||||
@@ -267,13 +267,13 @@
|
||||
#include "code\controllers\subsystem\timer.dm"
|
||||
#include "code\controllers\subsystem\title.dm"
|
||||
#include "code\controllers\subsystem\traumas.dm"
|
||||
#include "code\controllers\subsystem\vis_overlays.dm"
|
||||
#include "code\controllers\subsystem\vore.dm"
|
||||
#include "code\controllers\subsystem\vote.dm"
|
||||
#include "code\controllers\subsystem\weather.dm"
|
||||
#include "code\controllers\subsystem\processing\circuit.dm"
|
||||
#include "code\controllers\subsystem\processing\fastprocess.dm"
|
||||
#include "code\controllers\subsystem\processing\fields.dm"
|
||||
#include "code\controllers\subsystem\processing\flightpacks.dm"
|
||||
#include "code\controllers\subsystem\processing\nanites.dm"
|
||||
#include "code\controllers\subsystem\processing\networks.dm"
|
||||
#include "code\controllers\subsystem\processing\obj.dm"
|
||||
@@ -322,7 +322,6 @@
|
||||
#include "code\datums\weakrefs.dm"
|
||||
#include "code\datums\world_topic.dm"
|
||||
#include "code\datums\actions\beam_rifle.dm"
|
||||
#include "code\datums\actions\flightsuit.dm"
|
||||
#include "code\datums\actions\ninja.dm"
|
||||
#include "code\datums\brain_damage\brain_trauma.dm"
|
||||
#include "code\datums\brain_damage\imaginary_friend.dm"
|
||||
@@ -335,7 +334,6 @@
|
||||
#include "code\datums\components\anti_magic.dm"
|
||||
#include "code\datums\components\archaeology.dm"
|
||||
#include "code\datums\components\armor_plate.dm"
|
||||
#include "code\datums\components\beauty.dm"
|
||||
#include "code\datums\components\butchering.dm"
|
||||
#include "code\datums\components\caltrop.dm"
|
||||
#include "code\datums\components\chasm.dm"
|
||||
@@ -346,6 +344,7 @@
|
||||
#include "code\datums\components\earprotection.dm"
|
||||
#include "code\datums\components\edit_complainer.dm"
|
||||
#include "code\datums\components\empprotection.dm"
|
||||
#include "code\datums\components\footstep.dm"
|
||||
#include "code\datums\components\forced_gravity.dm"
|
||||
#include "code\datums\components\forensics.dm"
|
||||
#include "code\datums\components\infective.dm"
|
||||
@@ -361,12 +360,13 @@
|
||||
#include "code\datums\components\paintable.dm"
|
||||
#include "code\datums\components\rad_insulation.dm"
|
||||
#include "code\datums\components\radioactive.dm"
|
||||
#include "code\datums\components\remote_materials.dm"
|
||||
#include "code\datums\components\riding.dm"
|
||||
#include "code\datums\components\rotation.dm"
|
||||
#include "code\datums\components\signal_redirect.dm"
|
||||
#include "code\datums\components\slippery.dm"
|
||||
#include "code\datums\components\spooky.dm"
|
||||
#include "code\datums\components\squeek.dm"
|
||||
#include "code\datums\components\squeak.dm"
|
||||
#include "code\datums\components\stationloving.dm"
|
||||
#include "code\datums\components\swarming.dm"
|
||||
#include "code\datums\components\thermite.dm"
|
||||
@@ -453,6 +453,7 @@
|
||||
#include "code\datums\martial\sleeping_carp.dm"
|
||||
#include "code\datums\martial\wrestling.dm"
|
||||
#include "code\datums\mood_events\beauty_events.dm"
|
||||
#include "code\datums\mood_events\drink_events.dm"
|
||||
#include "code\datums\mood_events\drug_events.dm"
|
||||
#include "code\datums\mood_events\generic_negative_events.dm"
|
||||
#include "code\datums\mood_events\generic_positive_events.dm"
|
||||
@@ -540,6 +541,8 @@
|
||||
#include "code\game\gamemodes\meteor\meteors.dm"
|
||||
#include "code\game\gamemodes\monkey\monkey.dm"
|
||||
#include "code\game\gamemodes\nuclear\nuclear.dm"
|
||||
#include "code\game\gamemodes\overthrow\objective.dm"
|
||||
#include "code\game\gamemodes\overthrow\overthrow.dm"
|
||||
#include "code\game\gamemodes\revolution\revolution.dm"
|
||||
#include "code\game\gamemodes\sandbox\airlock_maker.dm"
|
||||
#include "code\game\gamemodes\sandbox\h_sandbox.dm"
|
||||
@@ -571,6 +574,7 @@
|
||||
#include "code\game\machinery\flasher.dm"
|
||||
#include "code\game\machinery\gulag_item_reclaimer.dm"
|
||||
#include "code\game\machinery\gulag_teleporter.dm"
|
||||
#include "code\game\machinery\harvester.dm"
|
||||
#include "code\game\machinery\hologram.dm"
|
||||
#include "code\game\machinery\igniter.dm"
|
||||
#include "code\game\machinery\iv_drip.dm"
|
||||
@@ -1269,6 +1273,9 @@
|
||||
#include "code\modules\antagonists\nukeop\equipment\nuclearbomb.dm"
|
||||
#include "code\modules\antagonists\nukeop\equipment\pinpointer.dm"
|
||||
#include "code\modules\antagonists\official\official.dm"
|
||||
#include "code\modules\antagonists\overthrow\overthrow.dm"
|
||||
#include "code\modules\antagonists\overthrow\overthrow_converter.dm"
|
||||
#include "code\modules\antagonists\overthrow\overthrow_team.dm"
|
||||
#include "code\modules\antagonists\pirate\pirate.dm"
|
||||
#include "code\modules\antagonists\revenant\revenant.dm"
|
||||
#include "code\modules\antagonists\revenant\revenant_abilities.dm"
|
||||
@@ -1354,6 +1361,7 @@
|
||||
#include "code\modules\atmospherics\machinery\portable\portable_atmospherics.dm"
|
||||
#include "code\modules\atmospherics\machinery\portable\pump.dm"
|
||||
#include "code\modules\atmospherics\machinery\portable\scrubber.dm"
|
||||
#include "code\modules\awaymissions\away_props.dm"
|
||||
#include "code\modules\awaymissions\bluespaceartillery.dm"
|
||||
#include "code\modules\awaymissions\capture_the_flag.dm"
|
||||
#include "code\modules\awaymissions\corpse.dm"
|
||||
@@ -1387,9 +1395,13 @@
|
||||
#include "code\modules\cargo\packs.dm"
|
||||
#include "code\modules\cargo\supplypod_beacon.dm"
|
||||
#include "code\modules\cargo\bounties\assistant.dm"
|
||||
#include "code\modules\cargo\bounties\botany.dm"
|
||||
#include "code\modules\cargo\bounties\chef.dm"
|
||||
#include "code\modules\cargo\bounties\engineering.dm"
|
||||
#include "code\modules\cargo\bounties\item.dm"
|
||||
#include "code\modules\cargo\bounties\mech.dm"
|
||||
#include "code\modules\cargo\bounties\medical.dm"
|
||||
#include "code\modules\cargo\bounties\mining.dm"
|
||||
#include "code\modules\cargo\bounties\reagent.dm"
|
||||
#include "code\modules\cargo\bounties\science.dm"
|
||||
#include "code\modules\cargo\bounties\security.dm"
|
||||
@@ -1458,6 +1470,7 @@
|
||||
#include "code\modules\clothing\outfits\event.dm"
|
||||
#include "code\modules\clothing\outfits\standard.dm"
|
||||
#include "code\modules\clothing\outfits\vr.dm"
|
||||
#include "code\modules\clothing\outfits\vv_outfit.dm"
|
||||
#include "code\modules\clothing\shoes\_shoes.dm"
|
||||
#include "code\modules\clothing\shoes\bananashoes.dm"
|
||||
#include "code\modules\clothing\shoes\colour.dm"
|
||||
@@ -1466,7 +1479,6 @@
|
||||
#include "code\modules\clothing\shoes\vg_shoes.dm"
|
||||
#include "code\modules\clothing\spacesuits\_spacesuits.dm"
|
||||
#include "code\modules\clothing\spacesuits\chronosuit.dm"
|
||||
#include "code\modules\clothing\spacesuits\flightsuit.dm"
|
||||
#include "code\modules\clothing\spacesuits\hardsuit.dm"
|
||||
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
|
||||
#include "code\modules\clothing\spacesuits\plasmamen.dm"
|
||||
@@ -1718,6 +1730,7 @@
|
||||
#include "code\modules\integrated_electronics\subtypes\power.dm"
|
||||
#include "code\modules\integrated_electronics\subtypes\reagents.dm"
|
||||
#include "code\modules\integrated_electronics\subtypes\smart.dm"
|
||||
#include "code\modules\integrated_electronics\subtypes\text.dm"
|
||||
#include "code\modules\integrated_electronics\subtypes\time.dm"
|
||||
#include "code\modules\integrated_electronics\subtypes\trig.dm"
|
||||
#include "code\modules\jobs\access.dm"
|
||||
@@ -1945,6 +1958,7 @@
|
||||
#include "code\modules\mob\living\carbon\human\species_types\angel.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\corporate.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\dullahan.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\felinid.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\flypeople.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\golems.dm"
|
||||
#include "code\modules\mob\living\carbon\human\species_types\humans.dm"
|
||||
@@ -2029,6 +2043,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\bot\medbot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\bot\mulebot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\bot\secbot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\bot\SuperBeepsky.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\butterfly.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\cockroach.dm"
|
||||
@@ -2510,9 +2525,11 @@
|
||||
#include "code\modules\research\xenobiology\crossbreeding\stabilized.dm"
|
||||
#include "code\modules\ruins\lavaland_ruin_code.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\biodome_clown_planet.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\pizzaparty.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\puzzle.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\sloth.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\surface.dm"
|
||||
#include "code\modules\ruins\lavalandruin_code\syndicate_base.dm"
|
||||
#include "code\modules\ruins\objects_and_mobs\ash_walker_den.dm"
|
||||
#include "code\modules\ruins\objects_and_mobs\necropolis_gate.dm"
|
||||
#include "code\modules\ruins\objects_and_mobs\sin_ruins.dm"
|
||||
@@ -2525,6 +2542,7 @@
|
||||
#include "code\modules\ruins\spaceruin_code\deepstorage.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\DJstation.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\listeningstation.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\miracle.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\oldstation.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\originalcontent.dm"
|
||||
#include "code\modules\ruins\spaceruin_code\spacehotel.dm"
|
||||
@@ -2683,6 +2701,8 @@
|
||||
#include "code\modules\vehicles\speedbike.dm"
|
||||
#include "code\modules\vehicles\vehicle_actions.dm"
|
||||
#include "code\modules\vehicles\vehicle_key.dm"
|
||||
#include "code\modules\vehicles\cars\car.dm"
|
||||
#include "code\modules\vehicles\cars\clowncar.dm"
|
||||
#include "code\modules\vending\_vending.dm"
|
||||
#include "code\modules\vending\assist.dm"
|
||||
#include "code\modules\vending\autodrobe.dm"
|
||||
|
||||
Reference in New Issue
Block a user