mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
HA HA NEW GENE HANDLING
Also fixed block injector crash. Conflicts: code/game/dna.dm code/modules/mob/living/carbon/monkey/monkey.dm html/changelog.html
This commit is contained in:
-1695
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
||||
|
||||
// Sanity checks, don't skip.
|
||||
if(!gene.can_activate(M,flags))
|
||||
testing("[M] - Failed to activate [gene.name] (can_activate fail).")
|
||||
continue
|
||||
|
||||
// Current state
|
||||
@@ -32,6 +33,8 @@
|
||||
gene.deactivate(M)
|
||||
M.active_genes -= gene.type
|
||||
M.update_icon=1
|
||||
else
|
||||
testing("[M] - Failed to activate [gene.name] - [gene_active?"+":"-"]active, [gene_prior_status?"+":"-"]prior")
|
||||
|
||||
/* Old, inflexibile
|
||||
/proc/domutcheck(var/mob/living/M, var/connected, var/flags)
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
block=MONKEYBLOCK
|
||||
|
||||
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
|
||||
return istype(M, /mob/living/carbon/human)
|
||||
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
|
||||
|
||||
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
|
||||
if(!istype(M,/mob/living/carbon/human))
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.monkeyizing = 1
|
||||
var/list/implants = list() //Try to preserve implants.
|
||||
@@ -83,6 +85,8 @@
|
||||
return
|
||||
|
||||
/datum/dna/gene/monkey/deactivate(var/mob/living/M, var/connected, var/flags)
|
||||
if(!istype(M,/mob/living/carbon/monkey))
|
||||
return
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
Mo.monkeyizing = 1
|
||||
var/list/implants = list() //Still preserving implants
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/GetState(var/selblock=0)
|
||||
var/real_block
|
||||
if(!selblock)
|
||||
if(selblock==0)
|
||||
real_block=block
|
||||
selblock=1
|
||||
else
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/SetState(var/on, var/selblock=0)
|
||||
var/real_block
|
||||
if(!selblock)
|
||||
if(selblock==0)
|
||||
real_block=block
|
||||
selblock=1
|
||||
else
|
||||
@@ -113,7 +113,16 @@
|
||||
inuse = 0
|
||||
M.requests += O
|
||||
if (dnatype == "se")
|
||||
if(!block)
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [english_list(dna)]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
testing("DNA injector with contents: [english_list(dna)]")
|
||||
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)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
@@ -121,13 +130,6 @@
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else // Isolated injector
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
@@ -145,12 +147,22 @@
|
||||
user << "\red Apparently it didn't work."
|
||||
return
|
||||
if (dnatype == "se")
|
||||
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)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
if(block)// Isolated injector
|
||||
testing("Isolated block [block] injector with contents: [english_list(dna)]")
|
||||
if (GetState() && block == MONKEYBLOCK && istype(M, /mob/living/carbon/human) )
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
||||
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
||||
else
|
||||
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
testing("DNA injector with contents: [english_list(dna)]")
|
||||
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)")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name] (MONKEY)")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
else
|
||||
// message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name]")
|
||||
log_game("[key_name(user)] injected [key_name(M)] with the [name]")
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
set invisibility = 0
|
||||
//set background = 1
|
||||
if (monkeyizing) return
|
||||
if (update_muts)
|
||||
update_muts=0
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment // Added to prevent null location errors-- TLE
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
var/greaterform = "Human" // Used when humanizing a monkey.
|
||||
var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
var/ico = "monkey" // Used when updating icons.
|
||||
//var/uni_append = "12C4E2" // Small appearance modifier for different species.
|
||||
var/list/uni_append = list(0x12C,0x4E2) // Same as above for DNA2.
|
||||
var/update_muts = 1 // Monkey gene must be set at start.
|
||||
|
||||
/mob/living/carbon/monkey/tajara
|
||||
name = "farwa"
|
||||
@@ -52,13 +55,20 @@
|
||||
//dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
//dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
dna.unique_enzymes = md5(name)
|
||||
//////////blah
|
||||
var/gendervar
|
||||
if (gender == MALE)
|
||||
gendervar = add_zero2(num2hex((rand(1,2049)),1), 3)
|
||||
else
|
||||
gendervar = add_zero2(num2hex((rand(2051,4094)),1), 3)
|
||||
dna.uni_identity += "[gendervar][uni_append]"
|
||||
|
||||
// We're a monkey
|
||||
dna.SetSEState(MONKEYBLOCK, 1)
|
||||
// Fix gender
|
||||
dna.SetUIState(DNA_UI_GENDER, gender != MALE, 1)
|
||||
|
||||
// Set the blocks to uni_append, if needed.
|
||||
if(uni_append.len>0)
|
||||
for(var/b=1;b<=uni_append.len;b++)
|
||||
dna.SetUIValue(DNA_UI_LENGTH-(uni_append.len-b),uni_append[b], 1)
|
||||
dna.UpdateUI()
|
||||
|
||||
update_muts=1
|
||||
|
||||
..()
|
||||
update_icons()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user