mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
@@ -178,8 +178,8 @@
|
|||||||
#include "code\game\area\ai_monitored.dm"
|
#include "code\game\area\ai_monitored.dm"
|
||||||
#include "code\game\area\areas.dm"
|
#include "code\game\area\areas.dm"
|
||||||
#include "code\game\area\Space Station 13 areas.dm"
|
#include "code\game\area\Space Station 13 areas.dm"
|
||||||
#include "code\game\dna\dna.dm"
|
#include "code\game\dna\dna2.dm"
|
||||||
#include "code\game\dna\dna_misc.dm"
|
#include "code\game\dna\dna2_helpers.dm"
|
||||||
#include "code\game\dna\dna_modifier.dm"
|
#include "code\game\dna\dna_modifier.dm"
|
||||||
#include "code\game\gamemodes\events.dm"
|
#include "code\game\gamemodes\events.dm"
|
||||||
#include "code\game\gamemodes\factions.dm"
|
#include "code\game\gamemodes\factions.dm"
|
||||||
|
|||||||
@@ -112,8 +112,8 @@
|
|||||||
L.fields["sex"] = H.gender
|
L.fields["sex"] = H.gender
|
||||||
L.fields["b_type"] = H.b_type
|
L.fields["b_type"] = H.b_type
|
||||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
L.fields["enzymes"] = H.dna.SE
|
||||||
L.fields["identity"] = H.dna.uni_identity
|
L.fields["identity"] = H.dna.UI
|
||||||
L.fields["image"] = getFlatIcon(H,0) //This is god-awful
|
L.fields["image"] = getFlatIcon(H,0) //This is god-awful
|
||||||
locked += L
|
locked += L
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -39,13 +39,13 @@
|
|||||||
|
|
||||||
//Save original dna for when the disease is cured.
|
//Save original dna for when the disease is cured.
|
||||||
src.original_dna["name"] = affected_mob.real_name
|
src.original_dna["name"] = affected_mob.real_name
|
||||||
src.original_dna["UI"] = affected_mob.dna.uni_identity
|
src.original_dna["UI"] = affected_mob.dna.UI
|
||||||
src.original_dna["SE"] = affected_mob.dna.struc_enzymes
|
src.original_dna["SE"] = affected_mob.dna.SE
|
||||||
|
|
||||||
affected_mob << "\red You don't feel like yourself.."
|
affected_mob << "\red You don't feel like yourself.."
|
||||||
affected_mob.dna.uni_identity = strain_data["UI"]
|
affected_mob.UpdateAppearance(strain_data["UI"])
|
||||||
updateappearance(affected_mob, affected_mob.dna.uni_identity)
|
affected_mob.dna.SE = strain_data["SE"]
|
||||||
affected_mob.dna.struc_enzymes = strain_data["SE"]
|
affected_mob.dna.UpdateSE()
|
||||||
affected_mob.real_name = strain_data["name"]
|
affected_mob.real_name = strain_data["name"]
|
||||||
domutcheck(affected_mob)
|
domutcheck(affected_mob)
|
||||||
|
|
||||||
@@ -56,9 +56,9 @@
|
|||||||
|
|
||||||
/datum/disease/dnaspread/Del()
|
/datum/disease/dnaspread/Del()
|
||||||
if ((original_dna["name"]) && (original_dna["UI"]) && (original_dna["SE"]))
|
if ((original_dna["name"]) && (original_dna["UI"]) && (original_dna["SE"]))
|
||||||
affected_mob.dna.uni_identity = original_dna["UI"]
|
affected_mob.UpdateAppearance(original_dna["UI"])
|
||||||
updateappearance(affected_mob, affected_mob.dna.uni_identity)
|
affected_mob.dna.SE = original_dna["SE"]
|
||||||
affected_mob.dna.struc_enzymes = original_dna["SE"]
|
affected_mob.dna.UpdateSE()
|
||||||
affected_mob.real_name = original_dna["name"]
|
affected_mob.real_name = original_dna["name"]
|
||||||
|
|
||||||
affected_mob << "\blue You feel more like yourself."
|
affected_mob << "\blue You feel more like yourself."
|
||||||
|
|||||||
@@ -726,7 +726,7 @@ datum/mind
|
|||||||
else
|
else
|
||||||
current.dna = changeling.absorbed_dna[1]
|
current.dna = changeling.absorbed_dna[1]
|
||||||
current.real_name = current.dna.real_name
|
current.real_name = current.dna.real_name
|
||||||
updateappearance(current, current.dna.uni_identity)
|
current.UpdateAppearance()
|
||||||
domutcheck(current, null)
|
domutcheck(current, null)
|
||||||
|
|
||||||
else if (href_list["nuclear"])
|
else if (href_list["nuclear"])
|
||||||
|
|||||||
333
code/game/dna/dna2.dm
Normal file
333
code/game/dna/dna2.dm
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
/**
|
||||||
|
* DNA 2: The Spaghetti Strikes Back
|
||||||
|
*
|
||||||
|
* @author N3X15 <nexisentertainment@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
// What each index means:
|
||||||
|
#define DNA_OFF_LOWERBOUND 0
|
||||||
|
#define DNA_OFF_UPPERBOUND 1
|
||||||
|
#define DNA_ON_LOWERBOUND 2
|
||||||
|
#define DNA_ON_UPPERBOUND 3
|
||||||
|
|
||||||
|
// Define block bounds (off-low,off-high,on-low,on-high)
|
||||||
|
// Used in setupgame.dm
|
||||||
|
#define DNA_DEFAULT_BOUNDS list(1,2049,2050,4095)
|
||||||
|
#define DNA_HARDER_BOUNDS list(1,3049,3050,4095)
|
||||||
|
#define DNA_HARD_BOUNDS list(1,3490,3500,4095)
|
||||||
|
|
||||||
|
// Defines which values mean "on" or "off".
|
||||||
|
// This is to make some of the more OP superpowers a larger PITA to activate,
|
||||||
|
// and to tell our new DNA datum which values to set in order to turn something
|
||||||
|
// on or off.
|
||||||
|
var/global/list/dna_activity_bounds[STRUCDNASIZE]
|
||||||
|
|
||||||
|
// Used to determine what each block means (admin hax and species stuff on /vg/, mostly)
|
||||||
|
var/global/list/assigned_blocks[STRUCDNASIZE]
|
||||||
|
|
||||||
|
// UI Indices (can change to mutblock style, if desired)
|
||||||
|
#define DNA_UI_HAIR_R 1
|
||||||
|
#define DNA_UI_HAIR_G 2
|
||||||
|
#define DNA_UI_HAIR_B 3
|
||||||
|
#define DNA_UI_BEARD_R 4
|
||||||
|
#define DNA_UI_BEARD_G 5
|
||||||
|
#define DNA_UI_BEARD_B 6
|
||||||
|
#define DNA_UI_SKIN_TONE 7
|
||||||
|
#define DNA_UI_EYES_R 8
|
||||||
|
#define DNA_UI_EYES_G 9
|
||||||
|
#define DNA_UI_EYES_B 10
|
||||||
|
#define DNA_UI_GENDER 11
|
||||||
|
#define DNA_UI_BEARD_STYLE 12
|
||||||
|
#define DNA_UI_HAIR_STYLE 13
|
||||||
|
#define DNA_UI_LENGTH 13 // Update this when you add something, or you WILL break shit.
|
||||||
|
|
||||||
|
|
||||||
|
/* Note RE: unassigned blocks
|
||||||
|
|
||||||
|
Many genes in baycode are currently sitting unused
|
||||||
|
(compare setupgame.dm to the number of *BLOCK variables).
|
||||||
|
|
||||||
|
This datum will return 0 (or equivalent) if asked about
|
||||||
|
a block 0 (which means the gene was unassigned). Setters
|
||||||
|
will silently return without performing any action.
|
||||||
|
|
||||||
|
I have code to assign these genes in a streamlined manner,
|
||||||
|
but in order to avoid breaking things, I've left the
|
||||||
|
existing setupgame.dm intact. Please let me know if you
|
||||||
|
need this behavior changed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/datum/dna
|
||||||
|
// READ-ONLY, GETS OVERWRITTEN
|
||||||
|
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
|
||||||
|
var/uni_identity="" // Encoded UI
|
||||||
|
var/struc_enzymes="" // Encoded SE
|
||||||
|
var/unique_enzymes="" // MD5 of player name
|
||||||
|
|
||||||
|
// Internal dirtiness checks
|
||||||
|
var/dirtyUI=0
|
||||||
|
var/dirtySE=0
|
||||||
|
|
||||||
|
// Okay to read, but you're an idiot if you do.
|
||||||
|
// BLOCK = VALUE
|
||||||
|
var/list/SE[STRUCDNASIZE]
|
||||||
|
var/list/UI[DNA_UI_LENGTH]
|
||||||
|
|
||||||
|
// From old dna.
|
||||||
|
var/b_type = "A+" // Should probably change to an integer => string map but I'm lazy.
|
||||||
|
var/mutantrace = null // The type of mutant race the player is, if applicable (i.e. potato-man)
|
||||||
|
var/real_name // Stores the real name of the person who originally got this dna datum. Used primarily for changelings,
|
||||||
|
///////////////////////////////////////
|
||||||
|
// UNIQUE IDENTITY
|
||||||
|
///////////////////////////////////////
|
||||||
|
|
||||||
|
// Create random UI.
|
||||||
|
/datum/dna/proc/ResetUI(var/defer=0)
|
||||||
|
for(var/i=1,i<=DNA_UI_LENGTH,i++)
|
||||||
|
UI[i]=rand(0,4095)
|
||||||
|
if(!defer)
|
||||||
|
UpdateUI()
|
||||||
|
|
||||||
|
/datum/dna/proc/ResetUIFrom(var/mob/living/carbon/human/character)
|
||||||
|
// INITIALIZE!
|
||||||
|
ResetUI(1)
|
||||||
|
// Hair
|
||||||
|
// FIXME: Species-specific defaults pls
|
||||||
|
if(!character.h_style)
|
||||||
|
character.h_style = "Skinhead"
|
||||||
|
var/hair = hair_styles_list.Find(character.h_style)
|
||||||
|
|
||||||
|
// Facial Hair
|
||||||
|
if(!character.f_style)
|
||||||
|
character.f_style = "Shaved"
|
||||||
|
var/beard = facial_hair_styles_list.Find(character.f_style)
|
||||||
|
|
||||||
|
SetUIValueRange(DNA_UI_HAIR_R, character.r_hair, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_HAIR_G, character.g_hair, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_HAIR_B, character.b_hair, 255, 1)
|
||||||
|
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_R, character.r_facial, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_G, character.g_facial, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_B, character.b_facial, 255, 1)
|
||||||
|
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_R, character.r_eyes, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_G, character.g_eyes, 255, 1)
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_B, character.b_eyes, 255, 1)
|
||||||
|
|
||||||
|
SetUIValueRange(DNA_UI_SKIN_TONE, character.s_tone, 220, 1)
|
||||||
|
|
||||||
|
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
|
||||||
|
|
||||||
|
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1)
|
||||||
|
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len,1)
|
||||||
|
|
||||||
|
UpdateUI()
|
||||||
|
|
||||||
|
// Set a DNA UI block's raw value.
|
||||||
|
/datum/dna/proc/SetUIValue(var/block,var/value,var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
ASSERT(value>=0)
|
||||||
|
ASSERT(value<=4095)
|
||||||
|
UI[block]=value
|
||||||
|
dirtyUI=1
|
||||||
|
if(!defer)
|
||||||
|
UpdateUI()
|
||||||
|
|
||||||
|
// Get a DNA UI block's raw value.
|
||||||
|
/datum/dna/proc/GetUIValue(var/block)
|
||||||
|
if (block<=0) return 0
|
||||||
|
return UI[block]
|
||||||
|
|
||||||
|
// Set a DNA UI block's value, given a value and a max possible value.
|
||||||
|
// Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list)
|
||||||
|
/datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue)
|
||||||
|
if (block<=0) return
|
||||||
|
ASSERT(maxvalue<=4095)
|
||||||
|
var/range = round(4095 / maxvalue)
|
||||||
|
if(value)
|
||||||
|
SetUIValue(block,value * range - rand(1,range-1))
|
||||||
|
|
||||||
|
// Getter version of above.
|
||||||
|
/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
|
||||||
|
if (block<=0) return 0
|
||||||
|
var/value = GetUIValue(block)
|
||||||
|
return round(1 +(value / 4096)*maxvalue)
|
||||||
|
|
||||||
|
// Is the UI gene "on" or "off"?
|
||||||
|
// For UI, this is simply a check of if the value is > 2050.
|
||||||
|
/datum/dna/proc/GetUIState(var/block)
|
||||||
|
if (block<=0) return
|
||||||
|
return UI[block] > 2050
|
||||||
|
|
||||||
|
|
||||||
|
// Set UI gene "on" (1) or "off" (0)
|
||||||
|
/datum/dna/proc/SetUIState(var/block,var/on,var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
var/val
|
||||||
|
if(on)
|
||||||
|
val=rand(2050,4095)
|
||||||
|
else
|
||||||
|
val=rand(1,2049)
|
||||||
|
SetUIValue(block,val,defer)
|
||||||
|
|
||||||
|
// Get a hex-encoded UI block.
|
||||||
|
/datum/dna/proc/GetUIBlock(var/block)
|
||||||
|
return EncodeDNABlock(GetUIValue(block))
|
||||||
|
|
||||||
|
// Do not use this unless you absolutely have to.
|
||||||
|
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
|
||||||
|
// Used in DNA modifiers.
|
||||||
|
/datum/dna/proc/SetUIBlock(var/block,var/value,var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
return SetUIValue(block,hex2num(value),defer)
|
||||||
|
|
||||||
|
// Get a sub-block from a block.
|
||||||
|
/datum/dna/proc/GetUISubBlock(var/block,var/subBlock)
|
||||||
|
return copytext(GetUIBlock(block),subBlock,subBlock+1)
|
||||||
|
|
||||||
|
// Do not use this unless you absolutely have to.
|
||||||
|
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
|
||||||
|
// Used in DNA modifiers.
|
||||||
|
/datum/dna/proc/SetUISubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
var/oldBlock=GetUIBlock(block)
|
||||||
|
var/newBlock=""
|
||||||
|
for(var/i=1, i<=length(oldBlock), i++)
|
||||||
|
if(i==subBlock)
|
||||||
|
newBlock+=newSubBlock
|
||||||
|
else
|
||||||
|
newBlock+=copytext(oldBlock,i,i+1)
|
||||||
|
SetUIBlock(block,newBlock,defer)
|
||||||
|
|
||||||
|
///////////////////////////////////////
|
||||||
|
// STRUCTURAL ENZYMES
|
||||||
|
///////////////////////////////////////
|
||||||
|
|
||||||
|
// "Zeroes out" all of the blocks.
|
||||||
|
/datum/dna/proc/ResetSE()
|
||||||
|
for(var/i = 1, i <= STRUCDNASIZE, i++)
|
||||||
|
SetSEValue(i,rand(1,1024),1)
|
||||||
|
UpdateSE()
|
||||||
|
|
||||||
|
// Set a DNA SE block's raw value.
|
||||||
|
/datum/dna/proc/SetSEValue(var/block,var/value,var/defer=0)
|
||||||
|
//testing("SetSEBlock([block],[value],[defer]): [value] -> [nval]")
|
||||||
|
if (block<=0) return
|
||||||
|
ASSERT(value>=0)
|
||||||
|
ASSERT(value<=4095)
|
||||||
|
SE[block]=value
|
||||||
|
dirtySE=1
|
||||||
|
if(!defer)
|
||||||
|
UpdateSE()
|
||||||
|
|
||||||
|
// Get a DNA SE block's raw value.
|
||||||
|
/datum/dna/proc/GetSEValue(var/block)
|
||||||
|
if (block<=0) return 0
|
||||||
|
return SE[block]
|
||||||
|
|
||||||
|
// Set a DNA SE block's value, given a value and a max possible value.
|
||||||
|
// Might be used for species?
|
||||||
|
/datum/dna/proc/SetSEValueRange(var/block,var/value,var/maxvalue)
|
||||||
|
if (block<=0) return
|
||||||
|
ASSERT(maxvalue<=4095)
|
||||||
|
var/range = round(4095 / maxvalue)
|
||||||
|
if(value)
|
||||||
|
SetSEValue(block, value * range - rand(1,range-1))
|
||||||
|
|
||||||
|
// Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.)
|
||||||
|
/datum/dna/proc/GetSEState(var/block)
|
||||||
|
if (block<=0) return 0
|
||||||
|
var/list/BOUNDS=GetDNABounds(block)
|
||||||
|
var/value=GetSEValue(block)
|
||||||
|
return (value > BOUNDS[DNA_ON_LOWERBOUND])
|
||||||
|
|
||||||
|
// Set a block "on" or "off".
|
||||||
|
/datum/dna/proc/SetSEState(var/block,var/on,var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
var/list/BOUNDS=GetDNABounds(block)
|
||||||
|
var/val
|
||||||
|
if(on)
|
||||||
|
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
|
||||||
|
else
|
||||||
|
val=rand(BOUNDS[DNA_OFF_LOWERBOUND],BOUNDS[DNA_OFF_UPPERBOUND])
|
||||||
|
SetSEValue(block,val,defer)
|
||||||
|
|
||||||
|
// Get hex-encoded SE block.
|
||||||
|
/datum/dna/proc/GetSEBlock(var/block)
|
||||||
|
return EncodeDNABlock(GetSEValue(block))
|
||||||
|
|
||||||
|
// Do not use this unless you absolutely have to.
|
||||||
|
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
|
||||||
|
// Used in DNA modifiers.
|
||||||
|
/datum/dna/proc/SetSEBlock(var/block,var/value,var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
var/nval=hex2num(value)
|
||||||
|
//testing("SetSEBlock([block],[value],[defer]): [value] -> [nval]")
|
||||||
|
return SetSEValue(block,nval,defer)
|
||||||
|
|
||||||
|
/datum/dna/proc/GetSESubBlock(var/block,var/subBlock)
|
||||||
|
return copytext(GetSEBlock(block),subBlock,subBlock+1)
|
||||||
|
|
||||||
|
// Do not use this unless you absolutely have to.
|
||||||
|
// Set a sub-block from a hex character. This is inefficient. If you can, use SetUIValue().
|
||||||
|
// Used in DNA modifiers.
|
||||||
|
/datum/dna/proc/SetSESubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
|
||||||
|
if (block<=0) return
|
||||||
|
var/oldBlock=GetSEBlock(block)
|
||||||
|
var/newBlock=""
|
||||||
|
for(var/i=1, i<=length(oldBlock), i++)
|
||||||
|
if(i==subBlock)
|
||||||
|
newBlock+=newSubBlock
|
||||||
|
else
|
||||||
|
newBlock+=copytext(oldBlock,i,i+1)
|
||||||
|
//testing("SetSESubBlock([block],[subBlock],[newSubBlock],[defer]): [oldBlock] -> [newBlock]")
|
||||||
|
SetSEBlock(block,newBlock,defer)
|
||||||
|
|
||||||
|
|
||||||
|
/proc/EncodeDNABlock(var/value)
|
||||||
|
return add_zero2(num2hex(value,1), 3)
|
||||||
|
|
||||||
|
/datum/dna/proc/UpdateUI()
|
||||||
|
src.uni_identity=""
|
||||||
|
for(var/block in UI)
|
||||||
|
uni_identity += EncodeDNABlock(block)
|
||||||
|
//testing("New UI: [uni_identity]")
|
||||||
|
dirtyUI=0
|
||||||
|
|
||||||
|
/datum/dna/proc/UpdateSE()
|
||||||
|
//var/oldse=struc_enzymes
|
||||||
|
struc_enzymes=""
|
||||||
|
for(var/block in SE)
|
||||||
|
struc_enzymes += EncodeDNABlock(block)
|
||||||
|
//testing("Old SE: [oldse]")
|
||||||
|
//testing("New SE: [struc_enzymes]")
|
||||||
|
dirtySE=0
|
||||||
|
|
||||||
|
// BACK-COMPAT!
|
||||||
|
// Just checks our character has all the crap it needs.
|
||||||
|
/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character)
|
||||||
|
if(character)
|
||||||
|
if(UI.len != DNA_UI_LENGTH)
|
||||||
|
ResetUIFrom(character)
|
||||||
|
|
||||||
|
if(length(struc_enzymes)!= 3*STRUCDNASIZE)
|
||||||
|
ResetSE()
|
||||||
|
|
||||||
|
if(length(unique_enzymes) != 32)
|
||||||
|
unique_enzymes = md5(character.real_name)
|
||||||
|
else
|
||||||
|
if(length(uni_identity) != 3*DNA_UI_LENGTH)
|
||||||
|
uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
|
||||||
|
if(length(struc_enzymes)!= 3*STRUCDNASIZE)
|
||||||
|
struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||||
|
|
||||||
|
// BACK-COMPAT!
|
||||||
|
// Initial DNA setup. I'm kind of wondering why the hell this doesn't just call the above.
|
||||||
|
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
|
||||||
|
ResetUIFrom(character)
|
||||||
|
|
||||||
|
ResetSE()
|
||||||
|
|
||||||
|
unique_enzymes = md5(character.real_name)
|
||||||
|
reg_dna[unique_enzymes] = character.real_name
|
||||||
|
|
||||||
478
code/game/dna/dna2_helpers.dm
Normal file
478
code/game/dna/dna2_helpers.dm
Normal file
@@ -0,0 +1,478 @@
|
|||||||
|
/////////////////////////////
|
||||||
|
// Helpers for DNA2
|
||||||
|
/////////////////////////////
|
||||||
|
|
||||||
|
// Pads 0s to t until length == u
|
||||||
|
/proc/add_zero2(t, u)
|
||||||
|
var/temp1
|
||||||
|
while (length(t) < u)
|
||||||
|
t = "0[t]"
|
||||||
|
temp1 = t
|
||||||
|
if (length(t) > u)
|
||||||
|
temp1 = copytext(t,2,u+1)
|
||||||
|
return temp1
|
||||||
|
|
||||||
|
// DNA Gene activation boundaries, see dna2.dm.
|
||||||
|
// Returns a list object with 4 numbers.
|
||||||
|
/proc/GetDNABounds(var/block)
|
||||||
|
var/list/BOUNDS=dna_activity_bounds[block]
|
||||||
|
if(!istype(BOUNDS))
|
||||||
|
return DNA_DEFAULT_BOUNDS
|
||||||
|
return BOUNDS
|
||||||
|
|
||||||
|
// Give Random Bad Mutation to M
|
||||||
|
/proc/randmutb(var/mob/living/M)
|
||||||
|
if(!M) return
|
||||||
|
M.dna.check_integrity()
|
||||||
|
var/block = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK,HALLUCINATIONBLOCK)
|
||||||
|
M.dna.SetSEState(block, 1)
|
||||||
|
|
||||||
|
// Give Random Good Mutation to M
|
||||||
|
/proc/randmutg(var/mob/living/M)
|
||||||
|
if(!M) return
|
||||||
|
M.dna.check_integrity()
|
||||||
|
var/block = pick(HULKBLOCK,XRAYBLOCK,FIREBLOCK,TELEBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
|
||||||
|
M.dna.SetSEState(block, 1)
|
||||||
|
|
||||||
|
// Random Appearance Mutation
|
||||||
|
/proc/randmuti(var/mob/living/M)
|
||||||
|
if(!M) return
|
||||||
|
M.dna.check_integrity()
|
||||||
|
M.dna.SetUIValue(rand(1,UNIDNASIZE),rand(1,4095))
|
||||||
|
|
||||||
|
// Scramble UI or SE.
|
||||||
|
/proc/scramble(var/UI, var/mob/M, var/prob)
|
||||||
|
if(!M) return
|
||||||
|
M.dna.check_integrity()
|
||||||
|
if(UI)
|
||||||
|
for(var/i = 1, i <= DNA_UI_LENGTH-1, i++)
|
||||||
|
if(prob(prob))
|
||||||
|
M.dna.SetUIValue(i,rand(1,4095),1)
|
||||||
|
M.dna.UpdateUI()
|
||||||
|
M.UpdateAppearance()
|
||||||
|
|
||||||
|
else
|
||||||
|
for(var/i = 1, i <= STRUCDNASIZE-1, i++)
|
||||||
|
if(prob(prob))
|
||||||
|
M.dna.SetSEValue(i,rand(1,4095),1)
|
||||||
|
M.dna.UpdateSE()
|
||||||
|
domutcheck(M, null)
|
||||||
|
return
|
||||||
|
|
||||||
|
// I haven't yet figured out what the fuck this is supposed to do.
|
||||||
|
/proc/miniscramble(input,rs,rd)
|
||||||
|
var/output
|
||||||
|
output = null
|
||||||
|
if (input == "C" || input == "D" || input == "E" || input == "F")
|
||||||
|
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"6",prob((rs*10));"7",prob((rs*5)+(rd));"0",prob((rs*5)+(rd));"1",prob((rs*10)-(rd));"2",prob((rs*10)-(rd));"3")
|
||||||
|
if (input == "8" || input == "9" || input == "A" || input == "B")
|
||||||
|
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
|
||||||
|
if (input == "4" || input == "5" || input == "6" || input == "7")
|
||||||
|
output = pick(prob((rs*10));"4",prob((rs*10));"5",prob((rs*10));"A",prob((rs*10));"B",prob((rs*5)+(rd));"C",prob((rs*5)+(rd));"D",prob((rs*5)+(rd));"2",prob((rs*5)+(rd));"3")
|
||||||
|
if (input == "0" || input == "1" || input == "2" || input == "3")
|
||||||
|
output = pick(prob((rs*10));"8",prob((rs*10));"9",prob((rs*10));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C",prob((rs*10)-(rd));"D",prob((rs*5)+(rd));"E",prob((rs*5)+(rd));"F")
|
||||||
|
if (!output) output = "5"
|
||||||
|
return output
|
||||||
|
|
||||||
|
// HELLO I MAKE BELL CURVES AROUND YOUR DESIRED TARGET
|
||||||
|
// So a shitty way of replacing gaussian noise.
|
||||||
|
// input: YOUR TARGET
|
||||||
|
// rs: RAD STRENGTH
|
||||||
|
// rd: DURATION
|
||||||
|
/proc/miniscrambletarget(input,rs,rd)
|
||||||
|
var/output = null
|
||||||
|
switch(input)
|
||||||
|
if("0")
|
||||||
|
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10));"2",prob((rs*10)-(rd));"3")
|
||||||
|
if("1")
|
||||||
|
output = pick(prob((rs*10)+(rd));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10));"3",prob((rs*10)-(rd));"4")
|
||||||
|
if("2")
|
||||||
|
output = pick(prob((rs*10));"0",prob((rs*10)+(rd));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10));"4",prob((rs*10)-(rd));"5")
|
||||||
|
if("3")
|
||||||
|
output = pick(prob((rs*10)-(rd));"0",prob((rs*10));"1",prob((rs*10)+(rd));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10));"5",prob((rs*10)-(rd));"6")
|
||||||
|
if("4")
|
||||||
|
output = pick(prob((rs*10)-(rd));"1",prob((rs*10));"2",prob((rs*10)+(rd));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10));"6",prob((rs*10)-(rd));"7")
|
||||||
|
if("5")
|
||||||
|
output = pick(prob((rs*10)-(rd));"2",prob((rs*10));"3",prob((rs*10)+(rd));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10));"7",prob((rs*10)-(rd));"8")
|
||||||
|
if("6")
|
||||||
|
output = pick(prob((rs*10)-(rd));"3",prob((rs*10));"4",prob((rs*10)+(rd));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10));"8",prob((rs*10)-(rd));"9")
|
||||||
|
if("7")
|
||||||
|
output = pick(prob((rs*10)-(rd));"4",prob((rs*10));"5",prob((rs*10)+(rd));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10));"9",prob((rs*10)-(rd));"A")
|
||||||
|
if("8")
|
||||||
|
output = pick(prob((rs*10)-(rd));"5",prob((rs*10));"6",prob((rs*10)+(rd));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10));"A",prob((rs*10)-(rd));"B")
|
||||||
|
if("9")
|
||||||
|
output = pick(prob((rs*10)-(rd));"6",prob((rs*10));"7",prob((rs*10)+(rd));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10));"B",prob((rs*10)-(rd));"C")
|
||||||
|
if("10")//A
|
||||||
|
output = pick(prob((rs*10)-(rd));"7",prob((rs*10));"8",prob((rs*10)+(rd));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10));"C",prob((rs*10)-(rd));"D")
|
||||||
|
if("11")//B
|
||||||
|
output = pick(prob((rs*10)-(rd));"8",prob((rs*10));"9",prob((rs*10)+(rd));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10));"D",prob((rs*10)-(rd));"E")
|
||||||
|
if("12")//C
|
||||||
|
output = pick(prob((rs*10)-(rd));"9",prob((rs*10));"A",prob((rs*10)+(rd));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10));"E",prob((rs*10)-(rd));"F")
|
||||||
|
if("13")//D
|
||||||
|
output = pick(prob((rs*10)-(rd));"A",prob((rs*10));"B",prob((rs*10)+(rd));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10));"F")
|
||||||
|
if("14")//E
|
||||||
|
output = pick(prob((rs*10)-(rd));"B",prob((rs*10));"C",prob((rs*10)+(rd));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
|
||||||
|
if("15")//F
|
||||||
|
output = pick(prob((rs*10)-(rd));"C",prob((rs*10));"D",prob((rs*10)+(rd));"E",prob((rs*10)+(rd));"F")
|
||||||
|
|
||||||
|
if(!input || !output) //How did this happen?
|
||||||
|
output = "8"
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
||||||
|
// /proc/updateappearance has changed behavior, so it's been removed
|
||||||
|
// Use mob.UpdateAppearance() instead.
|
||||||
|
|
||||||
|
// Simpler. Don't specify UI in order for the mob to use its own.
|
||||||
|
/mob/proc/UpdateAppearance(var/list/UI=null)
|
||||||
|
if(istype(src, /mob/living/carbon/human))
|
||||||
|
if(UI!=null)
|
||||||
|
src.dna.UI=UI
|
||||||
|
src.dna.UpdateUI()
|
||||||
|
dna.check_integrity()
|
||||||
|
var/mob/living/carbon/human/H = src
|
||||||
|
H.r_hair = dna.GetUIValueRange(DNA_UI_HAIR_R, 255)
|
||||||
|
H.g_hair = dna.GetUIValueRange(DNA_UI_HAIR_G, 255)
|
||||||
|
H.b_hair = dna.GetUIValueRange(DNA_UI_HAIR_B, 255)
|
||||||
|
|
||||||
|
H.r_facial = dna.GetUIValueRange(DNA_UI_BEARD_R, 255)
|
||||||
|
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
|
||||||
|
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
|
||||||
|
|
||||||
|
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
|
||||||
|
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
|
||||||
|
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
|
||||||
|
|
||||||
|
H.s_tone = dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220)
|
||||||
|
|
||||||
|
if (dna.GetUIState(DNA_UI_GENDER))
|
||||||
|
H.gender = FEMALE
|
||||||
|
else
|
||||||
|
H.gender = MALE
|
||||||
|
|
||||||
|
//Hair
|
||||||
|
var/hair = dna.GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len)
|
||||||
|
if((0 < hair) && (hair <= hair_styles_list.len))
|
||||||
|
H.h_style = hair_styles_list[hair]
|
||||||
|
|
||||||
|
//Facial Hair
|
||||||
|
var/beard = dna.GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len)
|
||||||
|
if((0 < beard) && (beard <= facial_hair_styles_list.len))
|
||||||
|
H.f_style = facial_hair_styles_list[beard]
|
||||||
|
|
||||||
|
H.update_body(0)
|
||||||
|
H.update_hair()
|
||||||
|
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
|
||||||
|
// Used below, simple injection modifier.
|
||||||
|
/proc/probinj(var/pr, var/inj)
|
||||||
|
return prob(pr+inj*pr)
|
||||||
|
|
||||||
|
// (Re-)Apply mutations.
|
||||||
|
// TODO: Turn into a /mob proc, change inj to a bitflag for various forms of differing behavior.
|
||||||
|
// M: Mob to mess with
|
||||||
|
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
|
||||||
|
// inj: 1 for if we're checking this from an injector, screws with manifestation probability calc.
|
||||||
|
/proc/domutcheck(mob/living/M as mob, connected, inj)
|
||||||
|
if (!M) return
|
||||||
|
|
||||||
|
M.dna.check_integrity()
|
||||||
|
|
||||||
|
M.disabilities = 0
|
||||||
|
M.sdisabilities = 0
|
||||||
|
var/old_mutations = M.mutations
|
||||||
|
M.mutations = list()
|
||||||
|
M.pass_flags = 0
|
||||||
|
// M.see_in_dark = 2
|
||||||
|
// M.see_invisible = 0
|
||||||
|
|
||||||
|
if(PLANT in old_mutations)
|
||||||
|
M.mutations.Add(PLANT)
|
||||||
|
if(SKELETON in old_mutations)
|
||||||
|
M.mutations.Add(SKELETON)
|
||||||
|
if(FAT in old_mutations)
|
||||||
|
M.mutations.Add(FAT)
|
||||||
|
if(HUSK in old_mutations)
|
||||||
|
M.mutations.Add(HUSK)
|
||||||
|
|
||||||
|
/////////////////////////////////////
|
||||||
|
// IMPORTANT REMINDER
|
||||||
|
// IF A BLOCK IS SET TO 0 (unused)
|
||||||
|
// GetSEState(block) WILL RETURN 0
|
||||||
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
if(M.dna.GetSEState(NOBREATHBLOCK))
|
||||||
|
if(probinj(45,inj) || (mNobreath in old_mutations))
|
||||||
|
M << "\blue You feel no need to breathe."
|
||||||
|
M.mutations.Add(mNobreath)
|
||||||
|
if(M.dna.GetSEState(REMOTEVIEWBLOCK))
|
||||||
|
if(probinj(45,inj) || (mRemote in old_mutations))
|
||||||
|
M << "\blue Your mind expands"
|
||||||
|
M.mutations.Add(mRemote)
|
||||||
|
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||||
|
if(M.dna.GetSEState(REGENERATEBLOCK))
|
||||||
|
if(probinj(45,inj) || (mRegen in old_mutations))
|
||||||
|
M << "\blue You feel better"
|
||||||
|
M.mutations.Add(mRegen)
|
||||||
|
if(M.dna.GetSEState(INCREASERUNBLOCK))
|
||||||
|
if(probinj(45,inj) || (mRun in old_mutations))
|
||||||
|
M << "\blue Your leg muscles pulsate."
|
||||||
|
M.mutations.Add(mRun)
|
||||||
|
if(M.dna.GetSEState(REMOTETALKBLOCK))
|
||||||
|
if(probinj(45,inj) || (mRemotetalk in old_mutations))
|
||||||
|
M << "\blue You expand your mind outwards"
|
||||||
|
M.mutations.Add(mRemotetalk)
|
||||||
|
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||||
|
if(M.dna.GetSEState(MORPHBLOCK))
|
||||||
|
if(probinj(45,inj) || (mMorph in old_mutations))
|
||||||
|
M.mutations.Add(mMorph)
|
||||||
|
M << "\blue Your skin feels strange"
|
||||||
|
M.verbs += /mob/living/carbon/human/proc/morph
|
||||||
|
if(M.dna.GetSEState(HALLUCINATIONBLOCK))
|
||||||
|
if(probinj(45,inj) || (mHallucination in old_mutations))
|
||||||
|
M.mutations.Add(mHallucination)
|
||||||
|
M << "\red Your mind says 'Hello'"
|
||||||
|
if(M.dna.GetSEState(NOPRINTSBLOCK))
|
||||||
|
if(probinj(45,inj) || (mFingerprints in old_mutations))
|
||||||
|
M.mutations.Add(mFingerprints)
|
||||||
|
M << "\blue Your fingers feel numb"
|
||||||
|
if(M.dna.GetSEState(SHOCKIMMUNITYBLOCK))
|
||||||
|
if(probinj(45,inj) || (mShock in old_mutations))
|
||||||
|
M.mutations.Add(mShock)
|
||||||
|
M << "\blue Your skin feels strange"
|
||||||
|
if(M.dna.GetSEState(SMALLSIZEBLOCK))
|
||||||
|
if(probinj(45,inj) || (mSmallsize in old_mutations))
|
||||||
|
M << "\blue Your skin feels rubbery"
|
||||||
|
M.mutations.Add(mSmallsize)
|
||||||
|
M.pass_flags |= 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (M.dna.GetSEState(HULKBLOCK))
|
||||||
|
if(probinj(5,inj) || (HULK in old_mutations))
|
||||||
|
M << "\blue Your muscles hurt."
|
||||||
|
M.mutations.Add(HULK)
|
||||||
|
if (M.dna.GetSEState(HEADACHEBLOCK))
|
||||||
|
M.disabilities |= EPILEPSY
|
||||||
|
M << "\red You get a headache."
|
||||||
|
if (M.dna.GetSEState(FAKEBLOCK))
|
||||||
|
M << "\red You feel strange."
|
||||||
|
if (prob(95))
|
||||||
|
if(prob(50))
|
||||||
|
randmutb(M)
|
||||||
|
else
|
||||||
|
randmuti(M)
|
||||||
|
else
|
||||||
|
randmutg(M)
|
||||||
|
if (M.dna.GetSEState(COUGHBLOCK))
|
||||||
|
M.disabilities |= COUGHING
|
||||||
|
M << "\red You start coughing."
|
||||||
|
if (M.dna.GetSEState(CLUMSYBLOCK))
|
||||||
|
M << "\red You feel lightheaded."
|
||||||
|
M.mutations.Add(CLUMSY)
|
||||||
|
if (M.dna.GetSEState(TWITCHBLOCK))
|
||||||
|
M.disabilities |= TOURETTES
|
||||||
|
M << "\red You twitch."
|
||||||
|
if (M.dna.GetSEState(XRAYBLOCK))
|
||||||
|
if(probinj(30,inj) || (XRAY in old_mutations))
|
||||||
|
M << "\blue The walls suddenly disappear."
|
||||||
|
// M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||||
|
// M.see_in_dark = 8
|
||||||
|
// M.see_invisible = 2
|
||||||
|
M.mutations.Add(XRAY)
|
||||||
|
if (M.dna.GetSEState(NERVOUSBLOCK))
|
||||||
|
M.disabilities |= NERVOUS
|
||||||
|
M << "\red You feel nervous."
|
||||||
|
if (M.dna.GetSEState(FIREBLOCK))
|
||||||
|
if(probinj(30,inj) || (COLD_RESISTANCE in old_mutations))
|
||||||
|
M << "\blue Your body feels warm."
|
||||||
|
M.mutations.Add(COLD_RESISTANCE)
|
||||||
|
if (M.dna.GetSEState(BLINDBLOCK))
|
||||||
|
M.sdisabilities |= BLIND
|
||||||
|
M << "\red You can't seem to see anything."
|
||||||
|
if (M.dna.GetSEState(TELEBLOCK))
|
||||||
|
if(probinj(15,inj) || (TK in old_mutations))
|
||||||
|
M << "\blue You feel smarter."
|
||||||
|
M.mutations.Add(TK)
|
||||||
|
if (M.dna.GetSEState(DEAFBLOCK))
|
||||||
|
M.sdisabilities |= DEAF
|
||||||
|
M.ear_deaf = 1
|
||||||
|
M << "\red Its kinda quiet.."
|
||||||
|
if (M.dna.GetSEState(GLASSESBLOCK))
|
||||||
|
M.disabilities |= NEARSIGHTED
|
||||||
|
M << "Your eyes feel weird..."
|
||||||
|
|
||||||
|
/* If you want the new mutations to work, UNCOMMENT THIS.
|
||||||
|
if(istype(M, /mob/living/carbon))
|
||||||
|
for (var/datum/mutations/mut in global_mutations)
|
||||||
|
mut.check_mutation(M)
|
||||||
|
*/
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////// Monkey Block
|
||||||
|
if (M.dna.GetSEState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||||
|
// human > monkey
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
H.monkeyizing = 1
|
||||||
|
var/list/implants = list() //Try to preserve implants.
|
||||||
|
for(var/obj/item/weapon/implant/W in H)
|
||||||
|
implants += W
|
||||||
|
W.loc = null
|
||||||
|
|
||||||
|
if(!connected)
|
||||||
|
for(var/obj/item/W in (H.contents-implants))
|
||||||
|
if (W==H.w_uniform) // will be teared
|
||||||
|
continue
|
||||||
|
H.drop_from_inventory(W)
|
||||||
|
M.monkeyizing = 1
|
||||||
|
M.canmove = 0
|
||||||
|
M.icon = null
|
||||||
|
M.invisibility = 101
|
||||||
|
var/atom/movable/overlay/animation = new( M.loc )
|
||||||
|
animation.icon_state = "blank"
|
||||||
|
animation.icon = 'icons/mob/mob.dmi'
|
||||||
|
animation.master = src
|
||||||
|
flick("h2monkey", animation)
|
||||||
|
sleep(48)
|
||||||
|
del(animation)
|
||||||
|
|
||||||
|
|
||||||
|
var/mob/living/carbon/monkey/O = null
|
||||||
|
if(H.species.primitive)
|
||||||
|
O = new H.species.primitive(src)
|
||||||
|
else
|
||||||
|
H.gib() //Trying to change the species of a creature with no primitive var set is messy.
|
||||||
|
return
|
||||||
|
|
||||||
|
if(M)
|
||||||
|
if (M.dna)
|
||||||
|
O.dna = M.dna
|
||||||
|
M.dna = null
|
||||||
|
|
||||||
|
if (M.suiciding)
|
||||||
|
O.suiciding = M.suiciding
|
||||||
|
M.suiciding = null
|
||||||
|
|
||||||
|
|
||||||
|
for(var/datum/disease/D in M.viruses)
|
||||||
|
O.viruses += D
|
||||||
|
D.affected_mob = O
|
||||||
|
M.viruses -= D
|
||||||
|
|
||||||
|
|
||||||
|
for(var/obj/T in (M.contents-implants))
|
||||||
|
del(T)
|
||||||
|
|
||||||
|
O.loc = M.loc
|
||||||
|
|
||||||
|
if(M.mind)
|
||||||
|
M.mind.transfer_to(O) //transfer our mind to the cute little monkey
|
||||||
|
|
||||||
|
if (connected) //inside dna thing
|
||||||
|
var/obj/machinery/dna_scannernew/C = connected
|
||||||
|
O.loc = C
|
||||||
|
C.occupant = O
|
||||||
|
connected = null
|
||||||
|
O.real_name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
|
||||||
|
O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
|
||||||
|
O.adjustToxLoss(M.getToxLoss() + 20)
|
||||||
|
O.adjustOxyLoss(M.getOxyLoss())
|
||||||
|
O.stat = M.stat
|
||||||
|
O.a_intent = "hurt"
|
||||||
|
for (var/obj/item/weapon/implant/I in implants)
|
||||||
|
I.loc = O
|
||||||
|
I.implanted = O
|
||||||
|
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||||
|
del(M)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (!M.dna.GetSEState(MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
|
||||||
|
// monkey > human,
|
||||||
|
var/mob/living/carbon/monkey/Mo = M
|
||||||
|
Mo.monkeyizing = 1
|
||||||
|
var/list/implants = list() //Still preserving implants
|
||||||
|
for(var/obj/item/weapon/implant/W in Mo)
|
||||||
|
implants += W
|
||||||
|
W.loc = null
|
||||||
|
if(!connected)
|
||||||
|
for(var/obj/item/W in (Mo.contents-implants))
|
||||||
|
Mo.drop_from_inventory(W)
|
||||||
|
M.monkeyizing = 1
|
||||||
|
M.canmove = 0
|
||||||
|
M.icon = null
|
||||||
|
M.invisibility = 101
|
||||||
|
var/atom/movable/overlay/animation = new( M.loc )
|
||||||
|
animation.icon_state = "blank"
|
||||||
|
animation.icon = 'icons/mob/mob.dmi'
|
||||||
|
animation.master = src
|
||||||
|
flick("monkey2h", animation)
|
||||||
|
sleep(48)
|
||||||
|
del(animation)
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/O = new( src )
|
||||||
|
if(Mo.greaterform)
|
||||||
|
O.set_species(Mo.greaterform)
|
||||||
|
|
||||||
|
if (M.dna.GetUIState(DNA_UI_GENDER))
|
||||||
|
O.gender = FEMALE
|
||||||
|
else
|
||||||
|
O.gender = MALE
|
||||||
|
|
||||||
|
if (M)
|
||||||
|
if (M.dna)
|
||||||
|
O.dna = M.dna
|
||||||
|
M.dna = null
|
||||||
|
|
||||||
|
if (M.suiciding)
|
||||||
|
O.suiciding = M.suiciding
|
||||||
|
M.suiciding = null
|
||||||
|
|
||||||
|
for(var/datum/disease/D in M.viruses)
|
||||||
|
O.viruses += D
|
||||||
|
D.affected_mob = O
|
||||||
|
M.viruses -= D
|
||||||
|
|
||||||
|
//for(var/obj/T in M)
|
||||||
|
// del(T)
|
||||||
|
|
||||||
|
O.loc = M.loc
|
||||||
|
|
||||||
|
if(M.mind)
|
||||||
|
M.mind.transfer_to(O) //transfer our mind to the human
|
||||||
|
|
||||||
|
if (connected) //inside dna thing
|
||||||
|
var/obj/machinery/dna_scannernew/C = connected
|
||||||
|
O.loc = C
|
||||||
|
C.occupant = O
|
||||||
|
connected = null
|
||||||
|
|
||||||
|
var/i
|
||||||
|
while (!i)
|
||||||
|
var/randomname
|
||||||
|
if (O.gender == MALE)
|
||||||
|
randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
|
||||||
|
else
|
||||||
|
randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names)))
|
||||||
|
if (findname(randomname))
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
O.real_name = randomname
|
||||||
|
i++
|
||||||
|
O.UpdateAppearance()
|
||||||
|
O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
|
||||||
|
O.adjustToxLoss(M.getToxLoss())
|
||||||
|
O.adjustOxyLoss(M.getOxyLoss())
|
||||||
|
O.stat = M.stat
|
||||||
|
for (var/obj/item/weapon/implant/I in implants)
|
||||||
|
I.loc = O
|
||||||
|
I.implanted = O
|
||||||
|
// O.update_icon = 1 //queue a full icon update at next life() call
|
||||||
|
del(M)
|
||||||
|
return
|
||||||
|
//////////////////////////////////////////////////////////// Monkey Block
|
||||||
|
if(M)
|
||||||
|
M.update_icon = 1 //queue a full icon update at next life() call
|
||||||
|
return null
|
||||||
|
/////////////////////////// DNA MISC-PROCS
|
||||||
@@ -302,19 +302,19 @@
|
|||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/buffer)
|
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/list/buffer)
|
||||||
var/list/arr = list()
|
var/list/arr = list()
|
||||||
for(var/i = 1, i <= length(buffer)/3, i++)
|
for(var/i = 1, i <= buffer.len, i++)
|
||||||
arr += "[i]:[copytext(buffer,i*3-2,i*3+1)]"
|
arr += "[i]:[EncodeDNABlock(buffer[i])]"
|
||||||
return arr
|
return arr
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/buffer)
|
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/weapon/dnainjector/I, var/blk, var/list/buffer)
|
||||||
var/pos = findtext(blk,":")
|
var/pos = findtext(blk,":")
|
||||||
if(!pos) return 0
|
if(!pos) return 0
|
||||||
var/id = text2num(copytext(blk,1,pos))
|
var/id = text2num(copytext(blk,1,pos))
|
||||||
if(!id) return 0
|
if(!id) return 0
|
||||||
I.block = id
|
I.block = id
|
||||||
I.dna = copytext(buffer,id*3-2,id*3+1)
|
I.dna = list(buffer[id])
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/computer/scan_consolenew/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
@@ -571,10 +571,7 @@
|
|||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
|
|
||||||
if (href_list["pulseUIRadiation"])
|
if (href_list["pulseUIRadiation"])
|
||||||
var/block
|
var/block = src.connected.occupant.dna.GetUISubBlock(src.selected_ui_block,src.selected_ui_subblock)
|
||||||
var/newblock
|
|
||||||
var/tstructure2
|
|
||||||
block = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),src.selected_ui_subblock,1)
|
|
||||||
|
|
||||||
irradiating = src.radiation_duration
|
irradiating = src.radiation_duration
|
||||||
var/lock_state = src.connected.locked
|
var/lock_state = src.connected.locked
|
||||||
@@ -590,13 +587,8 @@
|
|||||||
|
|
||||||
if (prob((80 + (src.radiation_duration / 2))))
|
if (prob((80 + (src.radiation_duration / 2))))
|
||||||
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
||||||
newblock = null
|
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
|
||||||
if (src.selected_ui_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),3,1)
|
src.connected.occupant.UpdateAppearance()
|
||||||
if (src.selected_ui_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),3,1)
|
|
||||||
if (src.selected_ui_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.uni_identity,src.selected_ui_block,DNA_BLOCK_SIZE),2,1) + block
|
|
||||||
tstructure2 = setblock(src.connected.occupant.dna.uni_identity, src.selected_ui_block, newblock,DNA_BLOCK_SIZE)
|
|
||||||
src.connected.occupant.dna.uni_identity = tstructure2
|
|
||||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
|
||||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||||
else
|
else
|
||||||
if (prob(20+src.radiation_intensity))
|
if (prob(20+src.radiation_intensity))
|
||||||
@@ -604,7 +596,7 @@
|
|||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
else
|
else
|
||||||
randmuti(src.connected.occupant)
|
randmuti(src.connected.occupant)
|
||||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
src.connected.occupant.UpdateAppearance()
|
||||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||||
src.connected.locked = lock_state
|
src.connected.locked = lock_state
|
||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
@@ -635,12 +627,7 @@
|
|||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
|
|
||||||
if (href_list["pulseSERadiation"])
|
if (href_list["pulseSERadiation"])
|
||||||
var/block
|
var/block = src.connected.occupant.dna.GetSESubBlock(src.selected_se_block,src.selected_se_subblock)
|
||||||
var/newblock
|
|
||||||
var/tstructure2
|
|
||||||
var/oldblock
|
|
||||||
|
|
||||||
block = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),src.selected_se_subblock,1)
|
|
||||||
|
|
||||||
irradiating = src.radiation_duration
|
irradiating = src.radiation_duration
|
||||||
var/lock_state = src.connected.locked
|
var/lock_state = src.connected.locked
|
||||||
@@ -653,31 +640,17 @@
|
|||||||
|
|
||||||
if(src.connected.occupant)
|
if(src.connected.occupant)
|
||||||
if (prob((80 + (src.radiation_duration / 2))))
|
if (prob((80 + (src.radiation_duration / 2))))
|
||||||
if ((src.selected_se_block != 2 || src.selected_se_block != 12 || src.selected_se_block != 8 || src.selected_se_block || 10) && prob (20))
|
// FIXME: Find out what these corresponded to and change them to the WHATEVERBLOCK they need to be.
|
||||||
oldblock = src.selected_se_block
|
//if ((src.selected_se_block != 2 || src.selected_se_block != 12 || src.selected_se_block != 8 || src.selected_se_block || 10) && prob (20))
|
||||||
|
var/real_SE_block=selected_se_block
|
||||||
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
|
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
|
||||||
newblock = null
|
if(prob(20))
|
||||||
if (src.selected_se_block > 1 && src.selected_se_block < STRUCDNASIZE/2)
|
if (src.selected_se_block > 1 && src.selected_se_block < STRUCDNASIZE/2)
|
||||||
src.selected_se_block++
|
real_SE_block++
|
||||||
else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE)
|
else if (src.selected_se_block > STRUCDNASIZE/2 && src.selected_se_block < STRUCDNASIZE)
|
||||||
src.selected_se_block--
|
real_SE_block--
|
||||||
if (src.selected_se_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
|
||||||
if (src.selected_se_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
|
||||||
if (src.selected_se_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + block
|
|
||||||
tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.selected_se_block, newblock,DNA_BLOCK_SIZE)
|
|
||||||
src.connected.occupant.dna.struc_enzymes = tstructure2
|
|
||||||
domutcheck(src.connected.occupant,src.connected)
|
|
||||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
|
||||||
src.selected_se_block = oldblock
|
|
||||||
else
|
|
||||||
//
|
|
||||||
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
|
|
||||||
newblock = null
|
|
||||||
if (src.selected_se_subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
|
||||||
if (src.selected_se_subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),3,1)
|
|
||||||
if (src.selected_se_subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.selected_se_block,DNA_BLOCK_SIZE),2,1) + block
|
|
||||||
tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.selected_se_block, newblock,DNA_BLOCK_SIZE)
|
|
||||||
src.connected.occupant.dna.struc_enzymes = tstructure2
|
|
||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||||
else
|
else
|
||||||
@@ -686,7 +659,7 @@
|
|||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
else
|
else
|
||||||
randmuti(src.connected.occupant)
|
randmuti(src.connected.occupant)
|
||||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
src.connected.occupant.UpdateAppearance()
|
||||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||||
src.connected.locked = lock_state
|
src.connected.locked = lock_state
|
||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
@@ -738,7 +711,7 @@
|
|||||||
if (bufferOption == "saveUI")
|
if (bufferOption == "saveUI")
|
||||||
if(src.connected.occupant && src.connected.occupant.dna)
|
if(src.connected.occupant && src.connected.occupant.dna)
|
||||||
src.buffers[bufferId]["ue"] = 0
|
src.buffers[bufferId]["ue"] = 0
|
||||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.uni_identity
|
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI
|
||||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||||
else
|
else
|
||||||
@@ -749,7 +722,7 @@
|
|||||||
|
|
||||||
if (bufferOption == "saveUIAndUE")
|
if (bufferOption == "saveUIAndUE")
|
||||||
if(src.connected.occupant && src.connected.occupant.dna)
|
if(src.connected.occupant && src.connected.occupant.dna)
|
||||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.uni_identity
|
src.buffers[bufferId]["data"] = src.connected.occupant.dna.UI
|
||||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||||
else
|
else
|
||||||
@@ -762,7 +735,7 @@
|
|||||||
if (bufferOption == "saveSE")
|
if (bufferOption == "saveSE")
|
||||||
if(src.connected.occupant && src.connected.occupant.dna)
|
if(src.connected.occupant && src.connected.occupant.dna)
|
||||||
src.buffers[bufferId]["ue"] = 0
|
src.buffers[bufferId]["ue"] = 0
|
||||||
src.buffers[bufferId]["data"] = src.connected.occupant.dna.struc_enzymes
|
src.buffers[bufferId]["data"] = src.connected.occupant.dna.SE
|
||||||
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
if (!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||||
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
src.buffers[bufferId]["owner"] = src.connected.occupant.name
|
||||||
else
|
else
|
||||||
@@ -801,10 +774,10 @@
|
|||||||
if (src.buffers[bufferId]["ue"])
|
if (src.buffers[bufferId]["ue"])
|
||||||
src.connected.occupant.real_name = src.buffers[bufferId]["owner"]
|
src.connected.occupant.real_name = src.buffers[bufferId]["owner"]
|
||||||
src.connected.occupant.name = src.buffers[bufferId]["owner"]
|
src.connected.occupant.name = src.buffers[bufferId]["owner"]
|
||||||
src.connected.occupant.dna.uni_identity = src.buffers[bufferId]["data"]
|
src.connected.occupant.UpdateAppearance(src.buffers[bufferId]["data"])
|
||||||
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
|
|
||||||
else if (src.buffers[bufferId]["type"] == "se")
|
else if (src.buffers[bufferId]["type"] == "se")
|
||||||
src.connected.occupant.dna.struc_enzymes = src.buffers[bufferId]["data"]
|
src.connected.occupant.dna.SE = src.buffers[bufferId]["data"]
|
||||||
|
src.connected.occupant.dna.UpdateSE()
|
||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
src.connected.occupant.radiation += rand(20,50)
|
src.connected.occupant.radiation += rand(20,50)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
src.dna = chosen_dna
|
src.dna = chosen_dna
|
||||||
src.real_name = chosen_dna.real_name
|
src.real_name = chosen_dna.real_name
|
||||||
src.flavor_text = ""
|
src.flavor_text = ""
|
||||||
updateappearance(src, src.dna.uni_identity)
|
src.UpdateAppearance()
|
||||||
domutcheck(src, null)
|
domutcheck(src, null)
|
||||||
|
|
||||||
src.verbs -= /mob/proc/changeling_transform
|
src.verbs -= /mob/proc/changeling_transform
|
||||||
@@ -314,7 +314,7 @@
|
|||||||
W.layer = initial(W.layer)
|
W.layer = initial(W.layer)
|
||||||
|
|
||||||
var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )
|
var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )
|
||||||
if (isblockon(getblock(C.dna.uni_identity, 11,3),11))
|
if (C.dna.GetUIState(DNA_UI_GENDER))
|
||||||
O.gender = FEMALE
|
O.gender = FEMALE
|
||||||
else
|
else
|
||||||
O.gender = MALE
|
O.gender = MALE
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
|
|
||||||
O.loc = C.loc
|
O.loc = C.loc
|
||||||
|
|
||||||
updateappearance(O,O.dna.uni_identity)
|
O.UpdateAppearance()
|
||||||
domutcheck(O, null)
|
domutcheck(O, null)
|
||||||
O.setToxLoss(C.getToxLoss())
|
O.setToxLoss(C.getToxLoss())
|
||||||
O.adjustBruteLoss(C.getBruteLoss())
|
O.adjustBruteLoss(C.getBruteLoss())
|
||||||
@@ -719,7 +719,7 @@ var/list/datum/dna/hivemind_bank = list()
|
|||||||
T.visible_message("<span class='warning'>[T] transforms!</span>")
|
T.visible_message("<span class='warning'>[T] transforms!</span>")
|
||||||
T.dna = chosen_dna
|
T.dna = chosen_dna
|
||||||
T.real_name = chosen_dna.real_name
|
T.real_name = chosen_dna.real_name
|
||||||
updateappearance(T, T.dna.uni_identity)
|
T.UpdateAppearance()
|
||||||
domutcheck(T, null)
|
domutcheck(T, null)
|
||||||
feedback_add_details("changeling_powers","TS")
|
feedback_add_details("changeling_powers","TS")
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -163,8 +163,8 @@
|
|||||||
continue
|
continue
|
||||||
var/datum/disease/dnaspread/D = new
|
var/datum/disease/dnaspread/D = new
|
||||||
D.strain_data["name"] = H.real_name
|
D.strain_data["name"] = H.real_name
|
||||||
D.strain_data["UI"] = H.dna.uni_identity
|
D.strain_data["UI"] = H.dna.UI
|
||||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
D.strain_data["SE"] = H.dna.SE
|
||||||
D.carrier = 1
|
D.carrier = 1
|
||||||
D.holder = H
|
D.holder = H
|
||||||
D.affected_mob = H
|
D.affected_mob = H
|
||||||
|
|||||||
@@ -1,10 +1,27 @@
|
|||||||
|
/////////////////////////
|
||||||
|
// (mostly) DNA2 SETUP
|
||||||
|
/////////////////////////
|
||||||
|
|
||||||
|
// Randomize block, assign a reference name, and optionally define difficulty (by making activation zone smaller or bigger)
|
||||||
|
// The name is used on /vg/ for species with predefined genetic traits,
|
||||||
|
// and for the DNA panel in the player panel.
|
||||||
|
/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS)
|
||||||
|
var/assigned = pick(blocksLeft)
|
||||||
|
blocksLeft.Remove(assigned)
|
||||||
|
assigned_blocks[assigned]=name
|
||||||
|
dna_activity_bounds[assigned]=activity_bounds
|
||||||
|
//testing("[name] assigned to block #[assigned].")
|
||||||
|
return assigned
|
||||||
|
|
||||||
/proc/setupgenetics()
|
/proc/setupgenetics()
|
||||||
|
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
|
// Currently unused. Will revisit. - N3X
|
||||||
BLOCKADD = rand(-300,300)
|
BLOCKADD = rand(-300,300)
|
||||||
if (prob(75))
|
if (prob(75))
|
||||||
DIFFMUT = rand(0,20)
|
DIFFMUT = rand(0,20)
|
||||||
|
|
||||||
|
/* Old, for reference (so I don't accidentally activate something) - N3X
|
||||||
var/list/avnums = new/list()
|
var/list/avnums = new/list()
|
||||||
var/tempnum
|
var/tempnum
|
||||||
|
|
||||||
@@ -41,6 +58,45 @@
|
|||||||
tempnum = pick(avnums)
|
tempnum = pick(avnums)
|
||||||
avnums.Remove(tempnum)
|
avnums.Remove(tempnum)
|
||||||
BLINDBLOCK = tempnum
|
BLINDBLOCK = tempnum
|
||||||
|
*/
|
||||||
|
var/list/numsToAssign=new()
|
||||||
|
for(var/i=1;i<STRUCDNASIZE;i++)
|
||||||
|
numsToAssign += i
|
||||||
|
|
||||||
|
//testing("Assigning DNA blocks:")
|
||||||
|
|
||||||
|
// Standard muts, imported from older code above.
|
||||||
|
BLINDBLOCK = getAssignedBlock("BLIND", numsToAssign)
|
||||||
|
DEAFBLOCK = getAssignedBlock("DEAF", numsToAssign)
|
||||||
|
HULKBLOCK = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS)
|
||||||
|
TELEBLOCK = getAssignedBlock("TELE", numsToAssign, DNA_HARD_BOUNDS)
|
||||||
|
FIREBLOCK = getAssignedBlock("FIRE", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
XRAYBLOCK = getAssignedBlock("XRAY", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
CLUMSYBLOCK = getAssignedBlock("CLUMSY", numsToAssign)
|
||||||
|
FAKEBLOCK = getAssignedBlock("FAKE", numsToAssign)
|
||||||
|
|
||||||
|
// UNUSED!
|
||||||
|
//COUGHBLOCK = getAssignedBlock("COUGH", numsToAssign)
|
||||||
|
//GLASSESBLOCK = getAssignedBlock("GLASSES", numsToAssign)
|
||||||
|
//EPILEPSYBLOCK = getAssignedBlock("EPILEPSY", numsToAssign)
|
||||||
|
//TWITCHBLOCK = getAssignedBlock("TWITCH", numsToAssign)
|
||||||
|
//NERVOUSBLOCK = getAssignedBlock("NERVOUS", numsToAssign)
|
||||||
|
|
||||||
|
// Bay muts (UNUSED)
|
||||||
|
//HEADACHEBLOCK = getAssignedBlock("HEADACHE", numsToAssign)
|
||||||
|
//NOBREATHBLOCK = getAssignedBlock("NOBREATH", numsToAssign, DNA_HARD_BOUNDS)
|
||||||
|
//REMOTEVIEWBLOCK = getAssignedBlock("REMOTEVIEW", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
//REGENERATEBLOCK = getAssignedBlock("REGENERATE", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
//INCREASERUNBLOCK = getAssignedBlock("INCREASERUN", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
//REMOTETALKBLOCK = getAssignedBlock("REMOTETALK", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
//MORPHBLOCK = getAssignedBlock("MORPH", numsToAssign, DNA_HARDER_BOUNDS)
|
||||||
|
//COLDBLOCK = getAssignedBlock("COLD", numsToAssign)
|
||||||
|
//HALLUCINATIONBLOCK = getAssignedBlock("HALLUCINATION", numsToAssign)
|
||||||
|
//NOPRINTSBLOCK = getAssignedBlock("NOPRINTS", numsToAssign, DNA_HARD_BOUNDS)
|
||||||
|
//SHOCKIMMUNITYBLOCK = getAssignedBlock("SHOCKIMMUNITY", numsToAssign)
|
||||||
|
//SMALLSIZEBLOCK = getAssignedBlock("SMALLSIZE", numsToAssign, DNA_HARD_BOUNDS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
//Clonepod
|
//Clonepod
|
||||||
|
|
||||||
//Start growing a human clone in the pod!
|
//Start growing a human clone in the pod!
|
||||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/datum/species/mrace, var/languages)
|
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/list/ui, var/list/se, var/mindref, var/datum/species/mrace, var/languages)
|
||||||
if(mess || attempting)
|
if(mess || attempting)
|
||||||
return 0
|
return 0
|
||||||
var/datum/mind/clonemind = locate(mindref)
|
var/datum/mind/clonemind = locate(mindref)
|
||||||
@@ -184,10 +184,10 @@
|
|||||||
H.dna = new /datum/dna()
|
H.dna = new /datum/dna()
|
||||||
H.dna.real_name = H.real_name
|
H.dna.real_name = H.real_name
|
||||||
if(ui)
|
if(ui)
|
||||||
H.dna.uni_identity = ui
|
H.UpdateAppearance(ui)
|
||||||
updateappearance(H, ui)
|
|
||||||
if(se)
|
if(se)
|
||||||
H.dna.struc_enzymes = se
|
H.dna.SE = se
|
||||||
|
H.dna.UpdateSE()
|
||||||
randmutb(H) //Sometimes the clones come out wrong.
|
randmutb(H) //Sometimes the clones come out wrong.
|
||||||
|
|
||||||
H.f_style = "Shaved"
|
H.f_style = "Shaved"
|
||||||
|
|||||||
@@ -368,8 +368,8 @@
|
|||||||
R.fields["ckey"] = subject.ckey
|
R.fields["ckey"] = subject.ckey
|
||||||
R.fields["name"] = subject.real_name
|
R.fields["name"] = subject.real_name
|
||||||
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
|
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)
|
||||||
R.fields["UI"] = subject.dna.uni_identity
|
R.fields["UI"] = subject.dna.UI
|
||||||
R.fields["SE"] = subject.dna.struc_enzymes
|
R.fields["SE"] = subject.dna.SE
|
||||||
R.fields["languages"] = subject.languages
|
R.fields["languages"] = subject.languages
|
||||||
|
|
||||||
//Add an implant if needed
|
//Add an implant if needed
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
icon = 'icons/obj/items.dmi'
|
icon = 'icons/obj/items.dmi'
|
||||||
icon_state = "dnainjector"
|
icon_state = "dnainjector"
|
||||||
var/dnatype = null
|
var/dnatype = null
|
||||||
var/dna = null
|
var/list/dna = null
|
||||||
var/block = null
|
var/block = null
|
||||||
var/owner = null
|
var/owner = null
|
||||||
var/ue = null
|
var/ue = null
|
||||||
@@ -21,6 +21,34 @@
|
|||||||
return attack_hand(user)
|
return attack_hand(user)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/proc/GetState(var/selblock=0)
|
||||||
|
var/real_block
|
||||||
|
if(!selblock)
|
||||||
|
real_block=block
|
||||||
|
selblock=1
|
||||||
|
else
|
||||||
|
real_block=selblock
|
||||||
|
var/list/BOUNDS = GetDNABounds(real_block)
|
||||||
|
return dna[selblock] > BOUNDS[DNA_ON_LOWERBOUND]
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/proc/SetState(var/on, var/selblock=0)
|
||||||
|
var/real_block
|
||||||
|
if(!selblock)
|
||||||
|
real_block=block
|
||||||
|
selblock=1
|
||||||
|
else
|
||||||
|
real_block=selblock
|
||||||
|
var/list/BOUNDS=GetDNABounds(real_block)
|
||||||
|
var/val
|
||||||
|
if(on)
|
||||||
|
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
|
||||||
|
else
|
||||||
|
val=rand(BOUNDS[DNA_OFF_LOWERBOUND],BOUNDS[DNA_OFF_UPPERBOUND])
|
||||||
|
dna[selblock]=val
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/proc/GetValue(var/block=1)
|
||||||
|
return dna[block]
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
||||||
if(istype(M,/mob/living))
|
if(istype(M,/mob/living))
|
||||||
M.radiation += rand(5,20)
|
M.radiation += rand(5,20)
|
||||||
@@ -28,28 +56,22 @@
|
|||||||
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
|
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
|
||||||
if (dnatype == "ui")
|
if (dnatype == "ui")
|
||||||
if (!block) //isolated block?
|
if (!block) //isolated block?
|
||||||
|
M.UpdateAppearance(dna)
|
||||||
if (ue) //unique enzymes? yes
|
if (ue) //unique enzymes? yes
|
||||||
M.dna.uni_identity = dna
|
|
||||||
updateappearance(M, M.dna.uni_identity)
|
|
||||||
M.real_name = ue
|
M.real_name = ue
|
||||||
M.name = ue
|
M.name = ue
|
||||||
uses--
|
uses--
|
||||||
else //unique enzymes? no
|
|
||||||
M.dna.uni_identity = dna
|
|
||||||
updateappearance(M, M.dna.uni_identity)
|
|
||||||
uses--
|
|
||||||
else
|
else
|
||||||
M.dna.uni_identity = setblock(M.dna.uni_identity,block,dna,3)
|
M.dna.SetUIValue(block,src.GetValue())
|
||||||
updateappearance(M, M.dna.uni_identity)
|
M.UpdateAppearance()
|
||||||
uses--
|
uses--
|
||||||
if (dnatype == "se")
|
if (dnatype == "se")
|
||||||
if (!block) //isolated block?
|
if (!block) //isolated block?
|
||||||
M.dna.struc_enzymes = dna
|
M.dna.SE = dna
|
||||||
domutcheck(M, null)
|
M.dna.UpdateSE()
|
||||||
uses--
|
|
||||||
else
|
else
|
||||||
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes,block,dna,3)
|
M.dna.SetSEValue(block,src.GetValue())
|
||||||
domutcheck(M, null,1)
|
domutcheck(M, null, block!=null)
|
||||||
uses--
|
uses--
|
||||||
if(prob(5))
|
if(prob(5))
|
||||||
trigger_side_effect(M)
|
trigger_side_effect(M)
|
||||||
@@ -86,7 +108,10 @@
|
|||||||
inuse = 0
|
inuse = 0
|
||||||
M.requests += O
|
M.requests += O
|
||||||
if (dnatype == "se")
|
if (dnatype == "se")
|
||||||
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
|
// So you're checking for 14, and yet MONKEYBLOCK is 27 in globals.dm,
|
||||||
|
// and domutcheck checks MONKEYBLOCK...? wat. - N3X
|
||||||
|
//if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
|
||||||
|
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human) )
|
||||||
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||||
else
|
else
|
||||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||||
@@ -108,7 +133,9 @@
|
|||||||
user << "\red Apparently it didn't work."
|
user << "\red Apparently it didn't work."
|
||||||
return
|
return
|
||||||
if (dnatype == "se")
|
if (dnatype == "se")
|
||||||
if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
|
// And again... ?
|
||||||
|
//if (isblockon(getblock(dna, 14,3),14) && istype(M, /mob/living/carbon/human))
|
||||||
|
if (GetState(MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||||
else
|
else
|
||||||
@@ -135,21 +162,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/antihulk
|
/obj/item/weapon/dnainjector/hulkmut
|
||||||
name = "DNA-Injector (Anti-Hulk)"
|
name = "DNA-Injector (Hulk)"
|
||||||
desc = "Cures green skin."
|
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(4090)
|
||||||
//block = 2
|
//block = 2
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
block = HULKBLOCK
|
block = HULKBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/hulkmut
|
/obj/item/weapon/dnainjector/antihulk
|
||||||
name = "DNA-Injector (Hulk)"
|
name = "DNA-Injector (Anti-Hulk)"
|
||||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
desc = "Cures green skin."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FED"
|
dna = list(1)
|
||||||
//block = 2
|
//block = 2
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -159,7 +186,7 @@
|
|||||||
name = "DNA-Injector (Xray)"
|
name = "DNA-Injector (Xray)"
|
||||||
desc = "Finally you can see what the Captain does."
|
desc = "Finally you can see what the Captain does."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FED"
|
dna = list(4090)
|
||||||
//block = 8
|
//block = 8
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -169,60 +196,298 @@
|
|||||||
name = "DNA-Injector (Anti-Xray)"
|
name = "DNA-Injector (Anti-Xray)"
|
||||||
desc = "It will make you see harder."
|
desc = "It will make you see harder."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
//block = 8
|
//block = 8
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
block = XRAYBLOCK
|
block = XRAYBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/firemut
|
||||||
|
name = "DNA-Injector (Fire)"
|
||||||
|
desc = "Gives you fire."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 10
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = FIREBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antifire
|
||||||
|
name = "DNA-Injector (Anti-Fire)"
|
||||||
|
desc = "Cures fire."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 10
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = FIREBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/telemut
|
||||||
|
name = "DNA-Injector (Tele.)"
|
||||||
|
desc = "Super brain man!"
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 12
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = TELEBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antitele
|
||||||
|
name = "DNA-Injector (Anti-Tele.)"
|
||||||
|
desc = "Will make you not able to control your mind."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 12
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = TELEBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/nobreath
|
||||||
|
name = "DNA-Injector (No Breath)"
|
||||||
|
desc = "Hold your breath and count to infinity."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = NOBREATHBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antinobreath
|
||||||
|
name = "DNA-Injector (Anti-No Breath)"
|
||||||
|
desc = "Hold your breath and count to 100."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = NOBREATHBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/remoteview
|
||||||
|
name = "DNA-Injector (Remote View)"
|
||||||
|
desc = "Stare into the distance for a reason."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = REMOTEVIEWBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antiremoteview
|
||||||
|
name = "DNA-Injector (Anti-Remote View)"
|
||||||
|
desc = "Cures green skin."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = REMOTEVIEWBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/regenerate
|
||||||
|
name = "DNA-Injector (Regeneration)"
|
||||||
|
desc = "Healthy but hungry."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = REGENERATEBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antiregenerate
|
||||||
|
name = "DNA-Injector (Anti-Regeneration)"
|
||||||
|
desc = "Sickly but sated."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = REGENERATEBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/runfast
|
||||||
|
name = "DNA-Injector (Increase Run)"
|
||||||
|
desc = "Running Man."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = INCREASERUNBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antirunfast
|
||||||
|
name = "DNA-Injector (Anti-Increase Run)"
|
||||||
|
desc = "Walking Man."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = INCREASERUNBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/morph
|
||||||
|
name = "DNA-Injector (Morph)"
|
||||||
|
desc = "A total makeover."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = MORPHBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antimorph
|
||||||
|
name = "DNA-Injector (Anti-Morph)"
|
||||||
|
desc = "Cures identity crisis."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = MORPHBLOCK
|
||||||
|
/*
|
||||||
|
/obj/item/weapon/dnainjector/cold
|
||||||
|
name = "DNA-Injector (Cold)"
|
||||||
|
desc = "Feels a bit chilly."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = COLDBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/anticold
|
||||||
|
name = "DNA-Injector (Anti-Cold)"
|
||||||
|
desc = "Feels room-temperature."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = COLDBLOCK
|
||||||
|
*/
|
||||||
|
/obj/item/weapon/dnainjector/noprints
|
||||||
|
name = "DNA-Injector (No Prints)"
|
||||||
|
desc = "Better than a pair of budget insulated gloves."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = NOPRINTSBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antinoprints
|
||||||
|
name = "DNA-Injector (Anti-No Prints)"
|
||||||
|
desc = "Not quite as good as a pair of budget insulated gloves."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = NOPRINTSBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/insulation
|
||||||
|
name = "DNA-Injector (Shock Immunity)"
|
||||||
|
desc = "Better than a pair of real insulated gloves."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = SHOCKIMMUNITYBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antiinsulation
|
||||||
|
name = "DNA-Injector (Anti-Shock Immunity)"
|
||||||
|
desc = "Not quite as good as a pair of real insulated gloves."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = SHOCKIMMUNITYBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/midgit
|
||||||
|
name = "DNA-Injector (Small Size)"
|
||||||
|
desc = "Makes you shrink."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = SMALLSIZEBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antimidgit
|
||||||
|
name = "DNA-Injector (Anti-Small Size)"
|
||||||
|
desc = "Makes you grow. But not too much."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = SMALLSIZEBLOCK
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
/obj/item/weapon/dnainjector/antiglasses
|
/obj/item/weapon/dnainjector/antiglasses
|
||||||
name = "DNA-Injector (Anti-Glasses)"
|
name = "DNA-Injector (Anti-Glasses)"
|
||||||
desc = "Toss away those glasses!"
|
desc = "Toss away those glasses!"
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 1
|
//block = 1
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = GLASSESBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/glassesmut
|
/obj/item/weapon/dnainjector/glassesmut
|
||||||
name = "DNA-Injector (Glasses)"
|
name = "DNA-Injector (Glasses)"
|
||||||
desc = "Will make you need dorkish glasses."
|
desc = "Will make you need dorkish glasses."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "BD6"
|
dna = list(4090)
|
||||||
block = 1
|
//block = 1
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = GLASSESBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/epimut
|
/obj/item/weapon/dnainjector/epimut
|
||||||
name = "DNA-Injector (Epi.)"
|
name = "DNA-Injector (Epi.)"
|
||||||
desc = "Shake shake shake the room!"
|
desc = "Shake shake shake the room!"
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
block = 3
|
//block = 3
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = HEADACHEBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/antiepi
|
/obj/item/weapon/dnainjector/antiepi
|
||||||
name = "DNA-Injector (Anti-Epi.)"
|
name = "DNA-Injector (Anti-Epi.)"
|
||||||
desc = "Will fix you up from shaking the room."
|
desc = "Will fix you up from shaking the room."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 3
|
//block = 3
|
||||||
////////////////////////////////////
|
New()
|
||||||
|
..()
|
||||||
|
block = HEADACHEBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/anticough
|
/obj/item/weapon/dnainjector/anticough
|
||||||
name = "DNA-Injector (Anti-Cough)"
|
name = "DNA-Injector (Anti-Cough)"
|
||||||
desc = "Will stop that awful noise."
|
desc = "Will stop that awful noise."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 5
|
//block = 5
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = COUGHBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/coughmut
|
/obj/item/weapon/dnainjector/coughmut
|
||||||
name = "DNA-Injector (Cough)"
|
name = "DNA-Injector (Cough)"
|
||||||
desc = "Will bring forth a sound of horror from your throat."
|
desc = "Will bring forth a sound of horror from your throat."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "BD6"
|
dna = list(4090)
|
||||||
block = 5
|
//block = 5
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = COUGHBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/clumsymut
|
/obj/item/weapon/dnainjector/clumsymut
|
||||||
name = "DNA-Injector (Clumsy)"
|
name = "DNA-Injector (Clumsy)"
|
||||||
desc = "Makes clumsy minions."
|
desc = "Makes clumsy minions."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
//block = 6
|
//block = 6
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -232,7 +497,7 @@
|
|||||||
name = "DNA-Injector (Anti-Clumy)"
|
name = "DNA-Injector (Anti-Clumy)"
|
||||||
desc = "Cleans up confusion."
|
desc = "Cleans up confusion."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
//block = 6
|
//block = 6
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -242,55 +507,47 @@
|
|||||||
name = "DNA-Injector (Anti-Tour.)"
|
name = "DNA-Injector (Anti-Tour.)"
|
||||||
desc = "Will cure tourrets."
|
desc = "Will cure tourrets."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 7
|
//block = 7
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = TWITCHBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/tourmut
|
/obj/item/weapon/dnainjector/tourmut
|
||||||
name = "DNA-Injector (Tour.)"
|
name = "DNA-Injector (Tour.)"
|
||||||
desc = "Gives you a nasty case off tourrets."
|
desc = "Gives you a nasty case off tourrets."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "BD6"
|
dna = list(4090)
|
||||||
block = 7
|
//block = 7
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = TWITCHBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/stuttmut
|
/obj/item/weapon/dnainjector/stuttmut
|
||||||
name = "DNA-Injector (Stutt.)"
|
name = "DNA-Injector (Stutt.)"
|
||||||
desc = "Makes you s-s-stuttterrr"
|
desc = "Makes you s-s-stuttterrr"
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
block = 9
|
//block = 9
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = NERVOUSBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/antistutt
|
/obj/item/weapon/dnainjector/antistutt
|
||||||
name = "DNA-Injector (Anti-Stutt.)"
|
name = "DNA-Injector (Anti-Stutt.)"
|
||||||
desc = "Fixes that speaking impairment."
|
desc = "Fixes that speaking impairment."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 9
|
//block = 9
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/antifire
|
|
||||||
name = "DNA-Injector (Anti-Fire)"
|
|
||||||
desc = "Cures fire."
|
|
||||||
dnatype = "se"
|
|
||||||
dna = "708"
|
|
||||||
//block = 10
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
block = FIREBLOCK
|
block = NERVOUSBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/firemut
|
|
||||||
name = "DNA-Injector (Fire)"
|
|
||||||
desc = "Gives you fire."
|
|
||||||
dnatype = "se"
|
|
||||||
dna = "FED"
|
|
||||||
//block = 10
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
block = FIREBLOCK
|
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/blindmut
|
/obj/item/weapon/dnainjector/blindmut
|
||||||
name = "DNA-Injector (Blind)"
|
name = "DNA-Injector (Blind)"
|
||||||
desc = "Makes you not see anything."
|
desc = "Makes you not see anything."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
//block = 11
|
//block = 11
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -300,37 +557,17 @@
|
|||||||
name = "DNA-Injector (Anti-Blind)"
|
name = "DNA-Injector (Anti-Blind)"
|
||||||
desc = "ITS A MIRACLE!!!"
|
desc = "ITS A MIRACLE!!!"
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
//block = 11
|
//block = 11
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
block = BLINDBLOCK
|
block = BLINDBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/antitele
|
|
||||||
name = "DNA-Injector (Anti-Tele.)"
|
|
||||||
desc = "Will make you not able to control your mind."
|
|
||||||
dnatype = "se"
|
|
||||||
dna = "708"
|
|
||||||
//block = 12
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
block = TELEBLOCK
|
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/telemut
|
|
||||||
name = "DNA-Injector (Tele.)"
|
|
||||||
desc = "Super brain man!"
|
|
||||||
dnatype = "se"
|
|
||||||
dna = "FED"
|
|
||||||
//block = 12
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
block = TELEBLOCK
|
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/deafmut
|
/obj/item/weapon/dnainjector/deafmut
|
||||||
name = "DNA-Injector (Deaf)"
|
name = "DNA-Injector (Deaf)"
|
||||||
desc = "Sorry, what did you say?"
|
desc = "Sorry, what did you say?"
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
//block = 13
|
//block = 13
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -340,22 +577,48 @@
|
|||||||
name = "DNA-Injector (Anti-Deaf)"
|
name = "DNA-Injector (Anti-Deaf)"
|
||||||
desc = "Will make you hear once more."
|
desc = "Will make you hear once more."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
//block = 13
|
//block = 13
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
block = DEAFBLOCK
|
block = DEAFBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/hallucination
|
||||||
|
name = "DNA-Injector (Halluctination)"
|
||||||
|
desc = "What you see isn't always what you get."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(4090)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = HALLUCINATIONBLOCK
|
||||||
|
|
||||||
|
/obj/item/weapon/dnainjector/antihallucination
|
||||||
|
name = "DNA-Injector (Anti-Hallucination)"
|
||||||
|
desc = "What you see is what you get."
|
||||||
|
dnatype = "se"
|
||||||
|
dna = list(1)
|
||||||
|
//block = 2
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = HALLUCINATIONBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/h2m
|
/obj/item/weapon/dnainjector/h2m
|
||||||
name = "DNA-Injector (Human > Monkey)"
|
name = "DNA-Injector (Human > Monkey)"
|
||||||
desc = "Will make you a flea bag."
|
desc = "Will make you a flea bag."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "FA0"
|
dna = list(4090)
|
||||||
block = 14
|
//block = 14
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = MONKEYBLOCK
|
||||||
|
|
||||||
/obj/item/weapon/dnainjector/m2h
|
/obj/item/weapon/dnainjector/m2h
|
||||||
name = "DNA-Injector (Monkey > Human)"
|
name = "DNA-Injector (Monkey > Human)"
|
||||||
desc = "Will make you...less hairy."
|
desc = "Will make you...less hairy."
|
||||||
dnatype = "se"
|
dnatype = "se"
|
||||||
dna = "708"
|
dna = list(1)
|
||||||
block = 14
|
//block = 14
|
||||||
|
New()
|
||||||
|
..()
|
||||||
|
block = MONKEYBLOCK
|
||||||
|
|||||||
@@ -447,9 +447,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
|||||||
if(record_found)//Pull up their name from database records if they did have a mind.
|
if(record_found)//Pull up their name from database records if they did have a mind.
|
||||||
new_character.dna = new()//Let's first give them a new DNA.
|
new_character.dna = new()//Let's first give them a new DNA.
|
||||||
new_character.dna.unique_enzymes = record_found.fields["b_dna"]//Enzymes are based on real name but we'll use the record for conformity.
|
new_character.dna.unique_enzymes = record_found.fields["b_dna"]//Enzymes are based on real name but we'll use the record for conformity.
|
||||||
new_character.dna.struc_enzymes = record_found.fields["enzymes"]//This is the default of enzymes so I think it's safe to go with.
|
new_character.dna.SE = record_found.fields["enzymes"]//This is the default of enzymes so I think it's safe to go with.
|
||||||
new_character.dna.uni_identity = record_found.fields["identity"]//DNA identity is carried over.
|
new_character.dna.UpdateSE()
|
||||||
updateappearance(new_character,new_character.dna.uni_identity)//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch.
|
new_character.UpdateAppearance(record_found.fields["identity"])//Now we configure their appearance based on their unique identity, same as with a DNA machine or somesuch.
|
||||||
else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
|
else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
|
||||||
new_character.dna.ready_dna(new_character)
|
new_character.dna.ready_dna(new_character)
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
continue
|
continue
|
||||||
var/datum/disease/dnaspread/D = new
|
var/datum/disease/dnaspread/D = new
|
||||||
D.strain_data["name"] = H.real_name
|
D.strain_data["name"] = H.real_name
|
||||||
D.strain_data["UI"] = H.dna.uni_identity
|
D.strain_data["UI"] = H.dna.UI
|
||||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
D.strain_data["SE"] = H.dna.SE
|
||||||
D.carrier = 1
|
D.carrier = 1
|
||||||
D.holder = H
|
D.holder = H
|
||||||
D.affected_mob = H
|
D.affected_mob = H
|
||||||
|
|||||||
@@ -47,8 +47,10 @@
|
|||||||
gender = pick(MALE, FEMALE)
|
gender = pick(MALE, FEMALE)
|
||||||
dna = new /datum/dna( null )
|
dna = new /datum/dna( null )
|
||||||
dna.real_name = real_name
|
dna.real_name = real_name
|
||||||
dna.uni_identity = "00600200A00E0110148FC01300B009"
|
dna.ResetSE()
|
||||||
dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
dna.ResetUI()
|
||||||
|
//dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||||
|
//dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||||
dna.unique_enzymes = md5(name)
|
dna.unique_enzymes = md5(name)
|
||||||
//////////blah
|
//////////blah
|
||||||
var/gendervar
|
var/gendervar
|
||||||
|
|||||||
@@ -391,9 +391,13 @@
|
|||||||
new_character.dna.b_type = client.prefs.b_type
|
new_character.dna.b_type = client.prefs.b_type
|
||||||
|
|
||||||
if(client.prefs.disabilities)
|
if(client.prefs.disabilities)
|
||||||
new_character.dna.struc_enzymes = setblock(new_character.dna.struc_enzymes,GLASSESBLOCK,toggledblock(getblock(new_character.dna.struc_enzymes,GLASSESBLOCK,3)),3)
|
// Set defer to 1 if you add more crap here so it only recalculates struc_enzymes once. - N3X
|
||||||
|
new_character.dna.SetSEState(GLASSESBLOCK,1,0)
|
||||||
new_character.disabilities |= NEARSIGHTED
|
new_character.disabilities |= NEARSIGHTED
|
||||||
|
|
||||||
|
// And uncomment this, too.
|
||||||
|
//new_character.dna.UpdateSE()
|
||||||
|
|
||||||
new_character.key = key //Manually transfer the key to log them in
|
new_character.key = key //Manually transfer the key to log them in
|
||||||
|
|
||||||
return new_character
|
return new_character
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
Enjoy! - Doohl
|
Enjoy! - Doohl
|
||||||
|
|
||||||
|
|
||||||
Notice: This all gets automatically compiled in a list in dna.dm, so you do not
|
Notice: This all gets automatically compiled in a list in dna2.dm, so you do not
|
||||||
have to define any UI values for sprite accessories manually for hair and facial
|
have to define any UI values for sprite accessories manually for hair and facial
|
||||||
hair. Just add in new hair types and the game will naturally adapt.
|
hair. Just add in new hair types and the game will naturally adapt.
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,10 @@
|
|||||||
O = new species.primitive(loc)
|
O = new species.primitive(loc)
|
||||||
|
|
||||||
O.dna = dna
|
O.dna = dna
|
||||||
O.dna.uni_identity = "000000000000000000DC00000660004DA0A0E00"
|
//O.dna.uni_identity = "000000000000000000DC00000660004DA0A0E00"
|
||||||
O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8"
|
//O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8"
|
||||||
|
O.dna.SetSEState(MONKEYBLOCK,1)
|
||||||
|
O.loc = loc
|
||||||
O.viruses = viruses
|
O.viruses = viruses
|
||||||
O.a_intent = "hurt"
|
O.a_intent = "hurt"
|
||||||
|
|
||||||
|
|||||||
@@ -1480,7 +1480,7 @@ datum
|
|||||||
if(prob(98)) randmutb(M)
|
if(prob(98)) randmutb(M)
|
||||||
else randmutg(M)
|
else randmutg(M)
|
||||||
domutcheck(M, null)
|
domutcheck(M, null)
|
||||||
updateappearance(M,M.dna.uni_identity)
|
M.UpdateAppearance()
|
||||||
return
|
return
|
||||||
on_mob_life(var/mob/living/carbon/M)
|
on_mob_life(var/mob/living/carbon/M)
|
||||||
if(!istype(M)) return
|
if(!istype(M)) return
|
||||||
|
|||||||
@@ -209,8 +209,7 @@
|
|||||||
stage = 3
|
stage = 3
|
||||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||||
mob.dna.check_integrity()
|
mob.dna.check_integrity()
|
||||||
var/newdna = setblock(mob.dna.struc_enzymes,REMOTETALKBLOCK,toggledblock(getblock(mob.dna.struc_enzymes,REMOTETALKBLOCK,3)),3)
|
mob.dna.SetSEState(REMOTETALKBLOCK,1)
|
||||||
mob.dna.struc_enzymes = newdna
|
|
||||||
domutcheck(mob, null)
|
domutcheck(mob, null)
|
||||||
|
|
||||||
/datum/disease2/effect/mind
|
/datum/disease2/effect/mind
|
||||||
|
|||||||
Reference in New Issue
Block a user