mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
Trying to fix the dna t
This commit is contained in:
@@ -115,7 +115,7 @@ SUBSYSTEM_DEF(atoms)
|
||||
for(var/i in 1 to LAZYLEN(mutations))
|
||||
var/path = mutations[i] //byond gets pissy when we do it in one line
|
||||
var/datum/mutation/human/B = new path ()
|
||||
B.alias = "Mutation #[i]"
|
||||
B.alias = "Mutation [i]"
|
||||
GLOB.all_mutations[B.type] = B
|
||||
GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks)
|
||||
GLOB.alias_mutations[B.alias] = B.type
|
||||
|
||||
@@ -156,11 +156,13 @@
|
||||
// Insert data disk if console disk slot is empty
|
||||
// Swap data disk if there is one already a disk in the console
|
||||
if (istype(I, /obj/item/disk/data)) //INSERT SOME DISKETTES
|
||||
// Insert disk into DNA Console
|
||||
if (!user.transferItemToLoc(I,src))
|
||||
return
|
||||
// If insertion was successful and there's already a diskette in the console, eject the old one.
|
||||
if(diskette)
|
||||
diskette.forceMove(drop_location())
|
||||
diskette = null
|
||||
eject_disk(user)
|
||||
// Set the new diskette.
|
||||
diskette = I
|
||||
to_chat(user, "<span class='notice'>You insert [I].</span>")
|
||||
return
|
||||
@@ -189,6 +191,14 @@
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/AltClick(mob/user)
|
||||
// Make sure the user can interact with the machine.
|
||||
if(!user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
eject_disk(user)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -289,7 +299,10 @@
|
||||
data["isViableSubject"] = is_viable_occupant
|
||||
if(is_viable_occupant)
|
||||
data["subjectName"] = scanner_occupant.name
|
||||
data["subjectStatus"] = scanner_occupant.stat
|
||||
if(scanner_occupant.transformation_timer)
|
||||
data["subjectStatus"] = STATUS_TRANSFORMING
|
||||
else
|
||||
data["subjectStatus"] = scanner_occupant.stat
|
||||
data["subjectHealth"] = scanner_occupant.health
|
||||
data["subjectRads"] = scanner_occupant.radiation/(RAD_MOB_SAFE/100)
|
||||
data["subjectEnzymes"] = scanner_occupant.dna.unique_enzymes
|
||||
@@ -463,10 +476,16 @@
|
||||
if(!(scanner_occupant == connected_scanner.occupant))
|
||||
return
|
||||
|
||||
// GUARD CHECK - Is the occupant currently undergoing some form of
|
||||
// transformation? If so, we don't want to be pulsing genes.
|
||||
if(scanner_occupant.transformation_timer)
|
||||
to_chat(usr,"<span class='warning'>Gene pulse failed: The scanner occupant undergoing a transformation.</span>")
|
||||
return
|
||||
|
||||
// Resolve mutation's BYOND path from the alias
|
||||
var/alias = params["alias"]
|
||||
var/path = GET_MUTATION_TYPE_FROM_ALIAS(alias)
|
||||
|
||||
to_chat(usr,"<span class='warning'>[path] [alias]</span>")
|
||||
// Make sure the occupant still has this mutation
|
||||
if(!(path in scanner_occupant.dna.mutation_index))
|
||||
return
|
||||
@@ -1039,13 +1058,7 @@
|
||||
|
||||
// Eject stored diskette from console
|
||||
if("eject_disk")
|
||||
// GUARD CHECK - This code shouldn't even be callable without a diskette
|
||||
// inserted. Unexpected result
|
||||
if(!diskette)
|
||||
return
|
||||
|
||||
diskette.forceMove(drop_location())
|
||||
diskette = null
|
||||
eject_disk(usr)
|
||||
return
|
||||
|
||||
// Create a Genetic Makeup injector. These injectors are timed and thus are
|
||||
@@ -1977,6 +1990,29 @@
|
||||
tgui_view_state["storageConsSubMode"] = "mutations"
|
||||
tgui_view_state["storageDiskSubMode"] = "mutations"
|
||||
|
||||
/**
|
||||
* Ejects the DNA Disk from the console.
|
||||
*
|
||||
* Will insert into the user's hand if possible, otherwise will drop it at the
|
||||
* console's location.
|
||||
*
|
||||
* Arguments:
|
||||
* * user - The mob that is attempting to eject the diskette.
|
||||
*/
|
||||
/obj/machinery/computer/scan_consolenew/proc/eject_disk(mob/user)
|
||||
// Check for diskette.
|
||||
if(!diskette)
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You eject [diskette] from [src].</span>")
|
||||
|
||||
// Reset the state to console storage.
|
||||
tgui_view_state["storageMode"] = "console"
|
||||
|
||||
// If the disk shouldn't pop into the user's hand for any reason, drop it on the console instead.
|
||||
if(!istype(user) || !Adjacent(user) || !user.put_in_active_hand(diskette))
|
||||
diskette.forceMove(drop_location())
|
||||
diskette = null
|
||||
|
||||
#undef INJECTOR_TIMEOUT
|
||||
#undef NUMBER_OF_BUFFERS
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/machinery/dna_scannernew
|
||||
name = "\improper DNA scanner"
|
||||
desc = "It scans DNA structures."
|
||||
icon = 'icons/obj/machines/cloning.dmi'
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "scanner"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
|
||||
@@ -144,11 +144,3 @@
|
||||
|
||||
//world.time of when the crew manifest can be accessed
|
||||
var/crew_manifest_delay
|
||||
|
||||
// List of all asset filenames sent to this client by the asset cache, along with their assoicated md5s
|
||||
var/list/sent_assets = list()
|
||||
/// List of all completed blocking send jobs awaiting acknowledgement by send_asset
|
||||
var/list/completed_asset_jobs = list()
|
||||
/// Last asset send job id.
|
||||
var/last_asset_job = 0
|
||||
var/last_completed_asset_job = 0
|
||||
|
||||
@@ -804,7 +804,7 @@ const DnaConsoleSequencer = (props, context) => {
|
||||
</Section>
|
||||
) || (isMonkey && mutation?.Name !== 'Monkified') && (
|
||||
<Section color="bad">
|
||||
Genetic sequence corrupted. Subject diagnostic report: MONKEY.
|
||||
Genetic sequence corrupted. Subject diagnostic report: MONKEY. Scramble DNA to humanize.
|
||||
</Section>
|
||||
) || (subjectStatus === SUBJECT_TRANSFORMING) && (
|
||||
<Section color="bad">
|
||||
|
||||
@@ -10,16 +10,19 @@ const VendingRow = (props, context) => {
|
||||
productStock,
|
||||
custom,
|
||||
} = props;
|
||||
const to_pay = (!product.premium
|
||||
? Math.round(product.price * data.cost_mult)
|
||||
: product.price
|
||||
);
|
||||
const pay_text = (!product.premium
|
||||
? to_pay + ' cr' + data.cost_text
|
||||
: to_pay + ' cr'
|
||||
);
|
||||
const free = (
|
||||
!data.onstation
|
||||
|| product.price === 0
|
||||
|| (
|
||||
!product.premium
|
||||
&& data.department
|
||||
&& data.user
|
||||
&& data.department === data.user.department
|
||||
)
|
||||
);
|
||||
|
||||
return (
|
||||
<Table.Row>
|
||||
<Table.Cell collapsing>
|
||||
@@ -69,13 +72,16 @@ const VendingRow = (props, context) => {
|
||||
<Button
|
||||
fluid
|
||||
disabled={(
|
||||
productStock === 0
|
||||
|| !free && (
|
||||
!data.user
|
||||
|| product.price > data.user.cash
|
||||
)
|
||||
data.stock[product.namename] === 0
|
||||
|| (
|
||||
!free
|
||||
&& (
|
||||
!data.user
|
||||
|| to_pay > data.user.cash
|
||||
)
|
||||
)
|
||||
)}
|
||||
content={free ? 'FREE' : product.price + ' cr'}
|
||||
content={!free ? pay_text : 'FREE'}
|
||||
onClick={() => act('vend', {
|
||||
'ref': product.ref,
|
||||
})} />
|
||||
|
||||
Reference in New Issue
Block a user