mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
More DNA fixes.
This commit is contained in:
@@ -41,317 +41,3 @@
|
||||
if(M)
|
||||
M.active_genes -= gene.type
|
||||
M.update_icon = 1
|
||||
|
||||
/* Old, inflexibile
|
||||
/proc/domutcheck(var/mob/living/M, var/connected, var/flags)
|
||||
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(M_FAT in old_mutations)
|
||||
M.mutations.Add(M_FAT)
|
||||
if(M_HUSK in old_mutations)
|
||||
M.mutations.Add(M_HUSK)
|
||||
|
||||
var/inj = (flags & MUTCHK_FROM_INJECTOR) == MUTCHK_FROM_INJECTOR
|
||||
var/forced = (flags & MUTCHK_FORCED) == MUTCHK_FORCED
|
||||
|
||||
if(M.dna.GetSEState(NOBREATHBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_NO_BREATH in old_mutations))
|
||||
M << "\blue You feel no need to breathe."
|
||||
M.mutations.Add(M_NO_BREATH)
|
||||
if(M.dna.GetSEState(REMOTEVIEWBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_REMOTE_VIEW in old_mutations))
|
||||
M << "\blue Your mind expands"
|
||||
M.mutations.Add(M_REMOTE_VIEW)
|
||||
M.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
if(M.dna.GetSEState(REGENERATEBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_REGEN in old_mutations))
|
||||
M << "\blue You feel better"
|
||||
M.mutations.Add(M_REGEN)
|
||||
if(M.dna.GetSEState(INCREASERUNBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_RUN in old_mutations))
|
||||
M << "\blue Your leg muscles pulsate."
|
||||
M.mutations.Add(M_RUN)
|
||||
if(M.dna.GetSEState(REMOTETALKBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_REMOTE_TALK in old_mutations))
|
||||
M << "\blue You expand your mind outwards"
|
||||
M.mutations.Add(M_REMOTE_TALK)
|
||||
M.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
if(M.dna.GetSEState(MORPHBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_MORPH in old_mutations))
|
||||
M.mutations.Add(M_MORPH)
|
||||
M << "\blue Your skin feels strange"
|
||||
M.verbs += /mob/living/carbon/human/proc/morph
|
||||
if(M.dna.GetSEState(COLDBLOCK))
|
||||
if(!(M_RESIST_COLD in old_mutations))
|
||||
if(forced || probinj(15,inj) || (M_RESIST_HEAT in old_mutations))
|
||||
M.mutations.Add(M_RESIST_HEAT)
|
||||
M << "\blue Your skin is icy to the touch"
|
||||
else
|
||||
if(forced || probinj(5,inj) || (M_RESIST_HEAT in old_mutations))
|
||||
M.mutations.Add(M_RESIST_HEAT)
|
||||
M << "\blue Your skin is icy to the touch"
|
||||
if(M.dna.GetSEState(HALLUCINATIONBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_HALLUCINATE in old_mutations))
|
||||
M.mutations.Add(M_HALLUCINATE)
|
||||
M << "\red Your mind says 'Hello'"
|
||||
if(M.dna.GetSEState(NOPRINTSBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_FINGERPRINTS in old_mutations))
|
||||
M.mutations.Add(M_FINGERPRINTS)
|
||||
M << "\blue Your fingers feel numb"
|
||||
if(M.dna.GetSEState(SHOCKIMMUNITYBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_NO_SHOCK in old_mutations))
|
||||
M.mutations.Add(M_NO_SHOCK)
|
||||
M << "\blue Your skin feels strange"
|
||||
if(M.dna.GetSEState(SMALLSIZEBLOCK))
|
||||
if(forced || probinj(45,inj) || (M_DWARF in old_mutations))
|
||||
M << "\blue Your skin feels rubbery"
|
||||
M.mutations.Add(M_DWARF)
|
||||
M.pass_flags |= 1
|
||||
|
||||
|
||||
|
||||
if (M.dna.GetSEState(HULKBLOCK))
|
||||
if(forced || probinj(5,inj) || (M_HULK in old_mutations))
|
||||
M << "\blue Your muscles hurt."
|
||||
M.mutations.Add(M_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(M_CLUMSY)
|
||||
if (M.dna.GetSEState(TWITCHBLOCK))
|
||||
M.disabilities |= TOURETTES
|
||||
M << "\red You twitch."
|
||||
if (M.dna.GetSEState(XRAYBLOCK))
|
||||
if(forced || probinj(30,inj) || (M_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(M_XRAY)
|
||||
if (M.dna.GetSEState(NERVOUSBLOCK))
|
||||
M.disabilities |= NERVOUS
|
||||
M << "\red You feel nervous."
|
||||
if (M.dna.GetSEState(FIREBLOCK))
|
||||
if(!(M_RESIST_HEAT in old_mutations))
|
||||
if(forced || probinj(30,inj) || (M_RESIST_COLD in old_mutations))
|
||||
M << "\blue Your body feels warm."
|
||||
M.mutations.Add(M_RESIST_COLD)
|
||||
else
|
||||
if(forced || probinj(5,inj) || (M_RESIST_COLD in old_mutations))
|
||||
M << "\blue Your body feels warm."
|
||||
M.mutations.Add(M_RESIST_COLD)
|
||||
if (M.dna.GetSEState(BLINDBLOCK))
|
||||
M.sdisabilities |= BLIND
|
||||
M << "\red You can't seem to see anything."
|
||||
if (M.dna.GetSEState(TELEBLOCK))
|
||||
if(forced || probinj(15,inj) || (M_TK in old_mutations))
|
||||
M << "\blue You feel smarter."
|
||||
M.mutations.Add(M_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.Clone()
|
||||
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.Clone()
|
||||
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
|
||||
*/
|
||||
@@ -120,12 +120,12 @@ var/global/floorIsLava = 0
|
||||
else
|
||||
body += "<A href='?src=\ref[src];makeanimal=\ref[M]'>Animalize</A> | "
|
||||
|
||||
// MUTATIONS
|
||||
// DNA2 - Admin Hax
|
||||
if(iscarbon(M))
|
||||
body += "<br><br>"
|
||||
body += "<b>DNA Blocks:</b><br><table border='0'><tr><th> </th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th>"
|
||||
var/bname
|
||||
for(var/block=1;block<DNA_SE_LENGTH;block++)
|
||||
for(var/block=1;block<=DNA_SE_LENGTH;block++)
|
||||
if(((block-1)%5)==0)
|
||||
body += "</tr><tr><th>[block-1]</th>"
|
||||
bname = assigned_blocks[block]
|
||||
@@ -873,7 +873,11 @@ var/global/floorIsLava = 0
|
||||
if(!chosen)
|
||||
return
|
||||
|
||||
new chosen(usr.loc)
|
||||
if(ispath(chosen,/turf))
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
T.ChangeTurf(chosen)
|
||||
else
|
||||
new chosen(usr.loc)
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -273,7 +273,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
log_admin("[key_name(src)] has made [M.key] a changeling.")
|
||||
spawn(10)
|
||||
M.absorbed_dna[M.real_name] = M.dna
|
||||
M.absorbed_dna[M.real_name] = M.dna.Clone()
|
||||
M.make_changeling()
|
||||
if(M.mind)
|
||||
M.mind.special_role = "Changeling"
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.UI
|
||||
D.strain_data["SE"] = H.dna.SE
|
||||
D.strain_data["UI"] = H.dna.UI.Copy()
|
||||
D.strain_data["SE"] = H.dna.SE.Copy()
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
|
||||
Reference in New Issue
Block a user