mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-11 07:59:08 +01:00
Merge branch 'master' into pr/1
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
/obj/item/chromosome
|
||||
name = "blank chromosome"
|
||||
icon = 'icons/obj/chromosomes.dmi'
|
||||
icon_state = ""
|
||||
desc = "A tube holding chromosomic data."
|
||||
force = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
var/stabilizer_coeff = 1 //lower is better, affects genetic stability
|
||||
var/synchronizer_coeff = 1 //lower is better, affects chance to backfire
|
||||
var/power_coeff = 1 //higher is better, affects "strength"
|
||||
var/energy_coeff = 1 //lower is better. affects recharge time
|
||||
|
||||
var/weight = 5
|
||||
|
||||
/obj/item/chromosome/proc/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
if((stabilizer_coeff != 1) && (HM.stabilizer_coeff != -1)) //if the chromosome is 1, we dont change anything. If the mutation is -1, we cant change it. sorry
|
||||
return TRUE
|
||||
if((synchronizer_coeff != 1) && (HM.synchronizer_coeff != -1))
|
||||
return TRUE
|
||||
if((power_coeff != 1) && (HM.power_coeff != -1))
|
||||
return TRUE
|
||||
if((energy_coeff != 1) && (HM.energy_coeff != -1))
|
||||
return TRUE
|
||||
|
||||
/obj/item/chromosome/proc/apply(datum/mutation/human/HM)
|
||||
if(HM.stabilizer_coeff != -1)
|
||||
HM.stabilizer_coeff = stabilizer_coeff
|
||||
if(HM.synchronizer_coeff != -1)
|
||||
HM.synchronizer_coeff = synchronizer_coeff
|
||||
if(HM.power_coeff != -1)
|
||||
HM.power_coeff = power_coeff
|
||||
if(HM.energy_coeff != -1)
|
||||
HM.energy_coeff = energy_coeff
|
||||
HM.can_chromosome = 2
|
||||
HM.chromosome_name = name
|
||||
HM.modify()
|
||||
qdel(src)
|
||||
|
||||
/proc/generate_chromosome()
|
||||
var/static/list/chromosomes
|
||||
if(!chromosomes)
|
||||
chromosomes = list()
|
||||
for(var/A in subtypesof(/obj/item/chromosome))
|
||||
var/obj/item/chromosome/CM = A
|
||||
if(!initial(CM.weight))
|
||||
break
|
||||
chromosomes[A] = initial(CM.weight)
|
||||
return pickweight(chromosomes)
|
||||
|
||||
|
||||
/obj/item/chromosome/stabilizer
|
||||
name = "stabilizer chromosome"
|
||||
desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%."
|
||||
icon_state = "stabilizer"
|
||||
stabilizer_coeff = 0.8
|
||||
weight = 1
|
||||
|
||||
/obj/item/chromosome/synchronizer
|
||||
name = "synchronizer chromosome"
|
||||
desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%."
|
||||
icon_state = "synchronizer"
|
||||
synchronizer_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/power
|
||||
name = "power chromosome"
|
||||
desc = "A power chromosome for boosting certain mutation's power by 50%."
|
||||
icon_state = "power"
|
||||
power_coeff = 1.5
|
||||
|
||||
/obj/item/chromosome/energy
|
||||
name = "energetic chromosome"
|
||||
desc = "A chromosome that reduces cooldown on action based mutations by 50%."
|
||||
icon_state = "energy"
|
||||
energy_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/reinforcer
|
||||
name = "reinforcement chromosome"
|
||||
desc = "Renders the mutation immune to mutadone."
|
||||
icon_state = "reinforcer"
|
||||
weight = 3
|
||||
|
||||
/obj/item/chromosome/reinforcer/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
return !HM.mutadone_proof
|
||||
|
||||
/obj/item/chromosome/reinforcer/apply(datum/mutation/human/HM)
|
||||
HM.mutadone_proof = TRUE
|
||||
..()
|
||||
@@ -65,7 +65,7 @@
|
||||
build_path = /obj/machinery/dna_scannernew
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
@@ -6,6 +6,8 @@ T-RAY
|
||||
HEALTH ANALYZER
|
||||
GAS ANALYZER
|
||||
SLIME SCANNER
|
||||
NANITE SCANNER
|
||||
GENE SCANNER
|
||||
|
||||
*/
|
||||
/obj/item/t_scanner
|
||||
@@ -291,7 +293,8 @@ SLIME SCANNER
|
||||
var/ldamage = H.return_liver_damage()
|
||||
if(ldamage > 10)
|
||||
msg += "\t<span class='alert'>[ldamage > 45 ? "Severe" : "Minor"] liver damage detected.</span>\n"
|
||||
|
||||
if(advanced && H.has_dna())
|
||||
to_chat(user, "\t<span class='info'>Genetic Stability: [H.dna.stability]%.</span>")
|
||||
// Body part damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
var/mob/living/carbon/C = M
|
||||
@@ -757,3 +760,62 @@ SLIME SCANNER
|
||||
var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE)
|
||||
if(!response)
|
||||
to_chat(user, "<span class='info'>No nanites detected in the subject.</span>")
|
||||
|
||||
/obj/item/sequence_scanner
|
||||
name = "genetic sequence scanner"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gene"
|
||||
item_state = "healthanalyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
desc = "A hand-held scanner able to swiftly scan someone for potential mutations. Hold near a DNA console to update from their database."
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=200)
|
||||
var/list/discovered = list() //hit a dna console to update the scanners database
|
||||
|
||||
/obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s genetic sequence.</span>")
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
gene_scan(M, user, src)
|
||||
|
||||
/obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!istype(O) || !proximity)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/machinery/computer/scan_consolenew))
|
||||
var/obj/machinery/computer/scan_consolenew/C = O
|
||||
if(C.stored_research)
|
||||
to_chat(user, "<span class='notice'>[name] database updated.</span>")
|
||||
discovered = C.stored_research.discovered_mutations
|
||||
else
|
||||
to_chat(user,"<span class='warning'>No database to update from.</span>")
|
||||
|
||||
/proc/gene_scan(mob/living/carbon/C, mob/living/user, obj/item/sequence_scanner/G)
|
||||
if(!iscarbon(C) || !C.has_dna())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>[C.name]'s potential mutations.")
|
||||
for(var/A in C.dna.mutation_index)
|
||||
var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(A)
|
||||
var/mut_name
|
||||
if(G && (A in G.discovered))
|
||||
mut_name = "[HM.name] ([HM.alias])"
|
||||
else
|
||||
mut_name = HM.alias
|
||||
var/temp = GET_GENE_STRING(HM.type, C.dna)
|
||||
var/display
|
||||
for(var/i in 0 to length(temp) / DNA_MUTATION_BLOCKS-1)
|
||||
if(i)
|
||||
display += "-"
|
||||
display += copytext(temp, 1 + i*DNA_MUTATION_BLOCKS, DNA_MUTATION_BLOCKS*(1+i) + 1)
|
||||
|
||||
|
||||
to_chat(user, "<span class='boldnotice'>- [mut_name] > [display]</span>")
|
||||
@@ -14,33 +14,25 @@
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
for(var/HM in remove_mutations)
|
||||
M.dna.remove_mutation(HM)
|
||||
for(var/HM in add_mutations)
|
||||
if(HM == RACEMUT)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(M.dna.mutation_in_sequence(HM))
|
||||
M.dna.activate_mutation(HM)
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
@@ -90,123 +82,123 @@
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
remove_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
add_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (X-ray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
add_mutations = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-X-ray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
remove_mutations = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
remove_mutations = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
add_mutations = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
add_mutations = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
remove_mutations = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that awful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
remove_mutations = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
add_mutations = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
remove_mutations = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
add_mutations = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
add_mutations = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
remove_mutations = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure Tourette's."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
remove_mutations = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
add_mutations = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr."
|
||||
add_mutations_static = list(NERVOUS)
|
||||
add_mutations = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
remove_mutations = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
remove_mutations = list(SPACEMUT)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
add_mutations = list(SPACEMUT)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
add_mutations = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
remove_mutations = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
remove_mutations = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
add_mutations = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
@@ -215,100 +207,171 @@
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
add_mutations = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
remove_mutations = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
add_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
remove_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
remove_mutations = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
add_mutations = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
remove_mutations = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
add_mutations = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
remove_mutations = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
add_mutations = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
remove_mutations = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
add_mutations = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligiblemut
|
||||
name = "\improper DNA injector (Unintelligible)"
|
||||
add_mutations_static = list(UNINTELLIGIBLE)
|
||||
add_mutations = list(UNINTELLIGIBLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligible
|
||||
name = "\improper DNA injector (Anti-Unintelligible)"
|
||||
remove_mutations_static = list(UNINTELLIGIBLE)
|
||||
remove_mutations = list(UNINTELLIGIBLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
add_mutations = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
remove_mutations = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
add_mutations = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
remove_mutations = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
add_mutations = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
remove_mutations = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
add_mutations = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
remove_mutations = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/thermalmut
|
||||
name = "\improper DNA injector (Thermal Vision)"
|
||||
add_mutations = list(THERMAL)
|
||||
|
||||
/obj/item/dnainjector/antithermal
|
||||
name = "\improper DNA injector (Anti-Thermal Vision)"
|
||||
remove_mutations = list(THERMAL)
|
||||
|
||||
/obj/item/dnainjector/telepathymut
|
||||
name = "\improper DNA injector (Telepathy)"
|
||||
add_mutations = list(TELEPATHY)
|
||||
|
||||
/obj/item/dnainjector/antitelepathy
|
||||
name = "\improper DNA injector (Anti-Telepathy)"
|
||||
remove_mutations = list(TELEPATHY)
|
||||
|
||||
/obj/item/dnainjector/voidmut
|
||||
name = "\improper DNA injector (Void Magnet)"
|
||||
add_mutations = list(VOID)
|
||||
|
||||
/obj/item/dnainjector/antivoid
|
||||
name = "\improper DNA injector (Anti-Void Magnet)"
|
||||
remove_mutations = list(VOID)
|
||||
|
||||
/obj/item/dnainjector/firebreathmut
|
||||
name = "\improper DNA injector (Firebreath)"
|
||||
add_mutations = list(FIREBREATH)
|
||||
|
||||
/obj/item/dnainjector/antifirebreath
|
||||
name = "\improper DNA injector (Anti-Firebreath)"
|
||||
remove_mutations = list(FIREBREATH)
|
||||
|
||||
/obj/item/dnainjector/insulatedmut
|
||||
name = "\improper DNA injector (Insulated)"
|
||||
add_mutations = list(INSULATED)
|
||||
|
||||
/obj/item/dnainjector/antiinsulated
|
||||
name = "\improper DNA injector (Anti-Insulated)"
|
||||
remove_mutations = list(INSULATED)
|
||||
|
||||
/obj/item/dnainjector/shocktouchmut
|
||||
name = "\improper DNA injector (Shock Touch)"
|
||||
add_mutations = list(SHOCKTOUCH)
|
||||
|
||||
/obj/item/dnainjector/antishocktouch
|
||||
name = "\improper DNA injector (Anti-Shock Touch)"
|
||||
remove_mutations = list(SHOCKTOUCH)
|
||||
|
||||
/obj/item/dnainjector/antenna
|
||||
name = "\improper DNA injector (Antenna)"
|
||||
add_mutations = list(ANTENNA)
|
||||
|
||||
/obj/item/dnainjector/antiantenna
|
||||
name = "\improper DNA injector (Anti-Antenna)"
|
||||
remove_mutations = list(ANTENNA)
|
||||
|
||||
/obj/item/dnainjector/paranoia
|
||||
name = "\improper DNA injector (Paranoia)"
|
||||
add_mutations = list(PARANOIA)
|
||||
|
||||
/obj/item/dnainjector/antiparanoia
|
||||
name = "\improper DNA injector (Anti-Paranoia)"
|
||||
remove_mutations = list(PARANOIA)
|
||||
|
||||
/obj/item/dnainjector/mindread
|
||||
name = "\improper DNA injector (Mindread)"
|
||||
add_mutations = list(MINDREAD)
|
||||
|
||||
/obj/item/dnainjector/antimindread
|
||||
name = "\improper DNA injector (Anti-Mindread)"
|
||||
remove_mutations = list(MINDREAD)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
@@ -317,23 +380,22 @@
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
for(var/mutation in remove_mutations)
|
||||
if(mutation == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
M = M.dna.remove_mutation(mutation)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
M.dna.remove_mutation(mutation)
|
||||
for(var/mutation in add_mutations)
|
||||
if(M.dna.get_mutation(mutation))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
if(mutation == RACEMUT && ishuman(M))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
M = M.dna.add_mutation(mutation, MUT_OTHER, endtime)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
M.dna.add_mutation(mutation, MUT_OTHER, endtime)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
@@ -361,9 +423,41 @@
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
add_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
add_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/activator
|
||||
name = "\improper DNA activator"
|
||||
desc = "Activates the current mutation on injection, if the subject has it."
|
||||
var/doitanyway = FALSE
|
||||
var/research = FALSE //Set to true to get expended and filled injectors for chromosomes
|
||||
var/filled = FALSE
|
||||
|
||||
/obj/item/dnainjector/activator/inject(mob/living/carbon/M, mob/user)
|
||||
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M,TRAIT_NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/mutation in add_mutations)
|
||||
var/datum/mutation/human/HM = mutation
|
||||
if(istype(HM, /datum/mutation/human))
|
||||
mutation = HM.type
|
||||
if(!M.dna.activate_mutation(HM))
|
||||
if(!doitanyway)
|
||||
log_msg += "(FAILED)"
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
name = "expended [name]"
|
||||
else if(research && M.client)
|
||||
filled = TRUE
|
||||
name = "filled [name]"
|
||||
else
|
||||
name = "expended [name]"
|
||||
log_msg += "([mutation])"
|
||||
log_attack("[log_msg] [loc_name(user)]")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
grind_results = list("silicon" = 20)
|
||||
point_value = 1
|
||||
tableVariant = /obj/structure/table/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to slice [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
@@ -232,6 +232,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
|
||||
grind_results = list("silver" = 20)
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/silver
|
||||
tableVariant = /obj/structure/table/optable
|
||||
|
||||
GLOBAL_LIST_INIT(silver_recipes, list ( \
|
||||
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
|
||||
|
||||
@@ -107,6 +107,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
merge_type = /obj/item/stack/sheet/metal
|
||||
grind_results = list("iron" = 20)
|
||||
point_value = 2
|
||||
tableVariant = /obj/structure/table
|
||||
|
||||
/obj/item/stack/sheet/metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
@@ -168,6 +169,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
merge_type = /obj/item/stack/sheet/plasteel
|
||||
grind_results = list("iron" = 20, "plasma" = 20)
|
||||
point_value = 23
|
||||
tableVariant = /obj/structure/table/reinforced
|
||||
|
||||
/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plasteel_recipes
|
||||
@@ -474,6 +476,7 @@ GLOBAL_LIST_INIT(brass_recipes, list ( \
|
||||
novariants = FALSE
|
||||
grind_results = list("iron" = 5, "teslium" = 15, "holyoil" = 1)
|
||||
merge_type = /obj/item/stack/tile/brass
|
||||
tableVariant = /obj/structure/table/reinforced/brass
|
||||
|
||||
/obj/item/stack/tile/brass/narsie_act()
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
@@ -526,6 +529,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
novariants = FALSE
|
||||
grind_results = list("iron" = 5, "copper" = 3) //we have no "tin" reagent so this is the closest thing
|
||||
merge_type = /obj/item/stack/tile/bronze
|
||||
tableVariant = /obj/structure/table/bronze
|
||||
|
||||
/obj/item/stack/tile/bronze/attack_self(mob/living/user)
|
||||
if(is_servant_of_ratvar(user)) //still lets them build with it, just gives a message
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
var/full_w_class = WEIGHT_CLASS_NORMAL //The weight class the stack should have at amount > 2/3rds max_amount
|
||||
var/novariants = TRUE //Determines whether the item should update it's sprites based on amount.
|
||||
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
|
||||
var/obj/structure/table/tableVariant // we tables now (stores table variant to be built from this stack)
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
|
||||
@@ -99,34 +99,118 @@
|
||||
icon_state = "tile-carpet"
|
||||
turf_type = /turf/open/floor/carpet
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/stack/tile/carpet/fifty
|
||||
amount = 50
|
||||
tableVariant = /obj/structure/table/wood/fancy
|
||||
|
||||
/obj/item/stack/tile/carpet/black
|
||||
name = "black carpet"
|
||||
icon_state = "tile-carpet-black"
|
||||
turf_type = /turf/open/floor/carpet/black
|
||||
tableVariant = /obj/structure/table/wood/fancy/black
|
||||
|
||||
/obj/item/stack/tile/carpet/blackred
|
||||
name = "red carpet"
|
||||
icon_state = "tile-carpet-blackred"
|
||||
turf_type = /turf/open/floor/carpet/blackred
|
||||
tableVariant = /obj/structure/table/wood/fancy/blackred
|
||||
|
||||
/obj/item/stack/tile/carpet/monochrome
|
||||
name = "monochrome carpet"
|
||||
icon_state = "tile-carpet-monochrome"
|
||||
turf_type = /turf/open/floor/carpet/monochrome
|
||||
tableVariant = /obj/structure/table/wood/fancy/monochrome
|
||||
|
||||
/obj/item/stack/tile/carpet/blue
|
||||
name = "blue carpet"
|
||||
icon_state = "tile-carpet-blue"
|
||||
item_state = "tile-carpet-blue"
|
||||
turf_type = /turf/open/floor/carpet/blue
|
||||
tableVariant = /obj/structure/table/wood/fancy/blue
|
||||
|
||||
/obj/item/stack/tile/carpet/cyan
|
||||
name = "cyan carpet"
|
||||
icon_state = "tile-carpet-cyan"
|
||||
item_state = "tile-carpet-cyan"
|
||||
turf_type = /turf/open/floor/carpet/cyan
|
||||
tableVariant = /obj/structure/table/wood/fancy/cyan
|
||||
|
||||
/obj/item/stack/tile/carpet/green
|
||||
name = "green carpet"
|
||||
icon_state = "tile-carpet-green"
|
||||
item_state = "tile-carpet-green"
|
||||
turf_type = /turf/open/floor/carpet/green
|
||||
tableVariant = /obj/structure/table/wood/fancy/green
|
||||
|
||||
/obj/item/stack/tile/carpet/orange
|
||||
name = "orange carpet"
|
||||
icon_state = "tile-carpet-orange"
|
||||
item_state = "tile-carpet-orange"
|
||||
turf_type = /turf/open/floor/carpet/orange
|
||||
tableVariant = /obj/structure/table/wood/fancy/orange
|
||||
|
||||
/obj/item/stack/tile/carpet/purple
|
||||
name = "purple carpet"
|
||||
icon_state = "tile-carpet-purple"
|
||||
item_state = "tile-carpet-purple"
|
||||
turf_type = /turf/open/floor/carpet/purple
|
||||
tableVariant = /obj/structure/table/wood/fancy/purple
|
||||
|
||||
/obj/item/stack/tile/carpet/red
|
||||
name = "red carpet"
|
||||
icon_state = "tile-carpet-red"
|
||||
item_state = "tile-carpet-red"
|
||||
turf_type = /turf/open/floor/carpet/red
|
||||
tableVariant = /obj/structure/table/wood/fancy/red
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblack
|
||||
name = "royal black carpet"
|
||||
icon_state = "tile-carpet-royalblack"
|
||||
item_state = "tile-carpet-royalblack"
|
||||
turf_type = /turf/open/floor/carpet/royalblack
|
||||
tableVariant = /obj/structure/table/wood/fancy/royalblack
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblue
|
||||
name = "royal blue carpet"
|
||||
icon_state = "tile-carpet-royalblue"
|
||||
item_state = "tile-carpet-royalblue"
|
||||
turf_type = /turf/open/floor/carpet/royalblue
|
||||
tableVariant = /obj/structure/table/wood/fancy/royalblue
|
||||
|
||||
/obj/item/stack/tile/carpet/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/black/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/blackred
|
||||
name = "red carpet"
|
||||
icon_state = "tile-carpet-blackred"
|
||||
turf_type = /turf/open/floor/carpet/blackred
|
||||
|
||||
/obj/item/stack/tile/carpet/blackred/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/monochrome
|
||||
name = "monochrome carpet"
|
||||
icon_state = "tile-carpet-monochrome"
|
||||
turf_type = /turf/open/floor/carpet/monochrome
|
||||
|
||||
/obj/item/stack/tile/carpet/monochrome/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/blue/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/cyan/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/green/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/orange/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/purple/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/red/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblack/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblue/fifty
|
||||
amount = 50
|
||||
|
||||
/obj/item/stack/tile/fakespace
|
||||
name = "astral carpet"
|
||||
singular_name = "astral carpet"
|
||||
|
||||
@@ -22,84 +22,22 @@
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
if(I.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 30))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one plasteel sheet to do this!</span>")
|
||||
return
|
||||
|
||||
var/obj/item/stack/material = I
|
||||
if (istype(I, /obj/item/stack) && material?.tableVariant)
|
||||
if(material.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [P] to [src]...</span>")
|
||||
if(do_after(user, 50, target = src) && P.use(1))
|
||||
make_new_table(/obj/structure/table/reinforced)
|
||||
else if(istype(I, /obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = I
|
||||
if(M.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one metal sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [M] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && M.use(1))
|
||||
make_new_table(/obj/structure/table)
|
||||
else if(istype(I, /obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/glass/G = I
|
||||
if(G.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one glass sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [G] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && G.use(1))
|
||||
make_new_table(/obj/structure/table/glass)
|
||||
else if(istype(I, /obj/item/stack/sheet/mineral/silver))
|
||||
var/obj/item/stack/sheet/mineral/silver/S = I
|
||||
if(S.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one silver sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [S] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && S.use(1))
|
||||
make_new_table(/obj/structure/table/optable)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet/black))
|
||||
var/obj/item/stack/tile/carpet/black/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one black carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy/black)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet/blackred))
|
||||
var/obj/item/stack/tile/carpet/blackred/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one red carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy/blackred)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet/monochrome))
|
||||
var/obj/item/stack/tile/carpet/monochrome/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one monochrome carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy/monochrome)
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/fancy)
|
||||
else if(istype(I, /obj/item/stack/tile/bronze))
|
||||
var/obj/item/stack/tile/bronze/B = I
|
||||
if(B.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one bronze sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [B] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && B.use(1))
|
||||
make_new_table(/obj/structure/table/bronze)
|
||||
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && material.use(1))
|
||||
make_new_table(material.tableVariant)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -135,23 +73,21 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
||||
var/obj/item/stack/sheet/mineral/wood/W = I
|
||||
if(W.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one wood sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [W] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && W.use(1))
|
||||
make_new_table(/obj/structure/table/wood)
|
||||
return
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
var/obj/item/stack/tile/carpet/C = I
|
||||
if(C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one carpet sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [C] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && C.use(1))
|
||||
make_new_table(/obj/structure/table/wood/poker)
|
||||
if (istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/material = I
|
||||
var/toConstruct // stores the table variant
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
||||
toConstruct = /obj/structure/table/wood
|
||||
else if(istype(I, /obj/item/stack/tile/carpet))
|
||||
toConstruct = /obj/structure/table/wood/poker
|
||||
|
||||
if (toConstruct)
|
||||
if(material.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
|
||||
if(do_after(user, 20, target = src) && material.use(1))
|
||||
make_new_table(toConstruct)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
log_combat(user, pushed_mob, "placed")
|
||||
|
||||
/obj/structure/table/proc/tablepush(mob/living/user, mob/living/pushed_mob)
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='danger'>Throwing [pushed_mob] onto the table might hurt them!</span>")
|
||||
return
|
||||
var/added_passtable = FALSE
|
||||
if(!pushed_mob.pass_flags & PASSTABLE)
|
||||
added_passtable = TRUE
|
||||
@@ -125,14 +128,25 @@
|
||||
if(pushed_mob.loc != loc) //Something prevented the tabling
|
||||
return
|
||||
pushed_mob.Knockdown(40)
|
||||
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
|
||||
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
|
||||
log_combat(user, pushed_mob, "pushed")
|
||||
pushed_mob.visible_message("<span class='danger'>[user] slams [pushed_mob] onto [src]!</span>", \
|
||||
"<span class='userdanger'>[user] slams you onto [src]!</span>")
|
||||
log_combat(user, pushed_mob, "tabled", null, "onto [src]")
|
||||
if(!ishuman(pushed_mob))
|
||||
return
|
||||
var/mob/living/carbon/human/H = pushed_mob
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
|
||||
|
||||
/* You don't shove people onto a table frame.
|
||||
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
|
||||
if(!target.resting)
|
||||
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
|
||||
user.visible_message("<span class='danger'>[user.name] shoves [target.name] onto \the [src]!</span>",
|
||||
"<span class='danger'>You shove [target.name] onto \the [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.forceMove(src.loc)
|
||||
log_combat(user, target, "shoved", "onto [src] (table)")
|
||||
return TRUE
|
||||
*/
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
@@ -258,6 +272,52 @@
|
||||
for(var/obj/item/shard/S in debris)
|
||||
S.color = NARSIE_WINDOW_COLOUR
|
||||
|
||||
/*
|
||||
* Plasmaglass tables
|
||||
*/
|
||||
/obj/structure/table/plasmaglass
|
||||
name = "plasmaglass table"
|
||||
desc = "A glasstable, but it's pink and more sturdy. What will Nanotrasen design next with plasma?"
|
||||
icon = 'icons/obj/smooth_structures/plasmaglass_table.dmi'
|
||||
icon_state = "plasmaglass_table"
|
||||
climbable = TRUE
|
||||
buildstack = /obj/item/stack/sheet/plasmaglass
|
||||
canSmoothWith = null
|
||||
max_integrity = 270
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 10, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
var/list/debris = list()
|
||||
|
||||
/obj/structure/table/plasmaglass/New()
|
||||
. = ..()
|
||||
debris += new frame
|
||||
|
||||
/obj/structure/table/plasmaglass/Destroy()
|
||||
QDEL_LIST(debris)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/table/plasmaglass/proc/check_break(mob/living/M)
|
||||
return
|
||||
|
||||
/obj/structure/table/plasmaglass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(disassembled)
|
||||
..()
|
||||
return
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
playsound(T, "shatter", 50, 1)
|
||||
for(var/X in debris)
|
||||
var/atom/movable/AM = X
|
||||
AM.forceMove(T)
|
||||
debris -= AM
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/plasmaglass/narsie_act()
|
||||
color = NARSIE_WINDOW_COLOUR
|
||||
for(var/obj/item/shard/S in debris)
|
||||
S.color = NARSIE_WINDOW_COLOUR
|
||||
|
||||
/*
|
||||
* Wooden tables
|
||||
*/
|
||||
@@ -298,44 +358,83 @@
|
||||
frame = /obj/structure/table_frame
|
||||
framestack = /obj/item/stack/rods
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black, /obj/structure/table/wood/fancy/blackred, /obj/structure/table/wood/fancy/monochrome)
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy,
|
||||
/obj/structure/table/wood/fancy/black,
|
||||
/obj/structure/table/wood/fancy/blackred,
|
||||
/obj/structure/table/wood/fancy/monochrome,
|
||||
/obj/structure/table/wood/fancy/blue,
|
||||
/obj/structure/table/wood/fancy/cyan,
|
||||
/obj/structure/table/wood/fancy/green,
|
||||
/obj/structure/table/wood/fancy/orange,
|
||||
/obj/structure/table/wood/fancy/purple,
|
||||
/obj/structure/table/wood/fancy/red,
|
||||
/obj/structure/table/wood/fancy/royalblack,
|
||||
/obj/structure/table/wood/fancy/royalblue)
|
||||
var/smooth_icon = 'icons/obj/smooth_structures/fancy_table.dmi' // see Initialize()
|
||||
|
||||
/obj/structure/table/wood/fancy/New()
|
||||
// New() is used so that the /black subtype can override `icon` easily and
|
||||
// the correct value will be used by the smoothing subsystem.
|
||||
/obj/structure/table/wood/fancy/Initialize()
|
||||
. = ..()
|
||||
// Needs to be set dynamically because table smooth sprites are 32x34,
|
||||
// which the editor treats as a two-tile-tall object. The sprites are that
|
||||
// size so that the north/south corners look nice - examine the detail on
|
||||
// the sprites in the editor to see why.
|
||||
icon = 'icons/obj/smooth_structures/fancy_table.dmi'
|
||||
icon = smooth_icon
|
||||
|
||||
/obj/structure/table/wood/fancy/black
|
||||
icon_state = "fancy_table_black"
|
||||
buildstack = /obj/item/stack/tile/carpet/black
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/blackred
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "fancy_table_blackred"
|
||||
buildstack = /obj/item/stack/tile/carpet/blackred
|
||||
|
||||
/obj/structure/table/wood/fancy/blackred/New()
|
||||
. = ..()
|
||||
icon = 'icons/obj/smooth_structures/fancy_table_blackred.dmi'
|
||||
icon_state = "fancy_table_blackred"
|
||||
buildstack = /obj/item/stack/tile/carpet/blackred
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_blackred.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/monochrome
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "fancy_table_monochrome"
|
||||
buildstack = /obj/item/stack/tile/carpet/monochrome
|
||||
icon_state = "fancy_table_monochrome"
|
||||
buildstack = /obj/item/stack/tile/carpet/monochrome
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_monochrome.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/monochrome/New()
|
||||
. = ..()
|
||||
icon = 'icons/obj/smooth_structures/fancy_table_monochrome.dmi'
|
||||
/obj/structure/table/wood/fancy/blue
|
||||
icon_state = "fancy_table_blue"
|
||||
buildstack = /obj/item/stack/tile/carpet/blue
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_blue.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/cyan
|
||||
icon_state = "fancy_table_cyan"
|
||||
buildstack = /obj/item/stack/tile/carpet/cyan
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_cyan.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/green
|
||||
icon_state = "fancy_table_green"
|
||||
buildstack = /obj/item/stack/tile/carpet/green
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_green.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/orange
|
||||
icon_state = "fancy_table_orange"
|
||||
buildstack = /obj/item/stack/tile/carpet/orange
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_orange.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/purple
|
||||
icon_state = "fancy_table_purple"
|
||||
buildstack = /obj/item/stack/tile/carpet/purple
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_purple.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/red
|
||||
icon_state = "fancy_table_red"
|
||||
buildstack = /obj/item/stack/tile/carpet/red
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_red.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/royalblack
|
||||
icon_state = "fancy_table_royalblack"
|
||||
buildstack = /obj/item/stack/tile/carpet/royalblack
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblack.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/royalblue
|
||||
icon_state = "fancy_table_royalblue"
|
||||
buildstack = /obj/item/stack/tile/carpet/royalblue
|
||||
smooth_icon = 'icons/obj/smooth_structures/fancy_table_royalblue.dmi'
|
||||
|
||||
/obj/structure/table/wood/fancy/black/New()
|
||||
. = ..()
|
||||
// Ditto above.
|
||||
icon = 'icons/obj/smooth_structures/fancy_table_black.dmi'
|
||||
/*
|
||||
* Reinforced tables
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user