Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into RelPath

This commit is contained in:
variableundefined
2018-10-20 15:14:12 +08:00
24 changed files with 642 additions and 1056 deletions
+2 -2
View File
@@ -59,7 +59,7 @@
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent("welding_fuel", 5))
if(S.has_reagent("fuel", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == POSITIVE)
temp_mut_list += SM
@@ -94,4 +94,4 @@
desc = "<I>Pueraria Virallis</I>: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#6B8E23"
bitesize_mod = 2
bitesize_mod = 2
+2 -2
View File
@@ -12,7 +12,7 @@ var/list/chem_t2_reagents = list(
var/list/chem_t3_reagents = list(
"ethanol", "chlorine", "potassium",
"aluminium", "radium", "fluorine",
"iron", "welding_fuel", "silver",
"iron", "fuel", "silver",
"stable_plasma"
)
@@ -41,4 +41,4 @@ var/list/chem_t4_reagents = list(
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
sample_color = null
sample_color = null
+1 -1
View File
@@ -462,10 +462,10 @@ var/global/list/rockTurfEdgeCache = list(
/turf/simulated/floor/plating/airless/asteroid/New()
var/proper_name = name
..()
name = proper_name
if(prob(20))
icon_state = "asteroid[rand(0,12)]"
..()
/turf/simulated/floor/plating/airless/asteroid/ex_act(severity, target)
switch(severity)
@@ -38,6 +38,8 @@ var/datum/paiController/paiController // Global handler for pAI candidates
var/obj/item/paicard/card = locate(href_list["device"])
if(card.pai)
return
if(usr.incapacitated() || isobserver(usr) || !card.Adjacent(usr))
return
if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
@@ -4,10 +4,11 @@ var/global/file_uid = 0
var/filename = "NewFile" // Placeholder. No spacebars
var/filetype = "XXX" // File full names are [filename].[filetype] so like NewFile.XXX in this case
var/size = 1 // File size in GQ. Integers only!
var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file.
var/obj/item/computer_hardware/hard_drive/holder // Holder that contains this file.
var/unsendable = 0 // Whether the file may be sent to someone via NTNet transfer or other means.
var/undeletable = 0 // Whether the file may be deleted. Setting to 1 prevents deletion/renaming/etc.
var/uid // UID of this file
var/password = "" // Placeholder for password.
/datum/computer_file/New()
..()
@@ -36,4 +37,14 @@ var/global/file_uid = 0
else
temp.filename = filename
temp.filetype = filetype
return temp
temp.password = password
return temp
/datum/computer_file/proc/can_access_file(mob/user, input_password = "")
if(!password)
return TRUE
if(!input_password)
input_password = sanitize(input(user, "Please enter a password to access file '[filename]':"))
if(input_password == password)
return TRUE
return FALSE
@@ -55,7 +55,8 @@
"name" = F.filename,
"type" = F.filetype,
"size" = F.size,
"undeletable" = F.undeletable
"undeletable" = F.undeletable,
"encrypted" = !!F.password
)))
data["files"] = files
if(RHDD)
@@ -66,7 +67,8 @@
"name" = F.filename,
"type" = F.filetype,
"size" = F.size,
"undeletable" = F.undeletable
"undeletable" = F.undeletable,
"encrypted" = !!F.password
)))
data["usbfiles"] = usbfiles
@@ -83,6 +85,9 @@
switch(href_list["action"])
if("PRG_openfile")
. = 1
var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"])
if(!F.can_access_file(usr))
return
open_file = href_list["name"]
if("PRG_newtextfile")
. = 1
@@ -197,4 +202,27 @@
if(!F || !istype(F))
return 1
var/datum/computer_file/C = F.clone(0)
HDD.store_file(C)
HDD.store_file(C)
if("PRG_encrypt")
. = 1
if(!HDD)
return 1
var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"])
if(!F || F.undeletable)
return 1
if(F.password)
return
var/new_password = sanitize(input(usr, "Enter an encryption key:", "Encrypt File"))
if(!new_password)
to_chat(usr, "<span class='warning'>File not encrypted.</span>")
return
F.password=new_password
if("PRG_decrypt")
. = 1
if(!HDD)
return 1
var/datum/computer_file/F = HDD.find_file_by_name(href_list["name"])
if(!F || F.undeletable)
return 1
if(F.can_access_file(usr))
F.password = ""