mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 18:42:19 +00:00
Merge pull request #450 from SkyMarshal/master
DNA update and choosable disabilities!
This commit is contained in:
@@ -220,7 +220,6 @@
|
||||
#include "code\ATMOSPHERICS\components\unary\heat_source.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\outlet_injector.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\oxygen_generator.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\thermal_plate.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
|
||||
@@ -637,6 +636,7 @@
|
||||
#include "code\game\objects\devices\chameleonproj.dm"
|
||||
#include "code\game\objects\devices\flash.dm"
|
||||
#include "code\game\objects\devices\flashlight.dm"
|
||||
#include "code\game\objects\devices\geneanalyzer.dm"
|
||||
#include "code\game\objects\devices\infra_sensor.dm"
|
||||
#include "code\game\objects\devices\multitool.dm"
|
||||
#include "code\game\objects\devices\paicard.dm"
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
#define RADIATION_CAPACITY 30000 //Radiation isn't particularly effective (TODO BALANCE)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate
|
||||
//Based off Heat Reservoir and Space Heater
|
||||
//Transfers heat between a pipe system and environment, based on which has a greater thermal energy concentration
|
||||
|
||||
icon = 'cold_sink.dmi'
|
||||
icon_state = "intact_off"
|
||||
|
||||
name = "Thermal Transfer Plate"
|
||||
desc = "Transfers heat to and from an area"
|
||||
|
||||
update_icon()
|
||||
if(node)
|
||||
icon_state = "intact_off"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
return
|
||||
|
||||
process()
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
//Get processable air sample and thermal info from environment
|
||||
|
||||
var/transfer_moles = 0.25 * environment.total_moles()
|
||||
var/datum/gas_mixture/external_removed = environment.remove(transfer_moles)
|
||||
|
||||
if (!external_removed)
|
||||
return radiate()
|
||||
|
||||
if (external_removed.total_moles() < 10)
|
||||
return radiate()
|
||||
|
||||
//Get same info from connected gas
|
||||
|
||||
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
|
||||
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
|
||||
|
||||
if (!internal_removed)
|
||||
environment.merge(external_removed)
|
||||
return 1
|
||||
|
||||
var/combined_heat_capacity = internal_removed.heat_capacity() + external_removed.heat_capacity()
|
||||
var/combined_energy = internal_removed.temperature * internal_removed.heat_capacity() + external_removed.heat_capacity() * external_removed.temperature
|
||||
|
||||
if(!combined_heat_capacity) combined_heat_capacity = 1
|
||||
var/final_temperature = combined_energy / combined_heat_capacity
|
||||
|
||||
external_removed.temperature = final_temperature
|
||||
environment.merge(external_removed)
|
||||
|
||||
internal_removed.temperature = final_temperature
|
||||
air_contents.merge(internal_removed)
|
||||
|
||||
network.update = 1
|
||||
|
||||
return 1
|
||||
|
||||
proc/radiate()
|
||||
|
||||
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
|
||||
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
|
||||
|
||||
if (!internal_removed)
|
||||
return 1
|
||||
|
||||
var/combined_heat_capacity = internal_removed.heat_capacity() + RADIATION_CAPACITY
|
||||
var/combined_energy = internal_removed.temperature * internal_removed.heat_capacity() + (RADIATION_CAPACITY * 6.4)
|
||||
|
||||
var/final_temperature = combined_energy / combined_heat_capacity
|
||||
|
||||
internal_removed.temperature = final_temperature
|
||||
air_contents.merge(internal_removed)
|
||||
|
||||
if (network)
|
||||
network.update = 1
|
||||
|
||||
return 1
|
||||
@@ -37,6 +37,23 @@ var
|
||||
FAKEBLOCK = 0
|
||||
BLOCKADD = 0
|
||||
DIFFMUT = 0
|
||||
HEADACHEBLOCK = 0
|
||||
COUGHBLOCK = 0
|
||||
TWITCHBLOCK = 0
|
||||
NERVOUSBLOCK = 0
|
||||
NOBREATHBLOCK = 0
|
||||
REMOTEVIEWBLOCK = 0
|
||||
REGENERATEBLOCK = 0
|
||||
INCREASERUNBLOCK = 0
|
||||
REMOTETALKBLOCK = 0
|
||||
MORPHBLOCK = 0
|
||||
BLENDBLOCK = 0
|
||||
HALLUCINATIONBLOCK = 0
|
||||
NOPRINTSBLOCK = 0
|
||||
SHOCKIMMUNITYBLOCK = 0
|
||||
SMALLSIZEBLOCK = 0
|
||||
GLASSESBLOCK = 0
|
||||
MONKEYBLOCK = 27
|
||||
|
||||
skipupdate = 0
|
||||
///////////////
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
var/other_mobs = null
|
||||
var/memory = ""
|
||||
var/poll_answer = 0.0
|
||||
var/sdisabilities = 0//Carbon
|
||||
var/disabilities = 0//Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/stat = 0.0
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
return
|
||||
if (ishuman(M))
|
||||
add_fibers(M)
|
||||
if (M.mutations & mFingerprints)
|
||||
if(src.fingerprintslast != M.key)
|
||||
src.fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
|
||||
src.fingerprintslast = M.key
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!istype(H.dna, /datum/dna))
|
||||
return 0
|
||||
|
||||
183
code/game/dna.dm
183
code/game/dna.dm
@@ -1,4 +1,7 @@
|
||||
/////////////////////////// DNA DATUM
|
||||
|
||||
#define STRUCDNASIZE 27
|
||||
|
||||
/datum/dna
|
||||
var/unique_enzymes = null
|
||||
var/struc_enzymes = null
|
||||
@@ -9,7 +12,7 @@
|
||||
/datum/dna/proc/check_integrity()
|
||||
//Lazy.
|
||||
if(length(uni_identity) != 39) uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
|
||||
if(length(struc_enzymes)!= 42) struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4000"
|
||||
if(length(struc_enzymes)!= 81) struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B02D6"
|
||||
|
||||
/datum/dna/proc/ready_dna(mob/living/carbon/human/character)
|
||||
|
||||
@@ -63,7 +66,7 @@
|
||||
|
||||
uni_identity = temp
|
||||
|
||||
var/mutstring = "2013E85C944C19A4B00185144725785DC6406A4508"
|
||||
var/mutstring = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B02D6"
|
||||
|
||||
struc_enzymes = mutstring
|
||||
|
||||
@@ -84,7 +87,7 @@
|
||||
|
||||
/proc/getrightblocks(input,blocknumber,blocksize)
|
||||
var/string
|
||||
string = copytext(input,blocksize*blocknumber+1,length(input)+1)
|
||||
string = copytext(input,blocksize*blocknumber+1)
|
||||
if (blocknumber < (length(input)/blocksize))
|
||||
return string
|
||||
else
|
||||
@@ -152,7 +155,7 @@
|
||||
if(!M) return
|
||||
var/num
|
||||
var/newdna
|
||||
num = pick(1,3,FAKEBLOCK,5,CLUMSYBLOCK,7,9,BLINDBLOCK,DEAFBLOCK)
|
||||
num = pick(GLASSESBLOCK,COUGHBLOCK,FAKEBLOCK,NERVOUSBLOCK,CLUMSYBLOCK,TWITCHBLOCK,HEADACHEBLOCK,BLINDBLOCK,DEAFBLOCK)
|
||||
M.dna.check_integrity()
|
||||
newdna = setblock(M.dna.struc_enzymes,num,toggledblock(getblock(M.dna.struc_enzymes,num,3)),3)
|
||||
M.dna.struc_enzymes = newdna
|
||||
@@ -172,13 +175,13 @@
|
||||
if(!M) return
|
||||
M.dna.check_integrity()
|
||||
if(type)
|
||||
for(var/i = 1, i <= 13, i++)
|
||||
for(var/i = 1, i <= 26, i++)
|
||||
if(prob(p))
|
||||
M.dna.uni_identity = setblock(M.dna.uni_identity, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
|
||||
updateappearance(M, M.dna.uni_identity)
|
||||
|
||||
else
|
||||
for(var/i = 1, i <= 13, i++)
|
||||
for(var/i = 1, i <= 26, i++)
|
||||
if(prob(p))
|
||||
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, add_zero2(num2hex(rand(1,4095), 1), 3), 3)
|
||||
domutcheck(M, null)
|
||||
@@ -263,32 +266,108 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/proc/ismuton(var/block,var/mob/M)
|
||||
return isblockon(getblock(M.dna.struc_enzymes, block,3),block)
|
||||
|
||||
/proc/domutcheck(mob/living/M as mob, connected, inj)
|
||||
//telekinesis = 1
|
||||
//firemut = 2
|
||||
//xray = 4
|
||||
//hulk = 8
|
||||
//clumsy = 16
|
||||
if (!M) return
|
||||
//mutations
|
||||
/*
|
||||
TK =(1<<0)
|
||||
COLD_RESISTANCE =(1<<1)
|
||||
XRAY =(1<<2)
|
||||
HULK =(1<<3)
|
||||
CLUMSY =(1<<4)
|
||||
//FAT =(1<<5)
|
||||
HUSK =(1<<6)
|
||||
LASER =(1<<7)
|
||||
HEAL =(1<<8)
|
||||
mNobreath =(1<<9)
|
||||
mRemote =(1<<10)
|
||||
mRegen =(1<<11)
|
||||
mRun =(1<<12)
|
||||
mRemotetalk =(1<<13)
|
||||
mMorph =(1<<14)
|
||||
mBlend =(1<<15)
|
||||
mHallucination =(1<<16)
|
||||
mFingerprints =(1<<17)
|
||||
mShock =(1<<18)
|
||||
mSmallsize =(1<<19)
|
||||
*/
|
||||
|
||||
//disabilities
|
||||
//1 = blurry eyes
|
||||
//2 = headache
|
||||
//4 = coughing
|
||||
//8 = twitch
|
||||
//16 = nervous
|
||||
//32 = deaf
|
||||
//64 = mute
|
||||
//128 = blind
|
||||
|
||||
M.dna.check_integrity()
|
||||
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
M.mutations = 0
|
||||
|
||||
M.see_in_dark = 2
|
||||
M.see_invisible = 0
|
||||
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, 1,3),1))
|
||||
M.disabilities |= 1
|
||||
M << "\red Your eyes feel strange."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),2))
|
||||
if(ismuton(NOBREATHBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue You feel no need to breathe."
|
||||
M.mutations |= mNobreath
|
||||
if(ismuton(REMOTEVIEWBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue Your mind expands"
|
||||
M.mutations |= mRemote
|
||||
if(ismuton(REGENERATEBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue You feel strange"
|
||||
M.mutations |= mRegen
|
||||
if(ismuton(INCREASERUNBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue You feel quick"
|
||||
M.mutations |= mRun
|
||||
if(ismuton(REMOTETALKBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue You expand your mind outwards"
|
||||
M.mutations |= mRemotetalk
|
||||
if(ismuton(MORPHBLOCK,M))
|
||||
if(prob(50))
|
||||
M.mutations |= mMorph
|
||||
M << "\blue Your skin feels strange"
|
||||
if(ismuton(BLENDBLOCK,M))
|
||||
if(prob(50))
|
||||
M.mutations |= mBlend
|
||||
M << "\blue You feel alone"
|
||||
if(ismuton(HALLUCINATIONBLOCK,M))
|
||||
if(prob(50))
|
||||
M.mutations |= mHallucination
|
||||
M << "\blue Your mind says 'Hello'"
|
||||
if(ismuton(NOPRINTSBLOCK,M))
|
||||
if(prob(50))
|
||||
M.mutations |= mFingerprints
|
||||
M << "\blue Your fingers feel numb"
|
||||
if(ismuton(SHOCKIMMUNITYBLOCK,M))
|
||||
if(prob(50))
|
||||
M.mutations |= mShock
|
||||
M << "\blue You feel strange"
|
||||
if(ismuton(SMALLSIZEBLOCK,M))
|
||||
if(prob(50))
|
||||
M << "\blue Your skin feels rubbery"
|
||||
M.mutations |= mSmallsize
|
||||
|
||||
|
||||
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),HULKBLOCK))
|
||||
if(inj || prob(5))
|
||||
M << "\blue Your muscles hurt."
|
||||
M.mutations |= HULK
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, 3,3),3))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK))
|
||||
M.disabilities |= 2
|
||||
M << "\red You get a headache."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),4))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FAKEBLOCK,3),FAKEBLOCK))
|
||||
M << "\red You feel strange."
|
||||
if (prob(95))
|
||||
if(prob(50))
|
||||
@@ -297,49 +376,46 @@
|
||||
randmuti(M)
|
||||
else
|
||||
randmutg(M)
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, 5,3),5))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK))
|
||||
M.disabilities |= 4
|
||||
M << "\red You start coughing."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),6))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK))
|
||||
M << "\red You feel lightheaded."
|
||||
M.mutations |= CLUMSY
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, 7,3),7))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK))
|
||||
M.disabilities |= 8
|
||||
M << "\red You twitch."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),8))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, XRAYBLOCK,3),XRAYBLOCK))
|
||||
if(inj || prob(30))
|
||||
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 |= XRAY
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, 9,3),9))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK))
|
||||
M.disabilities |= 16
|
||||
M << "\red You feel nervous."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),10))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),FIREBLOCK))
|
||||
if(inj || prob(30))
|
||||
M << "\blue Your body feels warm."
|
||||
M.mutations |= COLD_RESISTANCE
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),11))
|
||||
M.sdisabilities |= 1
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK))
|
||||
M.disabilities |= 128
|
||||
M << "\red You can't seem to see anything."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),12))
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),TELEBLOCK))
|
||||
if(inj || prob(15))
|
||||
M << "\blue You feel smarter."
|
||||
M.mutations |= TK
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),13))
|
||||
M.sdisabilities |= 4
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK))
|
||||
M.disabilities |= 32
|
||||
M.ear_deaf = 1
|
||||
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)
|
||||
*/
|
||||
M << "\red Its kinda quiet.."
|
||||
if (isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK))
|
||||
M.disabilities |= 1
|
||||
M << "Your eyes feel weird..."
|
||||
|
||||
//////////////////////////////////////////////////////////// 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, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human))
|
||||
// human > monkey
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.monkeyizing = 1
|
||||
@@ -409,7 +485,7 @@
|
||||
del(M)
|
||||
return
|
||||
|
||||
if (!isblockon(getblock(M.dna.struc_enzymes, 14,3),14) && !istype(M, /mob/living/carbon/human))
|
||||
if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human))
|
||||
// monkey > human,
|
||||
var/mob/living/carbon/monkey/Mo = M
|
||||
Mo.monkeyizing = 1
|
||||
@@ -758,7 +834,7 @@
|
||||
dat += text("<BR><BR><A href='?src=\ref[];mach_close=scannernew'>Close</A>", user)
|
||||
else
|
||||
dat = "<font color='red'> Error: No DNA Modifier connected. </FONT>"
|
||||
user << browse(dat, "window=scannernew;size=550x625")
|
||||
user << browse(dat, "window=scannernew;size=700x625")
|
||||
onclose(user, "scannernew")
|
||||
return
|
||||
|
||||
@@ -899,23 +975,39 @@
|
||||
////////////////////////////////////////////////////////
|
||||
if (href_list["strucmenu"])
|
||||
if(src.connected.occupant)
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[getleftblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)][getrightblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)]</FONT><BR><BR>")
|
||||
var/temp_string1 = getleftblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)
|
||||
var/temp1 = ""
|
||||
for(var/i = 3, i <= length(temp_string1), i += 3)
|
||||
temp1 += copytext(temp_string1, i-2, i+1) + " "
|
||||
var/temp_string2 = getrightblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)
|
||||
var/temp2 = ""
|
||||
for(var/i = 3, i <= length(temp_string2), i += 3)
|
||||
temp2 += copytext(temp_string2, i-2, i+1) + " "
|
||||
src.temphtml = text("Structural Enzymes: <font color='blue'>[temp1] [src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>":getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)] [temp2]</FONT><BR><BR>")
|
||||
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)
|
||||
src.temphtml += text("Selected Block: <font color='blue'><B>[]</B></FONT><BR>", src.strucblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucmenuminus=1'><-</A> Block <A href='?src=\ref[];strucmenuplus=1'>-></A><BR><BR>", src, src)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucmenuminus=1'><-</A> <A href='?src=\ref[];strucmenuchoose=1'>Block</A> <A href='?src=\ref[];strucmenuplus=1'>-></A><BR><BR>", src, src, src)
|
||||
src.temphtml += text("Selected Sub-Block: <font color='blue'><B>[]</B></FONT><BR>", src.subblock)
|
||||
src.temphtml += text("<A href='?src=\ref[];strucmenusubminus=1'><-</A> Sub-Block <A href='?src=\ref[];strucmenusubplus=1'>-></A><BR><BR>", src, src)
|
||||
src.temphtml += "<B>Modify Block:</B><BR>"
|
||||
src.temphtml += text("<A href='?src=\ref[];strucpulse=1'>Radiation</A><BR>", src)
|
||||
src.delete = 0
|
||||
if (href_list["strucmenuplus"])
|
||||
if (src.strucblock < 14)
|
||||
if (src.strucblock < 27)
|
||||
src.strucblock++
|
||||
dopage(src,"strucmenu")
|
||||
if (href_list["strucmenuminus"])
|
||||
if (src.strucblock > 1)
|
||||
src.strucblock--
|
||||
dopage(src,"strucmenu")
|
||||
if (href_list["strucmenuchoose"])
|
||||
var/temp = input("What block?", "Block", src.strucblock) as num
|
||||
if (temp > 27)
|
||||
temp = 27
|
||||
if (temp < 1)
|
||||
temp = 1
|
||||
src.strucblock = temp
|
||||
dopage(src,"strucmenu")
|
||||
if (href_list["strucmenusubplus"])
|
||||
if (src.subblock < 3)
|
||||
src.subblock++
|
||||
@@ -945,13 +1037,13 @@
|
||||
///
|
||||
if(src.connected.occupant)
|
||||
if (prob((80 + (src.radduration / 2))))
|
||||
if ((src.strucblock != 2 || src.strucblock != 12 || src.strucblock != 8 || src.strucblock || 10) && prob (20))
|
||||
if (prob (20))
|
||||
oldblock = src.strucblock
|
||||
block = miniscramble(block, src.radstrength, src.radduration)
|
||||
newblock = null
|
||||
if (src.strucblock > 1 && src.strucblock < 5)
|
||||
if (src.strucblock > 1 && src.strucblock < STRUCDNASIZE/2)
|
||||
src.strucblock++
|
||||
else if (src.strucblock > 5 && src.strucblock < 14)
|
||||
else if (src.strucblock > STRUCDNASIZE/2 && src.strucblock < STRUCDNASIZE)
|
||||
src.strucblock--
|
||||
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
|
||||
if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
|
||||
@@ -962,7 +1054,6 @@
|
||||
src.connected.occupant.radiation += (src.radstrength+src.radduration)
|
||||
src.strucblock = oldblock
|
||||
else
|
||||
//
|
||||
block = miniscramble(block, src.radstrength, src.radduration)
|
||||
newblock = null
|
||||
if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
continue
|
||||
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if((!H.dna) || (H.sdisabilities & 1)) //A blindness disease would be the worst.
|
||||
if((!H.dna) || (H.disabilities & 128)) //A blindness disease would be the worst.
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
|
||||
@@ -558,9 +558,9 @@
|
||||
usr << "\blue We stealthily sting [T]."
|
||||
|
||||
if(!T.changeling)
|
||||
T.sdisabilities |= 4
|
||||
T.disabilities |= 32
|
||||
spawn(300)
|
||||
T.sdisabilities &= ~4
|
||||
T.disabilities &= ~32
|
||||
|
||||
usr.verbs -= /client/proc/changeling_deaf_sting
|
||||
|
||||
|
||||
@@ -5,18 +5,9 @@
|
||||
if (prob(75))
|
||||
DIFFMUT = rand(0,20)
|
||||
|
||||
var/list/avnums = new/list()
|
||||
var/list/avnums = list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26)
|
||||
var/tempnum
|
||||
|
||||
avnums.Add(2)
|
||||
avnums.Add(12)
|
||||
avnums.Add(10)
|
||||
avnums.Add(8)
|
||||
avnums.Add(4)
|
||||
avnums.Add(11)
|
||||
avnums.Add(13)
|
||||
avnums.Add(6)
|
||||
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
HULKBLOCK = tempnum
|
||||
@@ -41,6 +32,54 @@
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
BLINDBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
HEADACHEBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
COUGHBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
TWITCHBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
NERVOUSBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
NOBREATHBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
REMOTEVIEWBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
REGENERATEBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
INCREASERUNBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
REMOTETALKBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
MORPHBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
BLENDBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
HALLUCINATIONBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
NOPRINTSBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
SHOCKIMMUNITYBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
SMALLSIZEBLOCK = tempnum
|
||||
tempnum = pick(avnums)
|
||||
avnums.Remove(tempnum)
|
||||
GLASSESBLOCK = tempnum
|
||||
|
||||
|
||||
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
|
||||
|
||||
@@ -246,6 +246,12 @@ var/global/datum/controller/occupations/job_master
|
||||
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack(H)
|
||||
H.equip_if_possible(BPK, H.slot_back,1)
|
||||
H.equip_if_possible(new /obj/item/weapon/storage/box(H.back), H.slot_in_backpack)
|
||||
//Give'em glasses if they are nearsighted
|
||||
if(H.disabilities & 1)
|
||||
var/eqipped = H.equip_if_possible(new /obj/item/clothing/glasses/regular(H), H.slot_glasses)
|
||||
if(!eqipped)
|
||||
var/obj/item/clothing/glasses/G = H.slot_glasses
|
||||
G.prescription = 1
|
||||
H.update_clothing()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
else
|
||||
else
|
||||
dat += text("<A href='?src=\ref[];choice=Log In'>{Log In}</A>", src)
|
||||
user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec;size=550x400")
|
||||
user << browse(text("<HEAD><TITLE>Security Records</TITLE></HEAD><TT>[]</TT>", dat), "window=secure_rec;size=600x400")
|
||||
onclose(user, "secure_rec")
|
||||
return
|
||||
|
||||
|
||||
@@ -831,7 +831,7 @@ var/list/sacrificed = list()
|
||||
if(prob(5))
|
||||
C.disabilities |= 1
|
||||
if(prob(10))
|
||||
C.sdisabilities |= 1
|
||||
C.disabilities |= 128
|
||||
C.show_message("\red Suddenly you see red flash that blinds you.", 3)
|
||||
affected++
|
||||
if(affected)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
sleep(2)
|
||||
new /obj/item/wardrobe/chief_engineer(src)
|
||||
new /obj/item/blueprints(src)
|
||||
//
|
||||
var/obj/item/weapon/storage/backpack/industrial/BPK = new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
var/obj/item/weapon/storage/box/B = new(BPK)
|
||||
new /obj/item/weapon/pen(B)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
O.show_message("\blue [(O==user?"You direct":"[user] directs")] [src] to [(M==user? "your":"[M]")] eyes", 1)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))//robots and aliens are unaffected
|
||||
if(M.stat > 1 || M.sdisabilities & 1)//mob is dead or fully blind
|
||||
if(M.stat > 1 || M.disabilities & 128)//mob is dead or fully blind
|
||||
if(M!=user)
|
||||
user.show_message(text("\red [] pupils does not react to the light!", M),1)
|
||||
else if(M.mutations & XRAY)//mob has X-RAY vision
|
||||
|
||||
26
code/game/objects/devices/geneanalyzer.dm
Normal file
26
code/game/objects/devices/geneanalyzer.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/obj/item/device/geneticsanalyzer
|
||||
name = "Genetics Analyser"
|
||||
icon = 'device.dmi'
|
||||
icon_state = "genetics"
|
||||
w_class = 2
|
||||
|
||||
/obj/item/device/geneticsanalyzer/attack(mob/M as mob, mob/user as mob)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has analyzed []'s genetic code!", user, M), 1)
|
||||
//Foreach goto(67)
|
||||
user.show_message(text("\blue Analyzing Results for [M]: [M.dna.struc_enzymes]\n\t"), 1)
|
||||
user.show_message(text("\blue \t Epilepsy: [isblockon(getblock(M.dna.struc_enzymes, HEADACHEBLOCK,3),HEADACHEBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Cough: [isblockon(getblock(M.dna.struc_enzymes, COUGHBLOCK,3),COUGHBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Clumsy: [isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),CLUMSYBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Twitch: [isblockon(getblock(M.dna.struc_enzymes, TWITCHBLOCK,3),TWITCHBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Nervous: [isblockon(getblock(M.dna.struc_enzymes, NERVOUSBLOCK,3),NERVOUSBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Blind: [isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),BLINDBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Deaf: [isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),DEAFBLOCK) ? "Yes" : "No"]"), 1)
|
||||
user.show_message(text("\blue \t Requires Glasses: [isblockon(getblock(M.dna.struc_enzymes, GLASSESBLOCK,3),GLASSESBLOCK) ? "Yes" : "No"]"), 1)
|
||||
|
||||
var/unknow = 0
|
||||
var/list/unknowns = list(HULKBLOCK,TELEBLOCK,FIREBLOCK,XRAYBLOCK,NOBREATHBLOCK,REMOTEVIEWBLOCK,REGENERATEBLOCK,INCREASERUNBLOCK,REMOTETALKBLOCK,MORPHBLOCK,BLENDBLOCK,HALLUCINATIONBLOCK,NOPRINTSBLOCK,SHOCKIMMUNITYBLOCK,SMALLSIZEBLOCK)
|
||||
for(var/unknown in unknowns)
|
||||
if(isblockon(getblock(M.dna.struc_enzymes, unknown,3),unknown))
|
||||
unknow += 1
|
||||
user.show_message(text("\blue \t Unknown Anomalies: [unknow]"))
|
||||
@@ -473,7 +473,7 @@ mob/proc/flash_weak_pain()
|
||||
if (prob(M.eye_stat - 10 + 1))
|
||||
if(M.stat != 2)
|
||||
M << "\red You go blind!"
|
||||
M.sdisabilities |= 1
|
||||
M.disabilities |= 128
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -208,12 +208,12 @@ FLASHBANG
|
||||
M.disabilities |= 1
|
||||
if (prob(M.eye_stat - 20 + 1))
|
||||
M << "\red You can't see anything!"
|
||||
M.sdisabilities |= 1
|
||||
M.disabilities |= 128
|
||||
if (M.ear_damage >= 15)
|
||||
M << "\red Your ears start to ring badly!"
|
||||
if (prob(M.ear_damage - 10 + 5))
|
||||
M << "\red You can't hear anything!"
|
||||
M.sdisabilities |= 4
|
||||
M.disabilities |= 32
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
M << "\red Your ears start to ring!"
|
||||
|
||||
@@ -531,7 +531,7 @@ CIRCULAR SAW
|
||||
M.updatehealth()
|
||||
else
|
||||
M.take_organ_damage(15)
|
||||
M.sdisabilities &= ~1
|
||||
M.disabilities &= ~128
|
||||
M:eye_op_stage = 0.0
|
||||
|
||||
else
|
||||
|
||||
@@ -248,7 +248,7 @@ WELDINGTOOOL
|
||||
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
|
||||
if (prob(user.eye_stat - 25 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.sdisabilities |= 1
|
||||
user.disabilities |= 128
|
||||
else if (prob(user.eye_stat - 15 + 1))
|
||||
user << "\red You go blind!"
|
||||
user.eye_blind = 5
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/regular(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/prescription(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/prescription(src)
|
||||
new /obj/item/clothing/glasses/meson/prescription(src)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
|
||||
|
||||
/obj/structure/table/attack_hand(mob/user as mob)
|
||||
if ((usr.mutations & HULK))
|
||||
if (usr.mutations & HULK)
|
||||
usr << text("\blue You destroy the table.")
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
@@ -92,6 +92,13 @@ TABLE AND RACK OBJECT INTERATIONS
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
src.density = 0
|
||||
del(src)
|
||||
if (usr.mutations & mSmallsize)
|
||||
step(user, get_dir(user, src))
|
||||
if (user.loc == src.loc)
|
||||
user.layer = TURF_LAYER
|
||||
for(var/mob/M in viewers(user, null))
|
||||
M.show_message("[user] hides under the table!", 1)
|
||||
//Foreach goto(69)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -19,10 +19,9 @@
|
||||
usr << "Your message has been broadcast to administrators."
|
||||
log_admin("HELP: [key_name(src)]: [msg]")
|
||||
|
||||
/* var/list/replacechars = list("'","\"",">","<","(",")")
|
||||
for(var/rep in replacechars)
|
||||
msg = dd_replacetext(msg, rep, "")
|
||||
world << msg*/
|
||||
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
|
||||
msg = sanitize_simple(msg, replacechars)
|
||||
world << msg
|
||||
send2adminirc("#bs12admin","HELP: \"[src.key]: [msg]\"")
|
||||
if(tension_master)
|
||||
tension_master.new_adminhelp()
|
||||
|
||||
@@ -840,7 +840,6 @@ datum
|
||||
if(!M) M = holder.my_atom
|
||||
M.mutations = 0
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1302,11 +1301,9 @@ datum
|
||||
holder.remove_reagent("zombiepowder", 5)
|
||||
M.brainloss = 0
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
M.eye_blurry = 0
|
||||
M.eye_blind = 0
|
||||
M.disabilities &= ~1
|
||||
M.sdisabilities &= ~1
|
||||
M.SetWeakened(0)
|
||||
M.SetStunned(0)
|
||||
M.SetParalysis(0)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
vision_flags = 0
|
||||
darkness_view = 0//Base human is 2
|
||||
invisa_view = 0
|
||||
prescription = 0
|
||||
|
||||
/*
|
||||
SEE_SELF // can see self, no matter what
|
||||
|
||||
@@ -13,9 +13,12 @@
|
||||
origin_tech = "magnets=2;engineering=2"
|
||||
vision_flags = SEE_TURFS
|
||||
|
||||
prescription
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/science
|
||||
name = "Science Goggles"
|
||||
desc = "nothing"
|
||||
desc = "Used for !!SCIENCE!!"
|
||||
icon_state = "purple"
|
||||
item_state = "glasses"
|
||||
|
||||
@@ -41,6 +44,7 @@
|
||||
desc = "Made by Nerd. Co."
|
||||
icon_state = "glasses"
|
||||
item_state = "glasses"
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/gglasses
|
||||
name = "Green Glasses"
|
||||
@@ -56,6 +60,9 @@
|
||||
protective_temperature = 1300
|
||||
darkness_view = -1
|
||||
|
||||
prescription
|
||||
prescription = 1
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/big
|
||||
desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks many flashes."
|
||||
icon_state = "bigsunglasses"
|
||||
|
||||
@@ -147,9 +147,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -148,9 +148,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -463,9 +463,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -149,9 +149,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -388,9 +388,9 @@
|
||||
|
||||
density = !( lying )
|
||||
|
||||
if ((sdisabilities & 1))
|
||||
if ((disabilities & 128))
|
||||
blinded = 1
|
||||
if ((sdisabilities & 4))
|
||||
if ((disabilities & 32))
|
||||
ear_deaf = 1
|
||||
|
||||
if (eye_blurry > 0)
|
||||
|
||||
@@ -221,9 +221,9 @@
|
||||
|
||||
// density = !( lying )
|
||||
|
||||
if (sdisabilities & 1)
|
||||
if (disabilities & 128)
|
||||
blinded = 1
|
||||
if (sdisabilities & 4)
|
||||
if (disabilities & 32)
|
||||
ear_deaf = 1
|
||||
|
||||
if (eye_blurry > 0)
|
||||
|
||||
@@ -194,6 +194,12 @@
|
||||
|
||||
if (shock_stage >= 10) tally += 3
|
||||
|
||||
if(tally < 0)
|
||||
tally = 0
|
||||
|
||||
if(mutations & mRun)
|
||||
tally = 0
|
||||
|
||||
return tally
|
||||
|
||||
/mob/living/carbon/human/Stat()
|
||||
@@ -2431,3 +2437,96 @@ It can still be worn/put on as normal.
|
||||
if(mutations & HULK)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/morph()
|
||||
set name = "Morph"
|
||||
set category = "Superpower"
|
||||
if(!(src.mutations & mMorph))
|
||||
src.verbs -= /mob/living/carbon/human/proc/morph
|
||||
return
|
||||
|
||||
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
|
||||
if(new_facial)
|
||||
r_facial = hex2num(copytext(new_facial, 2, 4))
|
||||
g_facial = hex2num(copytext(new_facial, 4, 6))
|
||||
b_facial = hex2num(copytext(new_facial, 6, 8))
|
||||
|
||||
|
||||
|
||||
var/new_eyes = input("Please select eye color.", "Character Generation") as color
|
||||
if(new_eyes)
|
||||
r_eyes = hex2num(copytext(new_eyes, 2, 4))
|
||||
g_eyes = hex2num(copytext(new_eyes, 4, 6))
|
||||
b_eyes = hex2num(copytext(new_eyes, 6, 8))
|
||||
|
||||
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
|
||||
|
||||
if (new_tone)
|
||||
s_tone = max(min(round(text2num(new_tone)), 220), 1)
|
||||
s_tone = -s_tone + 35
|
||||
|
||||
var/new_style = input("Please select hair style", "Character Generation") as null|anything in list( "Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Wave", "Bedhead", "Dreadlocks", "Ponytail", "Bald" )
|
||||
|
||||
if (new_style)
|
||||
h_style = new_style
|
||||
|
||||
new_style = input("Please select facial style", "Character Generation") as null|anything in list("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved")
|
||||
|
||||
if (new_style)
|
||||
f_style = new_style
|
||||
|
||||
var/new_gender = input("Please select gender") as null|anything in list("Male","Female")
|
||||
if (new_gender)
|
||||
if(new_gender == "Male")
|
||||
gender = MALE
|
||||
else
|
||||
gender = FEMALE
|
||||
update_body()
|
||||
update_face()
|
||||
update_clothing()
|
||||
|
||||
for(var/mob/M in view())
|
||||
M.show_message("[src.name] just morphed!")
|
||||
|
||||
/mob/living/carbon/human/proc/remotesay()
|
||||
set name = "Project mind"
|
||||
set category = "Superpower"
|
||||
if(!(src.mutations & mRemotetalk))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remotesay
|
||||
return
|
||||
var/list/creatures = list()
|
||||
for(var/mob/living/carbon/h in world)
|
||||
creatures += h
|
||||
var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures
|
||||
|
||||
var/say = input ("What do you wish to say")
|
||||
if(target.mutations & mRemotetalk)
|
||||
target.show_message("\blue You hear [src.real_name]'s voice: [say]")
|
||||
else
|
||||
target.show_message("\blue You hear a voice: [say]")
|
||||
usr.show_message("\blue You project your mind into [target.real_name]: [say]")
|
||||
for(var/mob/dead/observer/G in world)
|
||||
G.show_message("<i>Telepathic message from <b>[src]</b> to <b>[target]</b>: [say]</i>")
|
||||
|
||||
/mob/living/carbon/human/proc/remoteobserve()
|
||||
set name = "Remote View"
|
||||
set category = "Superpower"
|
||||
|
||||
if(!(src.mutations & mRemote))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remoteobserve
|
||||
return
|
||||
|
||||
var/list/mob/creatures = list()
|
||||
|
||||
for(var/mob/living/carbon/h in world)
|
||||
creatures += h
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
|
||||
|
||||
var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures
|
||||
|
||||
if (target)
|
||||
client.eye = target
|
||||
else
|
||||
client.eye = client.mob
|
||||
|
||||
@@ -172,6 +172,52 @@
|
||||
for(var/atom/a in hallucinations)
|
||||
del a
|
||||
|
||||
|
||||
if(mutations & mSmallsize)
|
||||
if(!(flags & TABLEPASS))
|
||||
flags |= TABLEPASS
|
||||
else
|
||||
if(flags & TABLEPASS)
|
||||
flags &= ~TABLEPASS
|
||||
|
||||
if (mutations & mHallucination)
|
||||
hallucination = 100
|
||||
halloss = 0
|
||||
|
||||
if (mutations & mRegen)
|
||||
src.bruteloss -= 2
|
||||
src.fireloss -= 2
|
||||
src.oxyloss -= 2
|
||||
src.toxloss -= 2
|
||||
|
||||
for(var/datum/organ/external/org in organs)
|
||||
org.brute_dam -= 2
|
||||
org.burn_dam -= 2
|
||||
org.brute_dam = max(org.brute_dam, 0)
|
||||
org.burn_dam = max(org.burn_dam, 0)
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/morph in src.verbs))
|
||||
if(mutations & mMorph)
|
||||
src.verbs += /mob/living/carbon/human/proc/morph
|
||||
else
|
||||
if(!(mutations & mMorph))
|
||||
src.verbs -= /mob/living/carbon/human/proc/morph
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/remoteobserve in src.verbs))
|
||||
if(mutations & mRemote)
|
||||
src.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
else
|
||||
if(!(mutations & mRemote))
|
||||
src.verbs += /mob/living/carbon/human/proc/remoteobserve
|
||||
|
||||
if(!(/mob/living/carbon/human/proc/remotesay in src.verbs))
|
||||
if(mutations & mRemotetalk)
|
||||
src.verbs += /mob/living/carbon/human/proc/remotesay
|
||||
else
|
||||
if(!(mutations & mRemotetalk))
|
||||
src.verbs -= /mob/living/carbon/human/proc/remotesay
|
||||
|
||||
|
||||
if (disabilities & 2)
|
||||
if ((prob(1) && paralysis < 1 && r_epil < 1))
|
||||
src << "\red You have a seizure!"
|
||||
@@ -186,16 +232,15 @@
|
||||
drop_item()
|
||||
spawn( 0 )
|
||||
emote("cough")
|
||||
return
|
||||
if (disabilities & 8)
|
||||
if ((prob(10) && paralysis <= 1 && r_Tourette < 1))
|
||||
if ((prob(5) && paralysis <= 1 && r_Tourette < 1))
|
||||
Stun(10)
|
||||
spawn( 0 )
|
||||
spawn(0)
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
emote("twitch")
|
||||
if(2 to 3)
|
||||
say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
|
||||
say("[prob(50) ? ";" : ""][pick("EELS","MOTORBOATS","MERDE","ANTIDISESTABLISHMENTARIANISM","OGOPOGO","POPEMOBILE","RHOMBUS","TUMESCENCE","ZIGGURAT","DIRIGIBLES","WAFFLES","PICKLES","BIKINI","DUCK","KNICKERBOCKERS","LOQUACIOUS","MACADAMIA","MAHOGANY","KUMQUAT","PERCOLATOR","AUBERGINES","FLANGES","GOURDS","DONUTS","CALLIPYGIAN","DARJEELING","DWARFS","MAGMA","ARMOK","BERR","APPLES","SPACEMEN","NINJAS","PIRATES","BUNION")]!")
|
||||
var/old_x = pixel_x
|
||||
var/old_y = pixel_y
|
||||
pixel_x += rand(-2,2)
|
||||
@@ -203,10 +248,10 @@
|
||||
sleep(2)
|
||||
pixel_x = old_x
|
||||
pixel_y = old_y
|
||||
return
|
||||
if (disabilities & 16)
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
|
||||
if (brainloss >= 60 && stat != 2)
|
||||
if (prob(7))
|
||||
switch(pick(1,2,3))
|
||||
@@ -374,7 +419,7 @@
|
||||
else canmove = 1
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
if(nodamage || (mutations & mNobreath))
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
@@ -857,9 +902,9 @@
|
||||
|
||||
density = !( lying )
|
||||
|
||||
if ((sdisabilities & 1 || istype(glasses, /obj/item/clothing/glasses/blindfold)))
|
||||
if ((disabilities & 128 || istype(glasses, /obj/item/clothing/glasses/blindfold)))
|
||||
blinded = 1
|
||||
if ((sdisabilities & 4 || istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)))
|
||||
if ((disabilities & 32 || istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)))
|
||||
ear_deaf = 1
|
||||
|
||||
if (eye_blurry > 0)
|
||||
@@ -1084,7 +1129,7 @@
|
||||
else
|
||||
blind.layer = 0
|
||||
|
||||
if (disabilities & 1 && !istype(glasses, /obj/item/clothing/glasses/regular) )
|
||||
if ((disabilities & 1 && ((glasses && !glasses.prescription) || !glasses)) || (glasses && glasses.prescription && !(disabilities & 1)))
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
if (eye_blurry)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_visible_name()])"
|
||||
// Mute disability
|
||||
if (src.sdisabilities & 2)
|
||||
if (src.disabilities & 64)
|
||||
return
|
||||
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
@@ -462,9 +462,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.sdisabilities & 1)
|
||||
if (src.disabilities & 128)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & 4)
|
||||
if (src.disabilities & 32)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -469,9 +469,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if (src.sdisabilities & 1)
|
||||
if (src.disabilities & 128)
|
||||
src.blinded = 1
|
||||
if (src.sdisabilities & 4)
|
||||
if (src.disabilities & 32)
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
gender = pick(MALE, FEMALE)
|
||||
dna = new /datum/dna( null )
|
||||
dna.uni_identity = "00600200A00E0110148FC01300B009"
|
||||
dna.struc_enzymes = "0983E840344C39F4B059D5145FC5785DC6406A4BB8"
|
||||
dna.struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
|
||||
dna.unique_enzymes = md5(name)
|
||||
//////////blah
|
||||
var/gendervar
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
//sort of a legacy burn method for /electrocute, /shock, and the e_chair
|
||||
/mob/living/proc/burn_skin(burn_amount)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src.mutations & mShock)
|
||||
return 0
|
||||
//world << "DEBUG: burn_skin(), mutations=[mutations]"
|
||||
if (src.mutations & COLD_RESISTANCE) //fireproof
|
||||
return 0
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
if (sdisabilities & 2)
|
||||
if (disabilities & 64)
|
||||
return
|
||||
|
||||
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
|
||||
@@ -136,9 +136,9 @@
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if ((src.sdisabilities & 1))
|
||||
if ((src.disabilities & 128))
|
||||
src.blinded = 1
|
||||
if ((src.sdisabilities & 4))
|
||||
if ((src.disabilities & 32))
|
||||
src.ear_deaf = 1
|
||||
|
||||
if (src.eye_blurry > 0)
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2)
|
||||
if(!client) return
|
||||
if (type)
|
||||
if ((type & 1 && (sdisabilities & 1 || (blinded || paralysis))))//Vision related
|
||||
if ((type & 1 && (disabilities & 128 || (blinded || paralysis))))//Vision related
|
||||
if (!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if ((type & 2 && (sdisabilities & 4 || ear_deaf)))//Hearing related
|
||||
if ((type & 2 && (disabilities & 32 || ear_deaf)))//Hearing related
|
||||
if (!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if ((type & 1 && sdisabilities & 1))
|
||||
if ((type & 1 && disabilities & 128))
|
||||
return
|
||||
// Added voice muffling for Issue 41.
|
||||
if (stat == 1 || sleeping > 0)
|
||||
|
||||
@@ -369,6 +369,7 @@
|
||||
|
||||
|
||||
new_character.dna.ready_dna(new_character)
|
||||
preferences.copydisabilities(new_character)
|
||||
if(mind)
|
||||
mind.transfer_to(new_character)
|
||||
mind.original = new_character
|
||||
|
||||
@@ -108,9 +108,10 @@ datum/preferences
|
||||
|
||||
flavor_text = ""
|
||||
|
||||
// slot stuff
|
||||
var/slotname
|
||||
var/curslot = 0
|
||||
// slot stuff (Why were they var/var? --SkyMarshal)
|
||||
slotname
|
||||
curslot = 0
|
||||
disabilities = 0
|
||||
|
||||
New()
|
||||
hair_style = new/datum/sprite_accessory/hair/short
|
||||
@@ -169,6 +170,8 @@ datum/preferences
|
||||
dat += "<hr><b>Eyes</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;eyes=input'>Change Color</a> <font face=\"fixedsys\" size=\"3\" color=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]\"><table style='display:inline;' bgcolor=\"#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]\"><tr><td>__</td></tr></table></font>"
|
||||
|
||||
dat += "<hr><b>Disabilities: </b><a href=\"byond://?src=\ref[user];preferences=1;disabilities=1\">[disabilities]</a><br>"
|
||||
|
||||
dat += "<hr><b>Flavor Text</b><br>"
|
||||
dat += "<a href='byond://?src=\ref[user];preferences=1;flavor_text=1'>Change</a><br>"
|
||||
if(lentext(flavor_text) <= 40)
|
||||
@@ -683,6 +686,25 @@ datum/preferences
|
||||
b_type = "A+"
|
||||
UI = UI_OLD
|
||||
midis = 1
|
||||
disabilities = 0
|
||||
if(link_tags["disabilities"])
|
||||
var/temp = input(usr,"Disability number","Disabilities",disabilities) as num
|
||||
disabilities = min(max(temp,0),63)
|
||||
usr << "You have chosen..."
|
||||
if(disabilities == 0)
|
||||
usr << "No disabilities"
|
||||
if(disabilities & 1)
|
||||
usr << "Nearsightedness"
|
||||
if(disabilities & 2)
|
||||
usr << "Headaches"
|
||||
if(disabilities & 4)
|
||||
usr << "Coughing"
|
||||
if(disabilities & 8)
|
||||
usr << "Twitchiness/Tourettes (You must hate yourself)"
|
||||
if(disabilities & 16)
|
||||
usr << "Nervousness"
|
||||
if(disabilities & 32)
|
||||
usr << "Trenna's Disorder (Deafness)"
|
||||
|
||||
ShowChoices(user)
|
||||
|
||||
@@ -738,5 +760,24 @@ datum/preferences
|
||||
character.client.be_alien = be_special&BE_ALIEN
|
||||
character.client.be_pai = be_special&BE_PAI
|
||||
|
||||
proc/copydisabilities(mob/living/carbon/human/character)
|
||||
if(disabilities & 1)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,GLASSESBLOCK,toggledblock(getblock(character.dna.struc_enzymes,GLASSESBLOCK,3)),3)
|
||||
if(disabilities & 2)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,HEADACHEBLOCK,toggledblock(getblock(character.dna.struc_enzymes,HEADACHEBLOCK,3)),3)
|
||||
if(disabilities & 4)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,COUGHBLOCK,toggledblock(getblock(character.dna.struc_enzymes,COUGHBLOCK,3)),3)
|
||||
if(disabilities & 8)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,TWITCHBLOCK,toggledblock(getblock(character.dna.struc_enzymes,TWITCHBLOCK,3)),3)
|
||||
if(disabilities & 16)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,NERVOUSBLOCK,toggledblock(getblock(character.dna.struc_enzymes,NERVOUSBLOCK,3)),3)
|
||||
if(disabilities & 32)
|
||||
character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,DEAFBLOCK,toggledblock(getblock(character.dna.struc_enzymes,DEAFBLOCK,3)),3)
|
||||
//if(disabilities & 64)
|
||||
//mute
|
||||
//if(disabilities & 128)
|
||||
//character.dna.struc_enzymes = setblock(character.dna.struc_enzymes,BLINDBLOCK,toggledblock(getblock(character.dna.struc_enzymes,BLINDBLOCK,3)),3)
|
||||
character.disabilities = disabilities
|
||||
|
||||
#undef UI_OLD
|
||||
#undef UI_NEW
|
||||
@@ -139,6 +139,7 @@ datum/preferences/proc/savefile_save(mob/user, slot)
|
||||
F["pregame_music"] << src.pregame_music
|
||||
F["ooccolor"] << src.ooccolor
|
||||
F["lastchangelog"] << src.lastchangelog
|
||||
F["disabilities"] << src.disabilities
|
||||
|
||||
return 1
|
||||
|
||||
@@ -213,6 +214,10 @@ datum/preferences/proc/savefile_load(mob/user, slot)
|
||||
F["job_engsec_high"] >> src.job_engsec_high
|
||||
F["job_engsec_med"] >> src.job_engsec_med
|
||||
F["job_engsec_low"] >> src.job_engsec_low
|
||||
F["disabilities"] >> src.disabilities
|
||||
if(isnull(src.disabilities)) //Sanity checking
|
||||
src.disabilities = 0
|
||||
F["disabilities"] << src.disabilities
|
||||
|
||||
F["job_alt_titles"] >> job_alt_titles
|
||||
if(!job_alt_titles)
|
||||
|
||||
@@ -159,7 +159,17 @@ var/const
|
||||
HUSK =(1<<6)
|
||||
LASER =(1<<7)
|
||||
HEAL =(1<<8)
|
||||
|
||||
mNobreath =(1<<9)
|
||||
mRemote =(1<<10)
|
||||
mRegen =(1<<11)
|
||||
mRun =(1<<12)
|
||||
mRemotetalk =(1<<13)
|
||||
mMorph =(1<<14)
|
||||
mBlend =(1<<15)
|
||||
mHallucination =(1<<16)
|
||||
mFingerprints =(1<<17)
|
||||
mShock =(1<<18)
|
||||
mSmallsize =(1<<19)
|
||||
|
||||
//mob/var/stat things
|
||||
var/const
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
10070
maps/tgstation.2.0.8.dmm
10070
maps/tgstation.2.0.8.dmm
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user