mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
New DNA mutation system: see http://tgstation13.pretentiousfool.com/phpBB3/viewtopic.php?f=7&t=5584 (the code that makes this actually work has been commented out, it will be implemented maybe sometime soon)
Fixed some spelling and grammar errors. Tweaked the cost of Large Energy Crossbow designs. Fixed a bug where people would generate two manifest entries when they late-joined. Annoying as fuck. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1966 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -542,7 +542,7 @@
|
|||||||
throw_range = 10
|
throw_range = 10
|
||||||
|
|
||||||
/obj/item/weapon/chemsprayer
|
/obj/item/weapon/chemsprayer
|
||||||
desc = "Chem Sprayer"
|
desc = "A utility used to spray large amounts of reagent in a given area."
|
||||||
icon = 'gun.dmi'
|
icon = 'gun.dmi'
|
||||||
name = "chem sprayer"
|
name = "chem sprayer"
|
||||||
icon_state = "chemsprayer"
|
icon_state = "chemsprayer"
|
||||||
|
|||||||
@@ -364,6 +364,75 @@
|
|||||||
W.afterattack(src, usr, (t5 ? 1 : 0))
|
W.afterattack(src, usr, (t5 ? 1 : 0))
|
||||||
else
|
else
|
||||||
if (istype(usr, /mob/living/carbon/human))
|
if (istype(usr, /mob/living/carbon/human))
|
||||||
|
if (usr:a_intent == "help")
|
||||||
|
if(istype(src, /mob/living/carbon))
|
||||||
|
var/mob/living/carbon/C = src
|
||||||
|
if(usr:mutations & HEAL)
|
||||||
|
|
||||||
|
if(C.stat != 2)
|
||||||
|
var/t_him = "it"
|
||||||
|
if (src.gender == MALE)
|
||||||
|
t_him = "him"
|
||||||
|
else if (src.gender == FEMALE)
|
||||||
|
t_him = "her"
|
||||||
|
var/u_him = "it"
|
||||||
|
if (usr.gender == MALE)
|
||||||
|
t_him = "him"
|
||||||
|
else if (usr.gender == FEMALE)
|
||||||
|
t_him = "her"
|
||||||
|
|
||||||
|
if(src != usr)
|
||||||
|
usr.visible_message( \
|
||||||
|
"\blue <i>[usr] places [u_him] palms on [src], healing [t_him]!</i>", \
|
||||||
|
"\blue You place your palms on [src] and heal [t_him].", \
|
||||||
|
)
|
||||||
|
else
|
||||||
|
usr.visible_message( \
|
||||||
|
"\blue <i>[usr] places [u_him] palms on [u_him]self and heals.</i>", \
|
||||||
|
"\blue You place your palms on yourself and heal.", \
|
||||||
|
)
|
||||||
|
|
||||||
|
C.oxyloss = max(0, C.oxyloss-25)
|
||||||
|
C.toxloss = max(0, C.toxloss-25)
|
||||||
|
|
||||||
|
if (istype(C, /mob/living/carbon/human))
|
||||||
|
var/mob/living/carbon/human/H = C
|
||||||
|
var/datum/organ/external/affecting = H.organs["chest"]
|
||||||
|
|
||||||
|
var/t = usr:zone_sel:selecting
|
||||||
|
|
||||||
|
if (t in list("eyes", "mouth"))
|
||||||
|
t = "head"
|
||||||
|
|
||||||
|
if (H.organs[t])
|
||||||
|
affecting = H.organs[t]
|
||||||
|
|
||||||
|
if (affecting.heal_damage(25, 25))
|
||||||
|
H.UpdateDamageIcon()
|
||||||
|
else
|
||||||
|
H.UpdateDamage()
|
||||||
|
C.updatehealth()
|
||||||
|
else
|
||||||
|
C.heal_organ_damage(25, 25)
|
||||||
|
|
||||||
|
C.cloneloss = max(0, C.cloneloss-25)
|
||||||
|
|
||||||
|
C.stunned = max(0, C.stunned-5)
|
||||||
|
C.paralysis = max(0, C.paralysis-5)
|
||||||
|
C.stuttering = max(0, C.stuttering-5)
|
||||||
|
C.drowsyness = max(0, C.drowsyness-5)
|
||||||
|
C.weakened = max(0, C.weakened-5)
|
||||||
|
|
||||||
|
if(C.client)
|
||||||
|
C.updatehealth()
|
||||||
|
C:handle_regular_hud_updates()
|
||||||
|
usr:nutrition -= rand(1,10)
|
||||||
|
usr:handle_regular_hud_updates()
|
||||||
|
usr.next_move = world.time + 6
|
||||||
|
else
|
||||||
|
usr << "\red [src] is dead and can't be healed."
|
||||||
|
return
|
||||||
|
|
||||||
src.attack_hand(usr, usr.hand)
|
src.attack_hand(usr, usr.hand)
|
||||||
else
|
else
|
||||||
if (istype(usr, /mob/living/carbon/monkey))
|
if (istype(usr, /mob/living/carbon/monkey))
|
||||||
@@ -422,6 +491,34 @@
|
|||||||
else
|
else
|
||||||
if (istype(usr, /mob/living/carbon/alien/humanoid))
|
if (istype(usr, /mob/living/carbon/alien/humanoid))
|
||||||
src.hand_al(usr, usr.hand)
|
src.hand_al(usr, usr.hand)
|
||||||
|
else
|
||||||
|
if(usr:mutations & LASER && usr:a_intent == "hurt" && world.time >= usr.next_move)
|
||||||
|
var/turf/oloc
|
||||||
|
var/turf/T = get_turf(usr)
|
||||||
|
var/turf/U = get_turf(src)
|
||||||
|
if(istype(src, /turf)) oloc = src
|
||||||
|
else
|
||||||
|
oloc = loc
|
||||||
|
|
||||||
|
if(istype(usr, /mob/living/carbon/human))
|
||||||
|
usr:nutrition -= rand(1,5)
|
||||||
|
usr:handle_regular_hud_updates()
|
||||||
|
|
||||||
|
var/obj/item/projectile/beam/A = new /obj/item/projectile/beam( usr.loc )
|
||||||
|
A.icon = 'genetics.dmi'
|
||||||
|
A.icon_state = "eyelasers"
|
||||||
|
playsound(usr.loc, 'taser2.ogg', 75, 1)
|
||||||
|
|
||||||
|
A.firer = usr
|
||||||
|
A.def_zone = usr:get_organ_target()
|
||||||
|
A.original = oloc
|
||||||
|
A.current = T
|
||||||
|
A.yo = U.y - T.y
|
||||||
|
A.xo = U.x - T.x
|
||||||
|
spawn( 1 )
|
||||||
|
A.process()
|
||||||
|
|
||||||
|
usr.next_move = world.time + 6
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,13 @@
|
|||||||
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
result = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
/proc/getblockbuffer(input,blocknumber,blocksize)
|
||||||
|
var/result[3]
|
||||||
|
var/block = copytext(input ,(blocksize*blocknumber)-(blocksize-1),(blocksize*blocknumber)+1)
|
||||||
|
for(var/i = 1, i <= 3, i++)
|
||||||
|
result[i] = copytext(block, i, i+1)
|
||||||
|
return result
|
||||||
|
|
||||||
/proc/setblock(istring, blocknumber, replacement, blocksize)
|
/proc/setblock(istring, blocknumber, replacement, blocksize)
|
||||||
var/result
|
var/result
|
||||||
result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
result = getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||||
@@ -344,6 +351,12 @@
|
|||||||
M.ear_deaf = 1
|
M.ear_deaf = 1
|
||||||
M << "\red You can't seem to hear anything..."
|
M << "\red You can't seem to hear anything..."
|
||||||
|
|
||||||
|
/* 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
|
//////////////////////////////////////////////////////////// Monkey Block
|
||||||
if (isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && istype(M, /mob/living/carbon/human))
|
if (isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && istype(M, /mob/living/carbon/human))
|
||||||
// human > monkey
|
// human > monkey
|
||||||
|
|||||||
101
code/game/dna_mutations.dm
Normal file
101
code/game/dna_mutations.dm
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
|
||||||
|
|
||||||
|
/* NOTES:
|
||||||
|
|
||||||
|
This system could be expanded to migrate all of our current mutations to. Maybe.
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* /datum/mutations :
|
||||||
|
*
|
||||||
|
* A /datum representation of "hidden" mutations.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/datum/mutations
|
||||||
|
|
||||||
|
var/list/requirements = list() // list of randomly-genned requirements
|
||||||
|
var/required = 1 // the number of requirements to generate
|
||||||
|
|
||||||
|
var/list/races = list("human") // list of races the mutation effects
|
||||||
|
|
||||||
|
proc/get_mutation(var/mob/living/carbon/M) // Called when check_mutation() is successful
|
||||||
|
..()
|
||||||
|
|
||||||
|
proc/check_mutation(var/mob/living/carbon/M) // Called in dna.dm, when a target's SE is modified
|
||||||
|
|
||||||
|
if(! ("all" in races)) // "all" means it affects everyone!
|
||||||
|
if(istype(M, /mob/living/carbon/human))
|
||||||
|
if(! ("human" in races))
|
||||||
|
return
|
||||||
|
if(istype(M, /mob/living/carbon/monkey))
|
||||||
|
if(! ("monkey" in races))
|
||||||
|
return
|
||||||
|
// TODO: add more races maybe??
|
||||||
|
|
||||||
|
|
||||||
|
var/passes = 0
|
||||||
|
for(var/datum/mutationreq/require in requirements)
|
||||||
|
|
||||||
|
var/se_block[] = getblockbuffer(M.dna.struc_enzymes, require.block, 3) // focus onto the block
|
||||||
|
if(se_block.len == 3) // we want to make sure there are exactly 3 entries
|
||||||
|
|
||||||
|
if(se_block[require.subblock] == require.reqID)
|
||||||
|
|
||||||
|
passes++
|
||||||
|
|
||||||
|
if(passes == required) // all requirements met
|
||||||
|
get_mutation(M)
|
||||||
|
|
||||||
|
|
||||||
|
Lasereyes
|
||||||
|
/*
|
||||||
|
Lets you shoot laser beams through your eyes. Fancy!
|
||||||
|
*/
|
||||||
|
required = 2
|
||||||
|
|
||||||
|
get_mutation(var/mob/living/carbon/M)
|
||||||
|
M << "\blue You feel a searing heat inside your eyes!"
|
||||||
|
M.mutations |= LASER
|
||||||
|
|
||||||
|
Healing
|
||||||
|
/*
|
||||||
|
Lets you heal other people, and yourself. But it doesn't let you heal dead people.
|
||||||
|
*/
|
||||||
|
required = 2
|
||||||
|
|
||||||
|
get_mutation(var/mob/living/carbon/M)
|
||||||
|
M << "\blue You a pleasant warmth pulse throughout your body..."
|
||||||
|
M.mutations |= HEAL
|
||||||
|
|
||||||
|
/* /datum/mutationreq :
|
||||||
|
*
|
||||||
|
* A /datum representation of a requirement in order for a mutation to happen.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/datum/mutationreq
|
||||||
|
var/block // The block to read
|
||||||
|
var/subblock // The sub-block to read
|
||||||
|
var/reqID // The required hexadecimal identifier to be equal to the sub-block being read.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
HEY: If you want to be able to get superpowers easily just uncomment this shit.
|
||||||
|
mob/verb/checkmuts()
|
||||||
|
for(var/datum/mutations/mut in global_mutations)
|
||||||
|
|
||||||
|
for(var/datum/mutationreq/R in mut.requirements)
|
||||||
|
src << "Block: [R.block]"
|
||||||
|
src << "Sub-Block: [R.subblock]"
|
||||||
|
src << "Required ID: [R.reqID]"
|
||||||
|
src << ""
|
||||||
|
|
||||||
|
mob/verb/editSE(t as text)
|
||||||
|
src:dna:struc_enzymes = t
|
||||||
|
domutcheck(src)
|
||||||
|
|
||||||
|
*/
|
||||||
@@ -42,6 +42,31 @@
|
|||||||
avnums.Remove(tempnum)
|
avnums.Remove(tempnum)
|
||||||
BLINDBLOCK = tempnum
|
BLINDBLOCK = tempnum
|
||||||
|
|
||||||
|
|
||||||
|
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
||||||
|
|
||||||
|
for(var/x in typesof(/datum/mutations) - /datum/mutations)
|
||||||
|
var/datum/mutations/mut = new x
|
||||||
|
|
||||||
|
for(var/i = 1, i <= mut.required, i++)
|
||||||
|
var/datum/mutationreq/require = new/datum/mutationreq
|
||||||
|
require.block = rand(1, 13)
|
||||||
|
require.subblock = rand(1, 3)
|
||||||
|
|
||||||
|
// Create random requirement identification
|
||||||
|
require.reqID = pick("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", \
|
||||||
|
"B", "C", "D", "E", "F")
|
||||||
|
|
||||||
|
mut.requirements += require
|
||||||
|
|
||||||
|
|
||||||
|
global_mutations += mut// add to global mutations list!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* This was used for something before, I think, but is not worth the effort to process now.
|
/* This was used for something before, I think, but is not worth the effort to process now.
|
||||||
/proc/setupcorpses()
|
/proc/setupcorpses()
|
||||||
for (var/obj/landmark/A in world)
|
for (var/obj/landmark/A in world)
|
||||||
@@ -140,4 +165,3 @@
|
|||||||
del(A)
|
del(A)
|
||||||
continue
|
continue
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||||
if(beaker)
|
if(beaker)
|
||||||
user << "\red Biogenerator already occuped."
|
user << "\red The biogenerator already occuped."
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.before_take_item(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
@@ -43,13 +43,13 @@
|
|||||||
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
else if(!istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown))
|
||||||
user << "\red You cannot put this in [src.name]"
|
user << "\red You cannot put this in [src.name]"
|
||||||
else if(processing)
|
else if(processing)
|
||||||
user << "\red Biogenerator is processing."
|
user << "\red The biogenerator is currently processing."
|
||||||
else
|
else
|
||||||
var/i = 0
|
var/i = 0
|
||||||
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
|
||||||
i++
|
i++
|
||||||
if(i >= 10)
|
if(i >= 10)
|
||||||
user << "\red Biogenerator is fulled! Activate it."
|
user << "\red The biogenerator is full! Activate it."
|
||||||
else
|
else
|
||||||
user.before_take_item(O)
|
user.before_take_item(O)
|
||||||
O.loc = src
|
O.loc = src
|
||||||
|
|||||||
@@ -2299,6 +2299,7 @@ var/showadminmessages = 1
|
|||||||
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1)
|
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/admins/proc/view_txt_log()
|
/obj/admins/proc/view_txt_log()
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set desc="Shows todays server log in new window"
|
set desc="Shows todays server log in new window"
|
||||||
|
|||||||
@@ -543,9 +543,6 @@ datum
|
|||||||
new /obj/item/weapon/syntiflesh(location)
|
new /obj/item/weapon/syntiflesh(location)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
metroidenzyme
|
metroidenzyme
|
||||||
name = "Metroid Enzyme"
|
name = "Metroid Enzyme"
|
||||||
id = "m_enzyme"
|
id = "m_enzyme"
|
||||||
@@ -602,8 +599,6 @@ datum
|
|||||||
S.start()
|
S.start()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
metroidchloral
|
metroidchloral
|
||||||
name = "Metroid Chloral"
|
name = "Metroid Chloral"
|
||||||
id = "m_bunch"
|
id = "m_bunch"
|
||||||
|
|||||||
@@ -1015,6 +1015,9 @@
|
|||||||
if (mutations & PORTALS)
|
if (mutations & PORTALS)
|
||||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
|
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
|
||||||
|
|
||||||
|
if (mutations & LASER)
|
||||||
|
overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]")
|
||||||
|
|
||||||
if (mutantrace)
|
if (mutantrace)
|
||||||
switch(mutantrace)
|
switch(mutantrace)
|
||||||
if("lizard","golem","metroid")
|
if("lizard","golem","metroid")
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
if(organStructure && organStructure.chest)
|
if(organStructure && organStructure.chest)
|
||||||
health = organStructure.chest.maxHealth - oxyloss - toxloss - fireloss - bruteloss
|
health = organStructure.chest.maxHealth - oxyloss - toxloss - fireloss - bruteloss
|
||||||
else
|
else
|
||||||
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
|
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss
|
||||||
else
|
else
|
||||||
src.health = 100
|
src.health = 100
|
||||||
src.stat = 0
|
src.stat = 0
|
||||||
|
|||||||
@@ -287,7 +287,6 @@ mob/new_player
|
|||||||
else//Adds late joiners to minds so they can be linked to objectives.
|
else//Adds late joiners to minds so they can be linked to objectives.
|
||||||
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc.
|
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc.
|
||||||
|
|
||||||
data_core.manifest_inject(character) // add all the necessary stuff into the manifest
|
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1071,7 +1071,7 @@ datum
|
|||||||
id = "largecrossbow"
|
id = "largecrossbow"
|
||||||
req_tech = list("combat" = 4, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3)
|
req_tech = list("combat" = 4, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3)
|
||||||
build_type = PROTOLATHE
|
build_type = PROTOLATHE
|
||||||
materials = list("$metal" = 5000, "$glass" = 1000)
|
materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 1000, "$silver" = 1000)
|
||||||
build_path = "/obj/item/weapon/gun/energy/largecrossbow"
|
build_path = "/obj/item/weapon/gun/energy/largecrossbow"
|
||||||
|
|
||||||
freeze_gun
|
freeze_gun
|
||||||
|
|||||||
@@ -146,6 +146,8 @@
|
|||||||
#define CLOWN 16
|
#define CLOWN 16
|
||||||
#define FAT 32
|
#define FAT 32
|
||||||
#define HUSK 64 //changeling-drained
|
#define HUSK 64 //changeling-drained
|
||||||
|
#define LASER 128
|
||||||
|
#define HEAL 256
|
||||||
|
|
||||||
// channel numbers for power
|
// channel numbers for power
|
||||||
|
|
||||||
@@ -191,3 +193,6 @@ var/const
|
|||||||
var/list/accessable_z_levels = list("1" = 10, "3" = 15, "4" = 60, "5" = 15) //This list contains the z-level numbers which can be accessed via space travel and the percentual chances to get there. (Exceptions: extended, sandbox and nuke) -Errorage
|
var/list/accessable_z_levels = list("1" = 10, "3" = 15, "4" = 60, "5" = 15) //This list contains the z-level numbers which can be accessed via space travel and the percentual chances to get there. (Exceptions: extended, sandbox and nuke) -Errorage
|
||||||
|
|
||||||
#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))
|
#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))
|
||||||
|
|
||||||
|
|
||||||
|
var/list/global_mutations = list() // list of hidden mutation things
|
||||||
|
|||||||
@@ -307,6 +307,7 @@
|
|||||||
#include "code\game\chemistry.dm"
|
#include "code\game\chemistry.dm"
|
||||||
#include "code\game\communications.dm"
|
#include "code\game\communications.dm"
|
||||||
#include "code\game\dna.dm"
|
#include "code\game\dna.dm"
|
||||||
|
#include "code\game\dna_mutations.dm"
|
||||||
#include "code\game\hud.dm"
|
#include "code\game\hud.dm"
|
||||||
#include "code\game\landmarks.dm"
|
#include "code\game\landmarks.dm"
|
||||||
#include "code\game\master_controller.dm"
|
#include "code\game\master_controller.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user