mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Fixes for admin-spawned dnainjectors: repeat_string has been simplified (it wasn't making NULLED_SE and NULLED_UI to the correct size).
Fix for Overpowered mutations (HULK and TELE) not manifesting. A typo was the cause. Admin-spawnable injectors always succeed. This code already existed (I believe this is how they used to function), but it did not work as the argument was not passed correctly. This also removed snowflake code for the darkbundle telemut injector. Thanks to Giacom, wouldn't have found these without him.
This commit is contained in:
@@ -340,15 +340,10 @@ var/list/binary = list("0","1")
|
||||
for(var/i=1, i<=length, i++)
|
||||
. += pick(characters)
|
||||
|
||||
/proc/repeat_string(length, string="")
|
||||
var/len = length(string)
|
||||
if(!len) return string
|
||||
while(len<length)
|
||||
string += string
|
||||
len *= 2
|
||||
if(len == length)
|
||||
return string
|
||||
return copytext(string, 1, length+1)
|
||||
/proc/repeat_string(times, string="")
|
||||
. = ""
|
||||
for(var/i=1, i<=times, i++)
|
||||
. += string
|
||||
|
||||
/proc/random_short_color()
|
||||
return random_string(3, hex_characters)
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@
|
||||
. += md5(character.real_name)
|
||||
reg_dna[.] = real_name
|
||||
else
|
||||
. += repeat_string(DNA_UNIQUE_ENZYMES_LEN, "000")
|
||||
. += repeat_string(DNA_UNIQUE_ENZYMES_LEN, "0")
|
||||
return .
|
||||
|
||||
/proc/hardset_dna(mob/living/carbon/owner, ui, se, real_name, mutantrace, blood_type)
|
||||
@@ -238,7 +238,7 @@
|
||||
for(var/i in good_se_blocks) //good mutations
|
||||
blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), GOOD_MUTATION_DIFFICULTY) == GOOD_MUTATION_DIFFICULTY)
|
||||
for(var/i in op_se_blocks) //Overpowered mutations...extra difficult to obtain
|
||||
blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), OP_MUTATION_DIFFICULTY) == GOOD_MUTATION_DIFFICULTY)
|
||||
blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), OP_MUTATION_DIFFICULTY) == OP_MUTATION_DIFFICULTY)
|
||||
|
||||
if(blocks[NEARSIGHTEDBLOCK])
|
||||
M.disabilities |= NEARSIGHTED
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
good_se_blocks = list(FIREBLOCK,XRAYBLOCK)
|
||||
op_se_blocks = list(HULKBLOCK,TELEBLOCK)
|
||||
|
||||
NULLED_SE = repeat_string(DNA_STRUC_ENZYMES_BLOCKS, "___")
|
||||
NULLED_UI = repeat_string(DNA_UNI_IDENTITY_BLOCKS, "___")
|
||||
NULLED_SE = repeat_string(DNA_STRUC_ENZYMES_BLOCKS, repeat_string(DNA_BLOCK_SIZE, "_"))
|
||||
NULLED_UI = repeat_string(DNA_UNI_IDENTITY_BLOCKS, repeat_string(DNA_BLOCK_SIZE, "_"))
|
||||
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
||||
|
||||
/*
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(ishuman(M) && (deconstruct_block(getblock(M.dna.struc_enzymes, RACEBLOCK), BAD_MUTATION_DIFFICULTY) == BAD_MUTATION_DIFFICULTY)) //check for monkeying people.
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the [name] \red(MONKEY)")
|
||||
log_msg += " (MONKEY)"
|
||||
domutcheck(M, null)
|
||||
domutcheck(M, null,(type != /obj/item/weapon/dnainjector)) //admin-spawnable-injectors always work
|
||||
log_attack(log_msg)
|
||||
else
|
||||
user << "<span class='notice'>It appears that [M] does not have compatible DNA.</span>"
|
||||
@@ -227,9 +227,6 @@
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
desc = "Good. Let the hate flow through you."
|
||||
/obj/item/weapon/dnainjector/telemut/darkbundle/attack(mob/M, mob/user)
|
||||
..()
|
||||
domutcheck(M,null) //guarantees that it works instead of getting a dud injector.
|
||||
|
||||
/obj/item/weapon/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
|
||||
Reference in New Issue
Block a user