Life refactor (#13471)

* Life Refactor WIP

* part 2

* part 3

* runtime fix

* newlines

* tweaks

* perspective checks

* fixes

* remote view tweaks

* more fixes

* robot fixes

* better updating

* cleaned up icon procs

* less proc call overhead

* performance gains

* more optimization

* shorter lists, removal of unecesary code

* gene OOP and dna styling cleanup

* oops

* axe disabilities

* typeless loop

* various tweaks and fixes

* brain checks

* runtime fixes

* cryo vision fixes
This commit is contained in:
Fox McCloud
2020-06-03 19:43:30 -06:00
committed by GitHub
parent 5d824a9c62
commit 70b46d8aea
183 changed files with 1943 additions and 2286 deletions
+4
View File
@@ -343,3 +343,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics/update_remote_sight(mob/user)
user.sight |= (SEE_TURFS|BLIND)
. = ..()
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
/obj/machinery/atmospherics/proc/can_see_pipes()
return TRUE
+53 -70
View File
@@ -24,78 +24,61 @@
///////////////////////////////////////
// MUTATIONS
///////////////////////////////////////
// Generic mutations:
#define TK 1
#define COLDRES 2
#define XRAY 3
#define HULK 4
#define CLUMSY 5
#define FAT 6
#define HUSK 7
#define NOCLONE 8
// Extra powers:
#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes
//species mutation
#define WINGDINGS 10 // Ayy lmao
//2spooky
#define SKELETON 29
#define PLANT 30
// Other Mutations:
#define BREATHLESS 100 // no breathing
#define REMOTE_VIEW 101 // remote viewing
#define REGEN 102 // health regen
#define RUN 103 // no slowdown
#define REMOTE_TALK 104 // remote talking
#define MORPH 105 // changing appearance
#define HEATRES 106 // heat resistance
#define HALLUCINATE 107 // hallucinations
#define FINGERPRINTS 108 // no fingerprints
#define NO_SHOCK 109 // insulated hands
#define DWARF 110 // table climbing
// Goon muts
#define OBESITY 200 // Decreased metabolism
// 201 undefined
#define STRONG 202 // (Nothing)
#define SOBER 203 // Increased alcohol metabolism
#define PSY_RESIST 204 // Block remoteview
// 205 undefined
#define EMPATH 206 //Read minds
#define COMIC 207 //Comic Sans
// /vg/ muts
#define LOUD 208 // CAUSES INTENSE YELLING
#define DIZZY 210 // Trippy.
#define LISP 300
#define RADIOACTIVE 301
#define CHAV 302
#define SWEDISH 303
#define SCRAMBLED 304
#define HORNS 305
#define IMMOLATE 306
#define CLOAK 307
#define CHAMELEON 308
#define CRYO 309
#define EATER 310
#define JUMPY 400
#define POLYMORPH 401
#define TK "telekenesis"
#define COLDRES "cold_resistance"
#define XRAY "xray"
#define HULK "hulk"
#define CLUMSY "clumsy"
#define FAT "fat"
#define HUSK "husk"
#define NOCLONE "noclone"
#define LASER "eyelaser" // harm intent - click anywhere to shoot lasers from eyes
#define WINGDINGS "wingdings" // Ayy lmao
#define SKELETON "skeleton"
#define BREATHLESS "breathless" // no breathing
#define REMOTE_VIEW "remove_view" // remote viewing
#define REGEN "regeneration" // health regen
#define RUN "increased_run" // no slowdown
#define REMOTE_TALK "remote_talk" // remote talking
#define MORPH "morph" // changing appearance
#define HEATRES "heat_resistance" // heat resistance
#define HALLUCINATE "hallucinate" // hallucinations
#define FINGERPRINTS "no_prints" // no fingerprints
#define NO_SHOCK "no_shock" // insulated hands
#define DWARF "dwarf" // table climbing
#define OBESITY "obesity" // Decreased metabolism
#define STRONG "strong" // (Nothing)
#define SOBER "sober" // Increased alcohol metabolism
#define PSY_RESIST "psy_resist" // Block remoteview
#define EMPATH "empathy" //Read minds
#define COMIC "comic_sans" //Comic Sans
#define LOUD "loudness" // CAUSES INTENSE YELLING
#define DIZZY "dizzy" // Trippy.
#define LISP "lisp"
#define RADIOACTIVE "radioactive"
#define CHAV "chav"
#define SWEDISH "swedish"
#define SCRAMBLED "scrambled"
#define HORNS "horns"
#define IMMOLATE "immolate"
#define CLOAK "cloak"
#define CHAMELEON "chameleon"
#define CRYO "cryokinesis"
#define EATER "matter_eater"
#define JUMPY "jumpy"
#define POLYMORPH "polymorph"
//disabilities
#define NEARSIGHTED 1
#define EPILEPSY 2
#define COUGHING 4
#define TOURETTES 8
#define NERVOUS 16
#define BLIND 32
#define COLOURBLIND 64
#define MUTE 128
#define DEAF 256
#define NEARSIGHTED "nearsighted"
#define EPILEPSY "epilepsy"
#define COUGHING "coughing"
#define TOURETTES "tourettes"
#define NERVOUS "nervous"
#define BLINDNESS "blind"
#define COLOURBLIND "colorblind"
#define MUTE "mute"
#define DEAF "deaf"
//Nutrition levels for humans. No idea where else to put it
#define NUTRITION_LEVEL_FAT 600
+1 -1
View File
@@ -408,7 +408,7 @@
/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon)
var/area/our_area = get_area(the_area)
for(var/C in GLOB.living_mob_list)
for(var/C in GLOB.alive_mob_list)
if(!istype(C, check_type))
continue
if(C == must_be_alone)
+1 -1
View File
@@ -320,7 +320,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//When a borg is activated, it can choose which AI it wants to be slaved to
/proc/active_ais()
. = list()
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
+21 -20
View File
@@ -3,30 +3,31 @@ GLOBAL_LIST_EMPTY(all_species)
GLOBAL_LIST_EMPTY(all_languages)
GLOBAL_LIST_EMPTY(language_keys) // Table of say codes for all languages
GLOBAL_LIST_EMPTY(all_superheroes)
GLOBAL_LIST_INIT(whitelisted_species, list())
GLOBAL_LIST_EMPTY(whitelisted_species)
GLOBAL_LIST_INIT(clients, list()) //list of all clients
GLOBAL_LIST_INIT(admins, list()) //list of all clients whom are admins
GLOBAL_LIST_INIT(deadmins, list()) //list of all clients who have used the de-admin verb.
GLOBAL_LIST_INIT(directory, list()) //list of all ckeys with associated client
GLOBAL_LIST_INIT(stealthminID, list()) //reference list with IDs that store ckeys, for stealthmins
GLOBAL_LIST_EMPTY(clients) //list of all clients
GLOBAL_LIST_EMPTY(admins) //list of all clients whom are admins
GLOBAL_LIST_EMPTY(deadmins) //list of all clients who have used the de-admin verb.
GLOBAL_LIST_EMPTY(directory) //list of all ckeys with associated client
GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
GLOBAL_LIST_INIT(player_list, list()) //List of all mobs **with clients attached**. Excludes /mob/new_player
GLOBAL_LIST_INIT(mob_list, list()) //List of all mobs, including clientless
GLOBAL_LIST_INIT(silicon_mob_list, list()) //List of all silicon mobs, including clientless
GLOBAL_LIST_INIT(spirits, list()) //List of all the spirits, including Masks
GLOBAL_LIST_INIT(living_mob_list, list()) //List of all alive mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_INIT(dead_mob_list, list()) //List of all dead mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_INIT(respawnable_list, list()) //List of all mobs, dead or in mindless creatures that still be respawned.
GLOBAL_LIST_INIT(non_respawnable_keys, list()) //List of ckeys that are excluded from respawning for remainder of round.
GLOBAL_LIST_EMPTY(player_list) //List of all mobs **with clients attached**. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(mob_list) //List of all mobs, including clientless
GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clientless
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
GLOBAL_LIST_EMPTY(spirits) //List of all the spirits, including Masks
GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(respawnable_list) //List of all mobs, dead or in mindless creatures that still be respawned.
GLOBAL_LIST_EMPTY(non_respawnable_keys) //List of ckeys that are excluded from respawning for remainder of round.
GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless
GLOBAL_LIST_INIT(bots_list, list()) //List of all bots(beepsky, medibots,etc)
GLOBAL_LIST_EMPTY(bots_list) //List of all bots(beepsky, medibots,etc)
GLOBAL_LIST_INIT(med_hud_users, list())
GLOBAL_LIST_INIT(sec_hud_users, list())
GLOBAL_LIST_INIT(antag_hud_users, list())
GLOBAL_LIST_INIT(surgeries_list, list())
GLOBAL_LIST_INIT(hear_radio_list, list()) //Mobs that hear the radio even if there's no client
GLOBAL_LIST_EMPTY(med_hud_users)
GLOBAL_LIST_EMPTY(sec_hud_users)
GLOBAL_LIST_EMPTY(antag_hud_users)
GLOBAL_LIST_EMPTY(surgeries_list)
GLOBAL_LIST_EMPTY(hear_radio_list) //Mobs that hear the radio even if there's no client
+8 -2
View File
@@ -134,9 +134,9 @@
if(W == A)
W.attack_self(src)
if(hand)
update_inv_l_hand(0)
update_inv_l_hand()
else
update_inv_r_hand(0)
update_inv_r_hand()
return
// operate three levels deep here (item in backpack in src; item in box in backpack in src, not any deeper)
@@ -258,6 +258,9 @@
Makes the mob face the direction of the clicked thing
*/
/mob/proc/MiddleShiftClickOn(atom/A)
return
/mob/living/MiddleShiftClickOn(atom/A)
if(incapacitated())
return
var/face_dir = get_cardinal_dir(src, A)
@@ -273,6 +276,9 @@
Makes the mob constantly face the object (until it's out of sight)
*/
/mob/proc/MiddleShiftControlClickOn(atom/A)
return
/mob/living/MiddleShiftControlClickOn(atom/A)
var/face_uid = A.UID()
if(forced_look == face_uid || A == src)
forced_look = null
+4
View File
@@ -3,6 +3,10 @@
/datum/hud/simple_animal/New(mob/user)
..()
mymob.healths = new /obj/screen/healths()
infodisplay += mymob.healths
var/obj/screen/using
using = new /obj/screen/act_intent/simple_animal()
using.icon_state = mymob.a_intent
+3 -3
View File
@@ -371,15 +371,15 @@
return 1
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return 1
if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
if(inv_item)
return inv_item.Click(location, control, params)
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand(0)
usr.update_inv_r_hand(0)
usr.update_inv_l_hand()
usr.update_inv_r_hand()
return 1
/obj/screen/inventory/hand
+1 -1
View File
@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(afk)
/datum/controller/subsystem/afk/fire()
var/list/toRemove = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(!H.ckey) // Useless non ckey creatures
continue
+3 -2
View File
@@ -497,13 +497,14 @@ SUBSYSTEM_DEF(jobs)
job.after_spawn(H)
//Gives glasses to the vision impaired
if(H.disabilities & DISABILITY_FLAG_NEARSIGHTED)
if(NEARSIGHTED in H.mutations)
var/equipped = H.equip_to_slot_or_del(new /obj/item/clothing/glasses/regular(H), slot_glasses)
if(equipped != 1)
var/obj/item/clothing/glasses/G = H.glasses
if(istype(G) && !G.prescription)
G.prescription = 1
G.prescription = TRUE
G.name = "prescription [G.name]"
H.update_nearsighted_effects()
return H
+6 -6
View File
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(mobs)
var/static/list/cubemonkeys = list()
/datum/controller/subsystem/mobs/stat_entry()
..("P:[GLOB.mob_list.len]")
..("P:[GLOB.mob_living_list.len]")
/datum/controller/subsystem/mobs/Initialize(start_timeofday)
clients_by_zlevel = new /list(world.maxz,0)
@@ -21,17 +21,17 @@ SUBSYSTEM_DEF(mobs)
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if(!resumed)
src.currentrun = GLOB.mob_list.Copy()
src.currentrun = GLOB.mob_living_list.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
var/times_fired = src.times_fired
while(currentrun.len)
var/mob/M = currentrun[currentrun.len]
var/mob/living/L = currentrun[currentrun.len]
currentrun.len--
if(M)
M.Life(seconds, times_fired)
if(L)
L.Life(seconds, times_fired)
else
GLOB.mob_list.Remove(M)
GLOB.mob_living_list.Remove(L)
if(MC_TICK_CHECK)
return
+1 -1
View File
@@ -20,7 +20,7 @@ SUBSYSTEM_DEF(weather)
var/datum/weather/W = V
if(W.aesthetic || W.stage != MAIN_STAGE)
continue
for(var/i in GLOB.living_mob_list)
for(var/i in GLOB.mob_living_list)
var/mob/living/L = i
if(W.can_weather_act(L))
W.weather_act(L)
+1 -1
View File
@@ -396,7 +396,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
for(var/datum/disease/advance/AD in GLOB.active_diseases)
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!is_station_level(H.z))
continue
if(!H.HasDisease(D))
@@ -33,7 +33,7 @@ Bonus
if(3, 4)
to_chat(M, "<span class='warning'>[pick("You hear a ringing in your ear.", "Your ears pop.")]</span>")
if(5)
if(!(M.disabilities & DEAF))
if(!(DEAF in M.mutations))
to_chat(M, "<span class='userdanger'>Your ears pop and begin ringing loudly!</span>")
M.BecomeDeaf()
spawn(200)
@@ -35,7 +35,7 @@ BONUS
switch(A.stage)
if(5)
H.s_tone = -85
H.update_body(0)
H.update_body()
else
H.visible_message("<span class='warning'>[H] looks a bit pale...</span>", "<span class='notice'>Your skin suddenly appears lighter...</span>")
@@ -79,7 +79,7 @@ BONUS
switch(A.stage)
if(5)
H.s_tone = 85
H.update_body(0)
H.update_body()
else
H.visible_message("<span class='warning'>[H] looks a bit dark...</span>", "<span class='notice'>Your skin suddenly appears darker...</span>")
-1
View File
@@ -148,7 +148,6 @@
eye.eye_user = user
eye.name = "Camera Eye ([user.name])"
user.remote_control = eye
user.remote_view = 1
user.reset_perspective(eye)
eye.setLoc(get_turf(H))
+2 -2
View File
@@ -1688,7 +1688,7 @@
if(H.w_uniform)
jumpsuit = H.w_uniform
jumpsuit.color = team_color
H.update_inv_w_uniform(0,0)
H.update_inv_w_uniform()
add_attack_logs(missionary, current, "Converted to a zealot for [convert_duration/600] minutes")
addtimer(CALLBACK(src, .proc/remove_zealot, jumpsuit), convert_duration) //deconverts after the timer expires
@@ -1705,7 +1705,7 @@
jumpsuit.color = initial(jumpsuit.color) //reset the jumpsuit no matter where our mind is
if(ishuman(current)) //but only try updating us if we are still a human type since it is a human proc
var/mob/living/carbon/human/H = current
H.update_inv_w_uniform(0,0)
H.update_inv_w_uniform()
to_chat(current, "<span class='warning'><b>You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.</b></span>")
to_chat(current, "<span class='warning'><b>This means you don't remember who you were working for or what you were doing.</b></span>")
+6 -6
View File
@@ -36,10 +36,10 @@
unEquip(gloves, 1)
if(!istype(wear_mask, /obj/item/clothing/mask/cursedclown)) //Infinite loops otherwise
unEquip(wear_mask, 1)
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/under/cursedclown, slot_w_uniform, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/gloves/cursedclown, slot_gloves, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/mask/cursedclown, slot_wear_mask, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/cursedclown, slot_shoes, TRUE, TRUE)
/mob/living/carbon/human/proc/makeAntiCluwne()
to_chat(src, "<span class='danger'>You don't feel very funny.</span>")
@@ -83,5 +83,5 @@
unEquip(gloves, 1)
qdel(G)
equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, 1, 1, 1)
equip_to_slot_if_possible(new /obj/item/clothing/under/lawyer/black, slot_w_uniform, TRUE, TRUE)
equip_to_slot_if_possible(new /obj/item/clothing/shoes/black, slot_shoes, TRUE, TRUE)
-1
View File
@@ -142,7 +142,6 @@
return 0
fakefire()
forceMove(get_turf(src))
reset_perspective()
visible_message("<span class='warning'><B>[src] appears in a firey blaze!</B></span>")
playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1)
spawn(15)
-5
View File
@@ -2,7 +2,6 @@
name = "Genetic"
desc = "This spell inflicts a set of mutations and disabilities upon the target."
var/disabilities = 0 //bits
var/list/mutations = list() //mutation strings
var/duration = 100 //deciseconds
/*
@@ -20,16 +19,12 @@
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
/* if(x == HULK && ishuman(target))
target:hulk_time=world.time + duration */
target.disabilities |= disabilities
target.update_mutations() //update target's mutation overlays
var/mob/living/carbon/human/H = target
if(ishuman(target))
H.update_body()
spawn(duration)
target.mutations.Remove(mutations)
target.disabilities &= ~disabilities
target.update_mutations()
if(ishuman(target))
H.update_body()
+1 -1
View File
@@ -43,6 +43,6 @@
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE)
target.flash_eyes()
+4 -4
View File
@@ -104,12 +104,12 @@
if(target.hand) //left active hand
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, 0, 1, 1))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, 0, 1, 1))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, FALSE, TRUE))
butterfingers = 1
else //right active hand
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, 0, 1, 1))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, 0, 1, 1))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_r_hand, FALSE, TRUE))
if(!target.equip_to_slot_if_possible(item_to_retrieve, slot_l_hand, FALSE, TRUE))
butterfingers = 1
if(butterfingers)
item_to_retrieve.loc = target.loc
+4 -4
View File
@@ -27,12 +27,12 @@
var/hand_handled = 1
attached_hand = new hand_path(src)
if(user.hand) //left active hand
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
hand_handled = 0
else //right active hand
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, 0, 1, 1))
if(!user.equip_to_slot_if_possible(attached_hand, slot_r_hand, FALSE, TRUE))
if(!user.equip_to_slot_if_possible(attached_hand, slot_l_hand, FALSE, TRUE))
hand_handled = 0
if(!hand_handled)
qdel(attached_hand)
+1 -1
View File
@@ -304,7 +304,7 @@
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/blind
disabilities = BLIND
mutations = list(BLINDNESS)
duration = 300
sound = 'sound/magic/blind.ogg'
+1 -1
View File
@@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "b
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
if(eyes && H.disabilities & COLOURBLIND)
if(eyes && (COLOURBLIND in H.mutations))
replace_colours = eyes.replace_colours
+6 -8
View File
@@ -202,9 +202,7 @@
else
return null
/atom/proc/check_eye(user as mob)
if(istype(user, /mob/living/silicon/ai)) // WHYYYY
return 1
/atom/proc/check_eye(user)
return
/atom/proc/on_reagent_change()
@@ -618,19 +616,19 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
if(wear_suit)
wear_suit.add_blood(blood_dna, color)
wear_suit.blood_color = color
update_inv_wear_suit(1)
update_inv_wear_suit()
else if(w_uniform)
w_uniform.add_blood(blood_dna, color)
w_uniform.blood_color = color
update_inv_w_uniform(1)
update_inv_w_uniform()
if(head)
head.add_blood(blood_dna, color)
head.blood_color = color
update_inv_head(0,0)
update_inv_head()
if(glasses)
glasses.add_blood(blood_dna, color)
glasses.blood_color = color
update_inv_glasses(0)
update_inv_glasses()
if(gloves)
var/obj/item/clothing/gloves/G = gloves
G.add_blood(blood_dna, color)
@@ -642,7 +640,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
transfer_blood_dna(blood_dna)
verbs += /mob/living/carbon/human/proc/bloody_doodle
update_inv_gloves(1) //handles bloody hands overlays and updating
update_inv_gloves() //handles bloody hands overlays and updating
return 1
/obj/item/proc/add_blood_overlay(color)
+109 -94
View File
@@ -22,17 +22,17 @@ GLOBAL_LIST_EMPTY(bad_blocks)
/datum/dna
// READ-ONLY, GETS OVERWRITTEN
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
var/uni_identity="" // Encoded UI
var/struc_enzymes="" // Encoded SE
var/unique_enzymes="" // MD5 of player name
var/uni_identity = "" // Encoded UI
var/struc_enzymes = "" // Encoded SE
var/unique_enzymes = "" // MD5 of player name
// Original Encoded SE, for use with Ryetalin
var/struc_enzymes_original="" // Encoded SE
var/struc_enzymes_original = "" // Encoded SE
var/list/SE_original[DNA_SE_LENGTH]
// Internal dirtiness checks
var/dirtyUI=0
var/dirtySE=0
var/dirtyUI = 0
var/dirtySE = 0
// Okay to read, but you're an idiot if you do.
// BLOCK = VALUE
@@ -50,10 +50,10 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION!
/datum/dna/proc/Clone()
var/datum/dna/new_dna = new()
new_dna.unique_enzymes=unique_enzymes
new_dna.struc_enzymes_original=struc_enzymes_original // will make clone's SE the same as the original, do we want this?
new_dna.unique_enzymes = unique_enzymes
new_dna.struc_enzymes_original = struc_enzymes_original // will make clone's SE the same as the original, do we want this?
new_dna.blood_type = blood_type
new_dna.real_name=real_name
new_dna.real_name = real_name
new_dna.species = new species.type
for(var/b=1;b<=DNA_SE_LENGTH;b++)
new_dna.SE[b]=SE[b]
@@ -68,17 +68,17 @@ GLOBAL_LIST_EMPTY(bad_blocks)
///////////////////////////////////////
// Create random UI.
/datum/dna/proc/ResetUI(var/defer=0)
/datum/dna/proc/ResetUI(defer = FALSE)
for(var/i=1,i<=DNA_UI_LENGTH,i++)
switch(i)
if(DNA_UI_SKIN_TONE)
SetUIValueRange(DNA_UI_SKIN_TONE,rand(1,220),220,1) // Otherwise, it gets fucked
SetUIValueRange(DNA_UI_SKIN_TONE, rand(1, 220), 220, 1) // Otherwise, it gets fucked
else
UI[i]=rand(0,4095)
if(!defer)
UpdateUI()
/datum/dna/proc/ResetUIFrom(var/mob/living/carbon/human/character)
/datum/dna/proc/ResetUIFrom(mob/living/carbon/human/character)
// INITIALIZE!
ResetUI(1)
// Hair
@@ -135,83 +135,90 @@ GLOBAL_LIST_EMPTY(bad_blocks)
UpdateUI()
// Set a DNA UI block's raw value.
/datum/dna/proc/SetUIValue(var/block,var/value,var/defer=0)
if(block<=0) return
ASSERT(value>0)
ASSERT(value<=4095)
/datum/dna/proc/SetUIValue(block, value, defer = FALSE)
if(block <= 0)
return
ASSERT(value > 0)
ASSERT(value <= 4095)
UI[block]=value
dirtyUI=1
dirtyUI = 1
if(!defer)
UpdateUI()
// Get a DNA UI block's raw value.
/datum/dna/proc/GetUIValue(var/block)
if(block<=0) return 0
/datum/dna/proc/GetUIValue(block)
if(block <= 0)
return FALSE
return UI[block]
// Set a DNA UI block's value, given a value and a max possible value.
// Used in hair and facial styles (value being the index and maxvalue being the len of the hairstyle list)
/datum/dna/proc/SetUIValueRange(var/block,var/value,var/maxvalue,var/defer=0)
if(block<=0)
/datum/dna/proc/SetUIValueRange(block, value, maxvalue, defer = FALSE)
if(block <= 0)
return
if(value == 0)
value = 1
ASSERT(maxvalue<=4095)
ASSERT(maxvalue <= 4095)
var/range = (4095 / maxvalue)
if(value)
SetUIValue(block,round(value * range),defer)
SetUIValue(block,round(value * range), defer)
// Getter version of above.
/datum/dna/proc/GetUIValueRange(var/block,var/maxvalue)
if(block<=0) return 0
/datum/dna/proc/GetUIValueRange(block, maxvalue)
if(block <= 0)
return FALSE
var/value = GetUIValue(block)
return round(1 +(value / 4096)*maxvalue)
return round(1 + (value / 4096) * maxvalue)
// Is the UI gene "on" or "off"?
// For UI, this is simply a check of if the value is > 2050.
/datum/dna/proc/GetUIState(var/block)
if(block<=0) return
/datum/dna/proc/GetUIState(block)
if(block <= 0)
return
return UI[block] > 2050
// Set UI gene "on" (1) or "off" (0)
/datum/dna/proc/SetUIState(var/block,var/on,var/defer=0)
if(block<=0) return
/datum/dna/proc/SetUIState(block, on, defer = FALSE)
if(block <= 0)
return
var/val
if(on)
val=rand(2050,4095)
val = rand(2050, 4095)
else
val=rand(1,2049)
SetUIValue(block,val,defer)
val=rand(1, 2049)
SetUIValue(block, val, defer)
// Get a hex-encoded UI block.
/datum/dna/proc/GetUIBlock(var/block)
/datum/dna/proc/GetUIBlock(block)
return EncodeDNABlock(GetUIValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
/datum/dna/proc/SetUIBlock(var/block,var/value,var/defer=0)
if(block<=0) return
return SetUIValue(block,hex2num(value),defer)
/datum/dna/proc/SetUIBlock(block, value, defer = FALSE)
if(block <= 0)
return
return SetUIValue(block, hex2num(value), defer)
// Get a sub-block from a block.
/datum/dna/proc/GetUISubBlock(var/block,var/subBlock)
return copytext(GetUIBlock(block),subBlock,subBlock+1)
/datum/dna/proc/GetUISubBlock(block, subBlock)
return copytext(GetUIBlock(block), subBlock, subBlock + 1)
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
/datum/dna/proc/SetUISubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
if(block<=0) return
var/oldBlock=GetUIBlock(block)
var/newBlock=""
for(var/i=1, i<=length(oldBlock), i++)
/datum/dna/proc/SetUISubBlock(block, subBlock, newSubBlock, defer = FALSE)
if(block <= 0)
return
var/oldBlock = GetUIBlock(block)
var/newBlock = ""
for(var/i = 1, i <= length(oldBlock), i++)
if(i==subBlock)
newBlock+=newSubBlock
newBlock += newSubBlock
else
newBlock+=copytext(oldBlock,i,i+1)
SetUIBlock(block,newBlock,defer)
newBlock += copytext(oldBlock, i, i + 1)
SetUIBlock(block, newBlock, defer)
///////////////////////////////////////
// STRUCTURAL ENZYMES
@@ -220,126 +227,134 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// "Zeroes out" all of the blocks.
/datum/dna/proc/ResetSE()
for(var/i = 1, i <= DNA_SE_LENGTH, i++)
SetSEValue(i,rand(1,1024),1)
SetSEValue(i, rand(1, 1024), 1)
UpdateSE()
// Set a DNA SE block's raw value.
/datum/dna/proc/SetSEValue(var/block,var/value,var/defer=0)
/datum/dna/proc/SetSEValue(block, value, defer = FALSE)
if(block<=0) return
ASSERT(value>=0)
ASSERT(value<=4095)
SE[block]=value
dirtySE=1
if(block<=0)
return
ASSERT(value >= 0)
ASSERT(value <= 4095)
SE[block] = value
dirtySE = 1
if(!defer)
UpdateSE()
//testing("SetSEBlock([block],[value],[defer]): [value] -> [GetSEValue(block)]")
// Get a DNA SE block's raw value.
/datum/dna/proc/GetSEValue(var/block)
if(block<=0) return 0
/datum/dna/proc/GetSEValue(block)
if(block <= 0)
return FALSE
return SE[block]
// Set a DNA SE block's value, given a value and a max possible value.
// Might be used for species?
/datum/dna/proc/SetSEValueRange(var/block,var/value,var/maxvalue)
if(block<=0) return
ASSERT(maxvalue<=4095)
/datum/dna/proc/SetSEValueRange(block, value, maxvalue)
if(block <= 0)
return
ASSERT(maxvalue <= 4095)
var/range = round(4095 / maxvalue)
if(value)
SetSEValue(block, value * range - rand(1,range-1))
SetSEValue(block, value * range - rand(1, range - 1))
// Getter version of above.
/datum/dna/proc/GetSEValueRange(var/block,var/maxvalue)
if(block<=0) return 0
/datum/dna/proc/GetSEValueRange(block, maxvalue)
if(block <= 0)
return FALSE
var/value = GetSEValue(block)
return round(1 +(value / 4096)*maxvalue)
return round(1 + (value / 4096) * maxvalue)
// Is the block "on" (1) or "off" (0)? (Un-assigned genes are always off.)
/datum/dna/proc/GetSEState(var/block)
if(block<=0) return 0
var/list/BOUNDS=GetDNABounds(block)
var/value=GetSEValue(block)
/datum/dna/proc/GetSEState(block)
if(block <= 0)
return FALSE
var/list/BOUNDS = GetDNABounds(block)
var/value = GetSEValue(block)
return (value >= BOUNDS[DNA_ON_LOWERBOUND])
// Set a block "on" or "off".
/datum/dna/proc/SetSEState(var/block,var/on,var/defer=0)
if(block<=0) return
/datum/dna/proc/SetSEState(block, on, defer = FALSE)
if(block <= 0)
return
var/list/BOUNDS=GetDNABounds(block)
var/val
if(on)
val=rand(BOUNDS[DNA_ON_LOWERBOUND],BOUNDS[DNA_ON_UPPERBOUND])
val = rand(BOUNDS[DNA_ON_LOWERBOUND], BOUNDS[DNA_ON_UPPERBOUND])
else
val=rand(1,BOUNDS[DNA_OFF_UPPERBOUND])
SetSEValue(block,val,defer)
val = rand(1, BOUNDS[DNA_OFF_UPPERBOUND])
SetSEValue(block, val, defer)
// Get hex-encoded SE block.
/datum/dna/proc/GetSEBlock(var/block)
/datum/dna/proc/GetSEBlock(block)
return EncodeDNABlock(GetSEValue(block))
// Do not use this unless you absolutely have to.
// Set a block from a hex string. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
/datum/dna/proc/SetSEBlock(var/block,var/value,var/defer=0)
if(block<=0) return
/datum/dna/proc/SetSEBlock(block, value, defer = FALSE)
if(block <= 0)
return
var/nval=hex2num(value)
//testing("SetSEBlock([block],[value],[defer]): [value] -> [nval]")
return SetSEValue(block,nval,defer)
return SetSEValue(block, nval, defer)
/datum/dna/proc/GetSESubBlock(var/block,var/subBlock)
return copytext(GetSEBlock(block),subBlock,subBlock+1)
/datum/dna/proc/GetSESubBlock(block, subBlock)
return copytext(GetSEBlock(block), subBlock, subBlock + 1)
// Do not use this unless you absolutely have to.
// Set a sub-block from a hex character. This is inefficient. If you can, use SetUIValue().
// Used in DNA modifiers.
/datum/dna/proc/SetSESubBlock(var/block,var/subBlock, var/newSubBlock, var/defer=0)
if(block<=0) return
/datum/dna/proc/SetSESubBlock(block, subBlock, newSubBlock, defer = FALSE)
if(block <= 0)
return
var/oldBlock=GetSEBlock(block)
var/newBlock=""
for(var/i=1, i<=length(oldBlock), i++)
var/newBlock = ""
for(var/i = 1, i <= length(oldBlock), i++)
if(i==subBlock)
newBlock+=newSubBlock
else
newBlock+=copytext(oldBlock,i,i+1)
newBlock += copytext(oldBlock, i, i + 1)
//testing("SetSESubBlock([block],[subBlock],[newSubBlock],[defer]): [oldBlock] -> [newBlock]")
SetSEBlock(block,newBlock,defer)
SetSEBlock(block, newBlock, defer)
/proc/EncodeDNABlock(var/value)
return add_zero2(num2hex(value,1), 3)
/proc/EncodeDNABlock(value)
return add_zero2(num2hex(value, 1), 3)
/datum/dna/proc/UpdateUI()
src.uni_identity=""
uni_identity = ""
for(var/block in UI)
uni_identity += EncodeDNABlock(block)
//testing("New UI: [uni_identity]")
dirtyUI=0
dirtyUI = 0
/datum/dna/proc/UpdateSE()
//var/oldse=struc_enzymes
struc_enzymes=""
struc_enzymes = ""
for(var/block in SE)
struc_enzymes += EncodeDNABlock(block)
//testing("Old SE: [oldse]")
//testing("New SE: [struc_enzymes]")
dirtySE=0
dirtySE = 0
// BACK-COMPAT!
// Just checks our character has all the crap it needs.
/datum/dna/proc/check_integrity(var/mob/living/carbon/human/character)
/datum/dna/proc/check_integrity(mob/living/carbon/human/character)
if(character)
if(UI.len != DNA_UI_LENGTH)
ResetUIFrom(character)
if(length(struc_enzymes)!= 3*DNA_SE_LENGTH)
if(length(struc_enzymes)!= 3 * DNA_SE_LENGTH)
ResetSE()
if(length(unique_enzymes) != 32)
unique_enzymes = md5(character.real_name)
else
if(length(uni_identity) != 3*DNA_UI_LENGTH)
if(length(uni_identity) != 3 * DNA_UI_LENGTH)
uni_identity = "00600200A00E0110148FC01300B0095BD7FD3F4"
if(length(struc_enzymes)!= 3*DNA_SE_LENGTH)
if(length(struc_enzymes)!= 3 * DNA_SE_LENGTH)
struc_enzymes = "43359156756131E13763334D1C369012032164D4FE4CD61544B6C03F251B6C60A42821D26BA3B0FD6"
// BACK-COMPAT!
+5 -5
View File
@@ -3,7 +3,7 @@
// M: Mob to mess with
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
// flags: See below, bitfield.
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
/proc/domutcheck(mob/living/M, connected = null, flags = 0)
for(var/datum/dna/gene/gene in GLOB.dna_genes)
if(!M || !M.dna)
return
@@ -13,7 +13,7 @@
domutation(gene, M, connected, flags)
// Use this to force a mut check on a single gene!
/proc/genemutcheck(var/mob/living/M, var/block, var/connected=null, var/flags=0)
/proc/genemutcheck(mob/living/M, block, connected = null, flags = 0)
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
var/mob/living/carbon/human/H = M
if(NO_DNA in H.dna.species.species_traits)
@@ -27,9 +27,9 @@
domutation(gene, M, connected, flags)
/proc/domutation(var/datum/dna/gene/gene, var/mob/living/M, var/connected=null, var/flags=0)
/proc/domutation(datum/dna/gene/gene, mob/living/M, connected = null, flags = 0)
if(!gene || !istype(gene))
return 0
return FALSE
// Current state
var/gene_active = M.dna.GetSEState(gene.block)
@@ -37,7 +37,7 @@
// Sanity checks, don't skip.
if(!gene.can_activate(M,flags) && gene_active)
//testing("[M] - Failed to activate [gene.name] (can_activate fail).")
return 0
return FALSE
var/defaultgenes // Do not mutate inherent species abilities
if(ishuman(M))
+49 -46
View File
@@ -9,58 +9,61 @@
t = "0[t]"
temp1 = t
if(length(t) > u)
temp1 = copytext(t,2,u+1)
temp1 = copytext(t, 2, u + 1)
return temp1
// DNA Gene activation boundaries, see dna2.dm.
// Returns a list object with 4 numbers.
/proc/GetDNABounds(var/block)
var/list/BOUNDS=GLOB.dna_activity_bounds[block]
/proc/GetDNABounds(block)
var/list/BOUNDS = GLOB.dna_activity_bounds[block]
if(!istype(BOUNDS))
return DNA_DEFAULT_BOUNDS
return BOUNDS
// Give Random Bad Mutation to M
/proc/randmutb(var/mob/living/M)
if(!M || !M.dna) return
/proc/randmutb(mob/living/M)
if(!M || !M.dna)
return
M.dna.check_integrity()
var/block = pick(GLOB.bad_blocks)
M.dna.SetSEState(block, 1)
// Give Random Good Mutation to M
/proc/randmutg(var/mob/living/M)
if(!M || !M.dna) return
/proc/randmutg(mob/living/M)
if(!M || !M.dna)
return
M.dna.check_integrity()
var/block = pick(GLOB.good_blocks)
M.dna.SetSEState(block, 1)
// Random Appearance Mutation
/proc/randmuti(var/mob/living/M)
if(!M || !M.dna) return
/proc/randmuti(mob/living/M)
if(!M || !M.dna)
return
M.dna.check_integrity()
M.dna.SetUIValue(rand(1,DNA_UI_LENGTH),rand(1,4095))
M.dna.SetUIValue(rand(1, DNA_UI_LENGTH), rand(1, 4095))
// Scramble UI or SE.
/proc/scramble(var/UI, var/mob/M, var/prob)
if(!M || !M.dna) return
/proc/scramble(UI, mob/M, prob)
if(!M || !M.dna)
return
M.dna.check_integrity()
if(UI)
for(var/i = 1, i <= DNA_UI_LENGTH-1, i++)
for(var/i = 1, i <= DNA_UI_LENGTH - 1, i++)
if(prob(prob))
M.dna.SetUIValue(i,rand(1,4095),1)
M.dna.SetUIValue(i, rand(1, 4095), 1)
M.dna.UpdateUI()
M.UpdateAppearance()
else
for(var/i = 1, i <= DNA_SE_LENGTH-1, i++)
for(var/i = 1, i <= DNA_SE_LENGTH - 1, i++)
if(prob(prob))
M.dna.SetSEValue(i,rand(1,4095),1)
M.dna.SetSEValue(i, rand(1, 4095), 1)
M.dna.UpdateSE()
domutcheck(M, null)
return
// I haven't yet figured out what the fuck this is supposed to do.
/proc/miniscramble(input,rs,rd)
/proc/miniscramble(input, rs, rd)
var/output
output = null
if(input == "C" || input == "D" || input == "E" || input == "F")
@@ -79,7 +82,7 @@
// input: YOUR TARGET
// rs: RAD STRENGTH
// rd: DURATION
/proc/miniscrambletarget(input,rs,rd)
/proc/miniscrambletarget(input, rs, rd)
var/output = null
switch(input)
if("0")
@@ -124,11 +127,11 @@
// Use mob.UpdateAppearance() instead.
// Simpler. Don't specify UI in order for the mob to use its own.
/mob/proc/UpdateAppearance(var/list/UI=null)
if(istype(src, /mob/living/carbon/human))
/mob/proc/UpdateAppearance(list/UI = null)
if(istype(src, /mob/living/carbon/human)) // WHY?!
if(UI!=null)
src.dna.UI=UI
src.dna.UpdateUI()
dna.UI = UI
dna.UpdateUI()
dna.check_integrity()
var/mob/living/carbon/human/H = src
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
@@ -169,9 +172,9 @@
H.regenerate_icons()
return 1
return TRUE
else
return 0
return FALSE
/*
ORGAN WRITING PROCS
@@ -219,9 +222,9 @@
// In absence of eyes, possibly randomize the eye color DNA?
return
SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_colour), 255, 1)
SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_colour), 255, 1)
SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_colour), 255, 1)
SetUIValueRange(DNA_UI_EYES_R, color2R(eyes_organ.eye_colour), 255, 1)
SetUIValueRange(DNA_UI_EYES_G, color2G(eyes_organ.eye_colour), 255, 1)
SetUIValueRange(DNA_UI_EYES_B, color2B(eyes_organ.eye_colour), 255, 1)
/datum/dna/proc/head_traits_to_dna(obj/item/organ/external/head/head_organ)
if(!head_organ)
@@ -241,26 +244,26 @@
head_organ.ha_style = "None"
var/headacc = GLOB.head_accessory_styles_list.Find(head_organ.ha_style)
SetUIValueRange(DNA_UI_HAIR_R, color2R(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, color2G(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, color2B(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_R, color2R(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_G, color2G(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_B, color2B(head_organ.hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_R, color2R(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_G, color2G(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_B, color2B(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_R, color2R(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_G, color2G(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR2_B, color2B(head_organ.sec_hair_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_R, color2R(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, color2G(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, color2B(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_R, color2R(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_G, color2G(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD_B, color2B(head_organ.facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_R, color2R(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_G, color2G(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_B, color2B(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_R, color2R(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_G, color2G(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_BEARD2_B, color2B(head_organ.sec_facial_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_R, color2R(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_G, color2G(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_B, color2B(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_R, color2R(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_G, color2G(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HACC_B, color2B(head_organ.headacc_colour), 255, 1)
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, GLOB.hair_styles_full_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, GLOB.facial_hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_HACC_STYLE, headacc, GLOB.head_accessory_styles_list.len, 1)
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, GLOB.hair_styles_full_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, GLOB.facial_hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_HACC_STYLE, headacc, GLOB.head_accessory_styles_list.len, 1)
+258 -274
View File
@@ -10,15 +10,15 @@
//list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0),
/datum/dna2/record
var/datum/dna/dna = null
var/types=0
var/name="Empty"
var/types = 0
var/name = "Empty"
// Stuff for cloners
var/id=null
var/implant=null
var/ckey=null
var/mind=null
var/languages=null
var/id = null
var/implant = null
var/ckey = null
var/mind = null
var/languages = null
/datum/dna2/record/proc/GetData()
var/list/ser=list("data" = null, "owner" = null, "label" = null, "type" = null, "ue" = 0)
@@ -28,7 +28,7 @@
ser["data"] = dna.SE
else
ser["data"] = dna.UI
ser["owner"] = src.dna.real_name
ser["owner"] = dna.real_name
ser["label"] = name
if(types & DNA2_BUF_UI)
ser["type"] = "ui"
@@ -54,13 +54,13 @@
desc = "It scans DNA structures."
icon = 'icons/obj/cryogenic2.dmi'
icon_state = "scanner_open"
density = 1
anchored = 1.0
density = TRUE
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
var/locked = 0
var/locked = FALSE
var/mob/living/carbon/occupant = null
var/obj/item/reagent_containers/glass/beaker = null
var/opened = 0
@@ -106,31 +106,29 @@
/obj/machinery/dna_scannernew/AllowDrop()
return FALSE
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
/obj/machinery/dna_scannernew/relaymove(mob/user)
if(user.stat)
return
src.go_out()
return
go_out()
/obj/machinery/dna_scannernew/verb/eject()
set src in oview(1)
set category = null
set name = "Eject DNA Scanner"
if(usr.stat != 0)
if(usr.incapacitated())
return
eject_occupant()
add_fingerprint(usr)
return
/obj/machinery/dna_scannernew/Destroy()
eject_occupant()
return ..()
/obj/machinery/dna_scannernew/proc/eject_occupant()
src.go_out()
go_out()
for(var/obj/O in src)
if(!istype(O,/obj/item/circuitboard/clonescanner) && \
!istype(O,/obj/item/stock_parts) && \
@@ -146,14 +144,12 @@
set category = null
set name = "Enter DNA Scanner"
if(usr.stat != 0)
return
if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(!ishuman(usr)) //Make sure they're a mob that has dna
to_chat(usr, "<span class='notice'>Try as you might, you can not climb up into the [src].</span>")
return
if(src.occupant)
if(occupant)
to_chat(usr, "<span class='boldnotice'>The [src] is already occupied!</span>")
return
if(usr.abiotic())
@@ -164,12 +160,11 @@
return
usr.stop_pulling()
usr.forceMove(src)
src.occupant = usr
src.icon_state = "scanner_occupied"
src.add_fingerprint(usr)
return
occupant = usr
icon_state = "scanner_occupied"
add_fingerprint(usr)
/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/machinery/dna_scannernew/MouseDrop_T(atom/movable/O, mob/user)
if(!istype(O))
return
if(O.loc == user) //no you can't pull things out of your ass
@@ -208,27 +203,27 @@
if(user.pulling == L)
user.stop_pulling()
/obj/machinery/dna_scannernew/attackby(var/obj/item/item as obj, var/mob/user as mob, params)
if(exchange_parts(user, item))
/obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params)
if(exchange_parts(user, I))
return
else if(istype(item, /obj/item/reagent_containers/glass))
else if(istype(I, /obj/item/reagent_containers/glass))
if(beaker)
to_chat(user, "<span class='warning'>A beaker is already loaded into the machine.</span>")
return
if(!user.drop_item())
to_chat(user, "<span class='warning'>\The [item] is stuck to you!</span>")
to_chat(user, "<span class='warning'>\The [I] is stuck to you!</span>")
return
beaker = item
item.forceMove(src)
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
beaker = I
I.forceMove(src)
user.visible_message("[user] adds \a [I] to \the [src]!", "You add \a [I] to \the [src]!")
return
if(istype(item, /obj/item/grab))
var/obj/item/grab/G = item
if(istype(I, /obj/item/grab))
var/obj/item/grab/G = I
if(!ismob(G.affecting))
return
if(src.occupant)
if(occupant)
to_chat(user, "<span class='boldnotice'>The scanner is already occupied!</span>")
return
if(G.affecting.abiotic())
@@ -241,7 +236,7 @@
to_chat(usr, "<span class='boldnotice'>Close the maintenance panel first.</span>")
return
put_in(G.affecting)
src.add_fingerprint(user)
add_fingerprint(user)
qdel(G)
return
return ..()
@@ -249,7 +244,7 @@
/obj/machinery/dna_scannernew/crowbar_act(mob/user, obj/item/I)
if(default_deconstruction_crowbar(user, I))
for(var/obj/thing in contents) // in case there is something in the scanner
thing.forceMove(src.loc)
thing.forceMove(loc)
/obj/machinery/dna_scannernew/screwdriver_act(mob/user, obj/item/I)
if(occupant)
@@ -258,15 +253,15 @@
if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", I))
return TRUE
/obj/machinery/dna_scannernew/relaymove(mob/user as mob)
/obj/machinery/dna_scannernew/relaymove(mob/user)
if(user.incapacitated())
return 0 //maybe they should be able to get out with cuffs, but whatever
return FALSE //maybe they should be able to get out with cuffs, but whatever
go_out()
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M)
/obj/machinery/dna_scannernew/proc/put_in(mob/M)
M.forceMove(src)
src.occupant = M
src.icon_state = "scanner_occupied"
occupant = M
icon_state = "scanner_occupied"
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner
if(locate(/obj/machinery/computer/cloning, get_step(src, NORTH)) \
@@ -275,20 +270,19 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
occupant.notify_ghost_cloning(source = src)
return
/obj/machinery/dna_scannernew/proc/go_out()
if(!src.occupant)
if(!occupant)
to_chat(usr, "<span class='warning'>The scanner is empty!</span>")
return
if(src.locked)
if(locked)
to_chat(usr, "<span class='warning'>The scanner is locked!</span>")
return
src.occupant.forceMove(src.loc)
src.occupant = null
src.icon_state = "scanner_open"
occupant.forceMove(loc)
occupant = null
icon_state = "scanner_open"
/obj/machinery/dna_scannernew/ex_act(severity)
if(occupant)
@@ -305,18 +299,17 @@
// Checks if occupants can be irradiated/mutated - prevents exploits where wearing full rad protection would still let you gain mutations
/obj/machinery/dna_scannernew/proc/radiation_check()
if(!occupant)
return 1
return TRUE
if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
if(NO_DNA in H.dna.species.species_traits)
return 1
return TRUE
var/radiation_protection = occupant.run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm.")
if(radiation_protection > NEGATE_MUTATION_THRESHOLD)
return 1
return 0
return TRUE
return FALSE
/obj/machinery/computer/scan_consolenew
name = "\improper DNA Modifier access console"
@@ -324,7 +317,7 @@
icon = 'icons/obj/computer.dmi'
icon_screen = "dna"
icon_keyboard = "med_key"
density = 1
density = TRUE
circuit = /obj/item/circuitboard/scan_consolenew
var/selected_ui_block = 1.0
var/selected_ui_subblock = 1.0
@@ -336,22 +329,22 @@
var/radiation_intensity = 1.0
var/list/datum/dna2/record/buffers[3]
var/irradiating = 0
var/injector_ready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/injector_ready = FALSE //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
var/obj/machinery/dna_scannernew/connected = null
var/obj/item/disk/data/disk = null
var/selected_menu_key = null
anchored = 1
anchored = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 400
var/waiting_for_user_input=0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
var/waiting_for_user_input = 0 // Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I as obj, mob/user as mob, params)
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/disk/data)) //INSERT SOME diskS
if(!src.disk)
if(!disk)
user.drop_item()
I.forceMove(src)
src.disk = I
disk = I
to_chat(user, "You insert [I].")
SSnanoui.update_uis(src) // update all UIs attached to src()
return
@@ -368,39 +361,30 @@
if(!isnull(connected))
break
spawn(250)
src.injector_ready = 1
return
return
injector_ready = TRUE
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(var/list/buffer)
/obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(list/buffer)
var/list/arr = list()
for(var/i = 1, i <= buffer.len, i++)
arr += "[i]:[EncodeDNABlock(buffer[i])]"
return arr
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(var/obj/item/dnainjector/I, var/blk, var/datum/dna2/record/buffer)
/obj/machinery/computer/scan_consolenew/proc/setInjectorBlock(obj/item/dnainjector/I, blk, datum/dna2/record/buffer)
var/pos = findtext(blk,":")
if(!pos) return 0
if(!pos)
return FALSE
var/id = text2num(copytext(blk,1,pos))
if(!id) return 0
if(!id)
return FALSE
I.block = id
I.buf = buffer
return 1
return TRUE
/*
/obj/machinery/computer/scan_consolenew/process() //not really used right now
if(stat & (NOPOWER|BROKEN))
return
if(!( src.status )) //remove this
return
return
*/
/obj/machinery/computer/scan_consolenew/attack_ai(user as mob)
src.add_hiddenprint(user)
/obj/machinery/computer/scan_consolenew/attack_ai(mob/user)
add_hiddenprint(user)
attack_hand(user)
/obj/machinery/computer/scan_consolenew/attack_hand(user as mob)
/obj/machinery/computer/scan_consolenew/attack_hand(mob/user)
if(isnull(connected))
for(dir in list(NORTH,EAST,SOUTH,WEST))
connected = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
@@ -427,7 +411,7 @@
*
* @return nothing
*/
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(user == connected.occupant)
return
@@ -445,7 +429,7 @@
/obj/machinery/computer/scan_consolenew/ui_data(mob/user, datum/topic_state/state)
var/data[0]
data["selectedMenuKey"] = selected_menu_key
data["locked"] = src.connected.locked
data["locked"] = connected.locked
data["hasOccupant"] = connected.occupant ? 1 : 0
data["isInjectorReady"] = injector_ready
@@ -464,7 +448,7 @@
data["disk"] = diskData
var/list/new_buffers = list()
for(var/datum/dna2/record/buf in src.buffers)
for(var/datum/dna2/record/buf in buffers)
new_buffers += list(buf.GetData())
data["buffers"]=new_buffers
@@ -481,7 +465,7 @@
data["selectedUITargetHex"] = selected_ui_target_hex
var/occupantData[0]
if(!src.connected.occupant || !src.connected.occupant.dna)
if(!connected.occupant || !connected.occupant.dna)
occupantData["name"] = null
occupantData["stat"] = null
occupantData["isViableSubject"] = null
@@ -496,7 +480,7 @@
occupantData["name"] = connected.occupant.dna.real_name
occupantData["stat"] = connected.occupant.stat
occupantData["isViableSubject"] = 1
if((NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna || (NO_DNA in connected.occupant.dna.species.species_traits))
if((NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !connected.occupant.dna || (NO_DNA in connected.occupant.dna.species.species_traits))
occupantData["isViableSubject"] = 0
occupantData["health"] = connected.occupant.health
occupantData["maxHealth"] = connected.occupant.maxHealth
@@ -520,173 +504,173 @@
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
if(..())
return 0 // don't update uis
return FALSE // don't update uis
if(!istype(usr.loc, /turf))
return 0 // don't update uis
if(!src || !src.connected)
return 0 // don't update uis
return FALSE // don't update uis
if(!src || !connected)
return FALSE // don't update uis
if(irradiating) // Make sure that it isn't already irradiating someone...
return 0 // don't update uis
return FALSE // don't update uis
add_fingerprint(usr)
if(href_list["selectMenuKey"])
selected_menu_key = href_list["selectMenuKey"]
return 1 // return 1 forces an update to all Nano uis attached to src
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["toggleLock"])
if((src.connected && src.connected.occupant))
src.connected.locked = !( src.connected.locked )
return 1 // return 1 forces an update to all Nano uis attached to src
if((connected && connected.occupant))
connected.locked = !(connected.locked)
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseRadiation"])
irradiating = src.radiation_duration
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
irradiating = radiation_duration
var/lock_state = connected.locked
connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
src.connected.locked = lock_state
connected.locked = lock_state
if(!src.connected.occupant)
return 1 // return 1 forces an update to all Nano uis attached to src
if(!connected.occupant)
return TRUE // return 1 forces an update to all Nano uis attached to src
var/radiation = (((src.radiation_intensity*3)+src.radiation_duration*3) / connected.damage_coeff)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
if(src.connected.radiation_check())
return 1
var/radiation = (((radiation_intensity * 3) + radiation_duration * 3) / connected.damage_coeff)
connected.occupant.apply_effect(radiation, IRRADIATE, 0)
if(connected.radiation_check())
return TRUE
if(prob(95))
if(prob(75))
randmutb(src.connected.occupant)
randmutb(connected.occupant)
else
randmuti(src.connected.occupant)
randmuti(connected.occupant)
else
if(prob(95))
randmutg(src.connected.occupant)
randmutg(connected.occupant)
else
randmuti(src.connected.occupant)
randmuti(connected.occupant)
return 1 // return 1 forces an update to all Nano uis attached to src
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["radiationDuration"])
if(text2num(href_list["radiationDuration"]) > 0)
if(src.radiation_duration < 20)
src.radiation_duration += 2
if(radiation_duration < 20)
radiation_duration += 2
else
if(src.radiation_duration > 2)
src.radiation_duration -= 2
return 1 // return 1 forces an update to all Nano uis attached to src
if(radiation_duration > 2)
radiation_duration -= 2
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["radiationIntensity"])
if(text2num(href_list["radiationIntensity"]) > 0)
if(src.radiation_intensity < 10)
src.radiation_intensity++
if(radiation_intensity < 10)
radiation_intensity++
else
if(src.radiation_intensity > 1)
src.radiation_intensity--
return 1 // return 1 forces an update to all Nano uis attached to src
if(radiation_intensity > 1)
radiation_intensity--
return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
if(href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) > 0)
if(src.selected_ui_target < 15)
src.selected_ui_target++
src.selected_ui_target_hex = src.selected_ui_target
if(selected_ui_target < 15)
selected_ui_target++
selected_ui_target_hex = selected_ui_target
switch(selected_ui_target)
if(10)
src.selected_ui_target_hex = "A"
selected_ui_target_hex = "A"
if(11)
src.selected_ui_target_hex = "B"
selected_ui_target_hex = "B"
if(12)
src.selected_ui_target_hex = "C"
selected_ui_target_hex = "C"
if(13)
src.selected_ui_target_hex = "D"
selected_ui_target_hex = "D"
if(14)
src.selected_ui_target_hex = "E"
selected_ui_target_hex = "E"
if(15)
src.selected_ui_target_hex = "F"
selected_ui_target_hex = "F"
else
src.selected_ui_target = 0
src.selected_ui_target_hex = 0
return 1 // return 1 forces an update to all Nano uis attached to src
selected_ui_target = 0
selected_ui_target_hex = 0
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["changeUITarget"] && text2num(href_list["changeUITarget"]) < 1)
if(src.selected_ui_target > 0)
src.selected_ui_target--
src.selected_ui_target_hex = src.selected_ui_target
if(selected_ui_target > 0)
selected_ui_target--
selected_ui_target_hex = selected_ui_target
switch(selected_ui_target)
if(10)
src.selected_ui_target_hex = "A"
selected_ui_target_hex = "A"
if(11)
src.selected_ui_target_hex = "B"
selected_ui_target_hex = "B"
if(12)
src.selected_ui_target_hex = "C"
selected_ui_target_hex = "C"
if(13)
src.selected_ui_target_hex = "D"
selected_ui_target_hex = "D"
if(14)
src.selected_ui_target_hex = "E"
selected_ui_target_hex = "E"
else
src.selected_ui_target = 15
src.selected_ui_target_hex = "F"
return 1 // return 1 forces an update to all Nano uis attached to src
selected_ui_target = 15
selected_ui_target_hex = "F"
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["selectUIBlock"] && href_list["selectUISubblock"]) // This chunk of code updates selected block / sub-block based on click
var/select_block = text2num(href_list["selectUIBlock"])
var/select_subblock = text2num(href_list["selectUISubblock"])
if((select_block <= DNA_UI_LENGTH) && (select_block >= 1))
src.selected_ui_block = select_block
selected_ui_block = select_block
if((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
src.selected_ui_subblock = select_subblock
return 1 // return 1 forces an update to all Nano uis attached to src
selected_ui_subblock = select_subblock
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseUIRadiation"])
var/block = src.connected.occupant.dna.GetUISubBlock(src.selected_ui_block,src.selected_ui_subblock)
var/block = connected.occupant.dna.GetUISubBlock(selected_ui_block, selected_ui_subblock)
irradiating = src.radiation_duration
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
irradiating = radiation_duration
var/lock_state = connected.locked
connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
src.connected.locked = lock_state
connected.locked = lock_state
if(!src.connected.occupant)
return 1
if(!connected.occupant)
return TRUE
if(prob((80 + (src.radiation_duration / 2))))
var/radiation = (src.radiation_intensity+src.radiation_duration)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
if(prob((80 + (radiation_duration / 2))))
var/radiation = (radiation_intensity + radiation_duration)
connected.occupant.apply_effect(radiation,IRRADIATE,0)
if(src.connected.radiation_check())
return 1
if(connected.radiation_check())
return TRUE
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
src.connected.occupant.UpdateAppearance()
block = miniscrambletarget(num2text(selected_ui_target), radiation_intensity, radiation_duration)
connected.occupant.dna.SetUISubBlock(selected_ui_block, selected_ui_subblock, block)
connected.occupant.UpdateAppearance()
else
var/radiation = ((src.radiation_intensity*2)+src.radiation_duration)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
if(src.connected.radiation_check())
return 1
var/radiation = ((radiation_intensity * 2) + radiation_duration)
connected.occupant.apply_effect(radiation, IRRADIATE, 0)
if(connected.radiation_check())
return TRUE
if(prob(20+src.radiation_intensity))
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
if(prob(20 + radiation_intensity))
randmutb(connected.occupant)
domutcheck(connected.occupant, connected)
else
randmuti(src.connected.occupant)
src.connected.occupant.UpdateAppearance()
return 1 // return 1 forces an update to all Nano uis attached to src
randmuti(connected.occupant)
connected.occupant.UpdateAppearance()
return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
if(href_list["injectRejuvenators"])
if(!connected.occupant)
return 0
return FALSE
var/inject_amount = round(text2num(href_list["injectRejuvenators"]), 5) // round to nearest 5
if(inject_amount < 0) // Since the user can actually type the commands himself, some sanity checking
inject_amount = 0
@@ -694,7 +678,7 @@
inject_amount = 50
connected.beaker.reagents.trans_to(connected.occupant, inject_amount)
connected.beaker.reagents.reaction(connected.occupant)
return 1 // return 1 forces an update to all Nano uis attached to src
return TRUE // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////
@@ -702,73 +686,73 @@
var/select_block = text2num(href_list["selectSEBlock"])
var/select_subblock = text2num(href_list["selectSESubblock"])
if((select_block <= DNA_SE_LENGTH) && (select_block >= 1))
src.selected_se_block = select_block
selected_se_block = select_block
if((select_subblock <= DNA_BLOCK_SIZE) && (select_subblock >= 1))
src.selected_se_subblock = select_subblock
selected_se_subblock = select_subblock
//testing("User selected block [selected_se_block] (sent [select_block]), subblock [selected_se_subblock] (sent [select_block]).")
return 1 // return 1 forces an update to all Nano uis attached to src
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["pulseSERadiation"])
var/block = src.connected.occupant.dna.GetSESubBlock(src.selected_se_block,src.selected_se_subblock)
var/block = connected.occupant.dna.GetSESubBlock(selected_se_block, selected_se_subblock)
//var/original_block=block
//testing("Irradiating SE block [src.selected_se_block]:[src.selected_se_subblock] ([block])...")
//testing("Irradiating SE block [selected_se_block]:[selected_se_subblock] ([block])...")
irradiating = src.radiation_duration
var/lock_state = src.connected.locked
src.connected.locked = 1 //lock it
irradiating = radiation_duration
var/lock_state = connected.locked
connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
sleep(10*src.radiation_duration) // sleep for radiation_duration seconds
sleep(10 * radiation_duration) // sleep for radiation_duration seconds
irradiating = 0
src.connected.locked = lock_state
connected.locked = lock_state
if(src.connected.occupant)
if(prob((80 + ((src.radiation_duration / 2) + (connected.precision_coeff ** 3)))))
var/radiation = ((src.radiation_intensity+src.radiation_duration) / connected.damage_coeff)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
if(connected.occupant)
if(prob((80 + ((radiation_duration / 2) + (connected.precision_coeff ** 3)))))
var/radiation = ((radiation_intensity + radiation_duration) / connected.damage_coeff)
connected.occupant.apply_effect(radiation, IRRADIATE, 0)
if(src.connected.radiation_check())
if(connected.radiation_check())
return 1
var/real_SE_block=selected_se_block
block = miniscramble(block, src.radiation_intensity, src.radiation_duration)
block = miniscramble(block, radiation_intensity, radiation_duration)
if(prob(20))
if(src.selected_se_block > 1 && src.selected_se_block < DNA_SE_LENGTH/2)
if(selected_se_block > 1 && selected_se_block < DNA_SE_LENGTH/2)
real_SE_block++
else if(src.selected_se_block > DNA_SE_LENGTH/2 && src.selected_se_block < DNA_SE_LENGTH)
else if(selected_se_block > DNA_SE_LENGTH/2 && selected_se_block < DNA_SE_LENGTH)
real_SE_block--
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
domutcheck(src.connected.occupant,src.connected)
//testing("Irradiated SE block [real_SE_block]:[selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
connected.occupant.dna.SetSESubBlock(real_SE_block, selected_se_subblock, block)
domutcheck(connected.occupant, connected)
else
var/radiation = (((src.radiation_intensity*2)+src.radiation_duration) / connected.damage_coeff)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
var/radiation = (((radiation_intensity * 2) + radiation_duration) / connected.damage_coeff)
connected.occupant.apply_effect(radiation, IRRADIATE, 0)
if(src.connected.radiation_check())
if(connected.radiation_check())
return 1
if(prob(80-src.radiation_duration))
if(prob(80 - radiation_duration))
//testing("Random bad mut!")
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
randmutb(connected.occupant)
domutcheck(connected.occupant, connected)
else
randmuti(src.connected.occupant)
randmuti(connected.occupant)
//testing("Random identity mut!")
src.connected.occupant.UpdateAppearance()
return 1 // return 1 forces an update to all Nano uis attached to src
connected.occupant.UpdateAppearance()
return TRUE // return 1 forces an update to all Nano uis attached to src
if(href_list["ejectBeaker"])
if(connected.beaker)
var/obj/item/reagent_containers/glass/B = connected.beaker
B.forceMove(connected.loc)
connected.beaker = null
return 1
return TRUE
if(href_list["ejectOccupant"])
connected.eject_occupant()
return 1
return TRUE
// Transfer Buffer Management
if(href_list["bufferOption"])
@@ -776,113 +760,113 @@
// These bufferOptions do not require a bufferId
if(bufferOption == "wipeDisk")
if((isnull(src.disk)) || (src.disk.read_only))
//src.temphtml = "Invalid disk. Please try again."
return 0
if((isnull(disk)) || (disk.read_only))
//temphtml = "Invalid disk. Please try again."
return FALSE
src.disk.buf=null
//src.temphtml = "Data saved."
return 1
disk.buf = null
//temphtml = "Data saved."
return TRUE
if(bufferOption == "ejectDisk")
if(!src.disk)
if(!disk)
return
src.disk.forceMove(get_turf(src))
src.disk = null
return 1
disk.forceMove(get_turf(src))
disk = null
return TRUE
// All bufferOptions from here on require a bufferId
if(!href_list["bufferId"])
return 0
return FALSE
var/bufferId = text2num(href_list["bufferId"])
if(bufferId < 1 || bufferId > 3)
return 0 // Not a valid buffer id
return FALSE // Not a valid buffer id
if(bufferOption == "saveUI")
if(src.connected.occupant && src.connected.occupant.dna)
var/datum/dna2/record/databuf=new
if(connected.occupant && connected.occupant.dna)
var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_UI // DNA2_BUF_UE
databuf.dna = src.connected.occupant.dna.Clone()
databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
databuf.dna.real_name=connected.occupant.name
databuf.name = "Unique Identifier"
src.buffers[bufferId] = databuf
return 1
buffers[bufferId] = databuf
return TRUE
if(bufferOption == "saveUIAndUE")
if(src.connected.occupant && src.connected.occupant.dna)
var/datum/dna2/record/databuf=new
if(connected.occupant && connected.occupant.dna)
var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_UI|DNA2_BUF_UE
databuf.dna = src.connected.occupant.dna.Clone()
databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
databuf.dna.real_name=connected.occupant.dna.real_name
databuf.name = "Unique Identifier + Unique Enzymes"
src.buffers[bufferId] = databuf
return 1
buffers[bufferId] = databuf
return TRUE
if(bufferOption == "saveSE")
if(src.connected.occupant && src.connected.occupant.dna)
var/datum/dna2/record/databuf=new
if(connected.occupant && connected.occupant.dna)
var/datum/dna2/record/databuf = new
databuf.types = DNA2_BUF_SE
databuf.dna = src.connected.occupant.dna.Clone()
databuf.dna = connected.occupant.dna.Clone()
if(ishuman(connected.occupant))
databuf.dna.real_name=connected.occupant.dna.real_name
databuf.dna.real_name = connected.occupant.dna.real_name
databuf.name = "Structural Enzymes"
src.buffers[bufferId] = databuf
return 1
buffers[bufferId] = databuf
return TRUE
if(bufferOption == "clear")
src.buffers[bufferId]=new /datum/dna2/record()
return 1
buffers[bufferId] = new /datum/dna2/record()
return TRUE
if(bufferOption == "changeLabel")
var/datum/dna2/record/buf = src.buffers[bufferId]
var/datum/dna2/record/buf = buffers[bufferId]
var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null)
buf.name = text
src.buffers[bufferId] = buf
return 1
buffers[bufferId] = buf
return TRUE
if(bufferOption == "transfer")
if(!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations && connected.scan_level < 3) || !src.connected.occupant.dna)
return 1
if(!connected.occupant || (NOCLONE in connected.occupant.mutations && connected.scan_level < 3) || !connected.occupant.dna)
return TRUE
irradiating = 2
var/lock_state = src.connected.locked
src.connected.locked = 1//lock it
var/lock_state = connected.locked
connected.locked = TRUE //lock it
SSnanoui.update_uis(src) // update all UIs attached to src
sleep(2 SECONDS)
irradiating = 0
src.connected.locked = lock_state
connected.locked = lock_state
var/radiation = (rand(20,50) / connected.damage_coeff)
src.connected.occupant.apply_effect(radiation,IRRADIATE,0)
connected.occupant.apply_effect(radiation, IRRADIATE, 0)
if(src.connected.radiation_check())
return 1
if(connected.radiation_check())
return TRUE
var/datum/dna2/record/buf = src.buffers[bufferId]
var/datum/dna2/record/buf = buffers[bufferId]
if((buf.types & DNA2_BUF_UI))
if((buf.types & DNA2_BUF_UE))
src.connected.occupant.real_name = buf.dna.real_name
src.connected.occupant.name = buf.dna.real_name
src.connected.occupant.UpdateAppearance(buf.dna.UI.Copy())
connected.occupant.real_name = buf.dna.real_name
connected.occupant.name = buf.dna.real_name
connected.occupant.UpdateAppearance(buf.dna.UI.Copy())
else if(buf.types & DNA2_BUF_SE)
src.connected.occupant.dna.SE = buf.dna.SE.Copy()
src.connected.occupant.dna.UpdateSE()
domutcheck(src.connected.occupant,src.connected)
return 1
connected.occupant.dna.SE = buf.dna.SE.Copy()
connected.occupant.dna.UpdateSE()
domutcheck(connected.occupant, connected)
return TRUE
if(bufferOption == "createInjector")
if(injector_ready && !waiting_for_user_input)
var/success = 1
var/obj/item/dnainjector/I = new /obj/item/dnainjector
var/datum/dna2/record/buf = src.buffers[bufferId]
var/datum/dna2/record/buf = buffers[bufferId]
buf = buf.copy()
if(href_list["createBlockInjector"])
waiting_for_user_input=1
@@ -897,35 +881,35 @@
I.buf = buf
waiting_for_user_input = 0
if(success)
I.forceMove(src.loc)
I.forceMove(loc)
I.name += " ([buf.name])"
if(connected)
I.damage_coeff = connected.damage_coeff
src.injector_ready = 0
injector_ready = FALSE
spawn(300)
src.injector_ready = 1
return 1
injector_ready = TRUE
return TRUE
if(bufferOption == "loadDisk")
if((isnull(src.disk)) || (!src.disk.buf))
//src.temphtml = "Invalid disk. Please try again."
return 0
if((isnull(disk)) || (!disk.buf))
//temphtml = "Invalid disk. Please try again."
return FALSE
src.buffers[bufferId]=src.disk.buf.copy()
//src.temphtml = "Data loaded."
return 1
buffers[bufferId] = disk.buf.copy()
//temphtml = "Data loaded."
return TRUE
if(bufferOption == "saveDisk")
if((isnull(src.disk)) || (src.disk.read_only))
//src.temphtml = "Invalid disk. Please try again."
return 0
if((isnull(disk)) || (disk.read_only))
//temphtml = "Invalid disk. Please try again."
return FALSE
var/datum/dna2/record/buf = src.buffers[bufferId]
var/datum/dna2/record/buf = buffers[bufferId]
src.disk.buf = buf.copy()
src.disk.name = "data disk - '[buf.dna.real_name]'"
//src.temphtml = "Data saved."
return 1
disk.buf = buf.copy()
disk.name = "data disk - '[buf.dna.real_name]'"
//temphtml = "Data saved."
return TRUE
/////////////////////////// DNA MACHINES
+102 -66
View File
@@ -7,113 +7,144 @@
/////////////////////
/datum/dna/gene/disability
name="DISABILITY"
name = "DISABILITY"
// Mutation to give (or 0)
var/mutation=0
// Disability to give (or 0)
var/disability=0
var/mutation = 0
// Activation message
var/activation_message=""
var/activation_message = ""
// Yay, you're no longer growing 3 arms
var/deactivation_message=""
var/deactivation_message = ""
/datum/dna/gene/disability/can_activate(var/mob/M,var/flags)
return 1 // Always set!
/datum/dna/gene/disability/can_activate(mob/M, flags)
return TRUE // Always set!
/datum/dna/gene/disability/activate(var/mob/living/M, var/connected, var/flags)
/datum/dna/gene/disability/activate(mob/living/M, connected, flags)
..()
if(mutation && !(mutation in M.mutations))
M.mutations.Add(mutation)
if(disability)
M.disabilities|=disability
M.mutations |= mutation
if(activation_message)
to_chat(M, "<span class='warning'>[activation_message]</span>")
else
testing("[name] has no activation message.")
/datum/dna/gene/disability/deactivate(var/mob/living/M, var/connected, var/flags)
/datum/dna/gene/disability/deactivate(mob/living/M, connected, flags)
..()
if(mutation && (mutation in M.mutations))
M.mutations.Remove(mutation)
if(disability)
M.disabilities &= ~disability
M.mutations.Remove(mutation)
if(deactivation_message)
to_chat(M, "<span class='warning'>[deactivation_message]</span>")
else
testing("[name] has no deactivation message.")
/datum/dna/gene/disability/hallucinate
name="Hallucinate"
activation_message="Your mind says 'Hello'."
deactivation_message ="Sanity returns. Or does it?"
name = "Hallucinate"
activation_message = "Your mind says 'Hello'."
deactivation_message = "Sanity returns. Or does it?"
instability = -GENE_INSTABILITY_MODERATE
mutation=HALLUCINATE
mutation = HALLUCINATE
/datum/dna/gene/disability/hallucinate/New()
block=GLOB.hallucinationblock
..()
block = GLOB.hallucinationblock
/datum/dna/gene/disability/hallucinate/OnMobLife(mob/living/carbon/human/H)
if(prob(1))
H.Hallucinate(20)
/datum/dna/gene/disability/epilepsy
name="Epilepsy"
activation_message="You get a headache."
deactivation_message ="Your headache is gone, at last."
name = "Epilepsy"
activation_message = "You get a headache."
deactivation_message = "Your headache is gone, at last."
instability = -GENE_INSTABILITY_MODERATE
disability=EPILEPSY
mutation = EPILEPSY
/datum/dna/gene/disability/epilepsy/New()
block=GLOB.epilepsyblock
..()
block = GLOB.epilepsyblock
/datum/dna/gene/disability/epilepsy/OnMobLife(mob/living/carbon/human/H)
if((prob(1) && H.paralysis < 1))
H.visible_message("<span class='danger'>[src] starts having a seizure!</span>","<span class='alert'>You have a seizure!</span>")
H.Paralyse(10)
H.Jitter(1000)
/datum/dna/gene/disability/cough
name="Coughing"
activation_message="You start coughing."
deactivation_message ="Your throat stops aching."
name = "Coughing"
activation_message = "You start coughing."
deactivation_message = "Your throat stops aching."
instability = -GENE_INSTABILITY_MINOR
disability=COUGHING
mutation = COUGHING
/datum/dna/gene/disability/cough/New()
block=GLOB.coughblock
..()
block = GLOB.coughblock
/datum/dna/gene/disability/cough/OnMobLife(mob/living/carbon/human/H)
if((prob(5) && H.paralysis <= 1))
H.drop_item()
H.emote("cough")
/datum/dna/gene/disability/clumsy
name="Clumsiness"
activation_message="You feel lightheaded."
deactivation_message ="You regain some control of your movements"
name = "Clumsiness"
activation_message = "You feel lightheaded."
deactivation_message = "You regain some control of your movements"
instability = -GENE_INSTABILITY_MINOR
mutation=CLUMSY
mutation = CLUMSY
/datum/dna/gene/disability/clumsy/New()
block=GLOB.clumsyblock
..()
block = GLOB.clumsyblock
/datum/dna/gene/disability/tourettes
name="Tourettes"
activation_message="You twitch."
deactivation_message ="Your mouth tastes like soap."
name = "Tourettes"
activation_message = "You twitch."
deactivation_message = "Your mouth tastes like soap."
instability = -GENE_INSTABILITY_MODERATE
disability=TOURETTES
mutation = TOURETTES
/datum/dna/gene/disability/tourettes/New()
block=GLOB.twitchblock
..()
block = GLOB.twitchblock
/datum/dna/gene/disability/tourettes/OnMobLife(mob/living/carbon/human/H)
if((prob(10) && H.paralysis <= 1))
H.Stun(10)
switch(rand(1, 3))
if(1)
H.emote("twitch")
if(2 to 3)
H.say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]")
var/x_offset_old = H.pixel_x
var/y_offset_old = H.pixel_y
var/x_offset = H.pixel_x + rand(-2, 2)
var/y_offset = H.pixel_y + rand(-1, 1)
animate(H, pixel_x = x_offset, pixel_y = y_offset, time = 1)
animate(H, pixel_x = x_offset_old, pixel_y = y_offset_old, time = 1)
/datum/dna/gene/disability/nervousness
name="Nervousness"
name = "Nervousness"
activation_message="You feel nervous."
deactivation_message ="You feel much calmer."
disability=NERVOUS
mutation = NERVOUS
/datum/dna/gene/disability/nervousness/New()
block=GLOB.nervousblock
..()
block = GLOB.nervousblock
/datum/dna/gene/disability/nervousness/OnMobLife(mob/living/carbon/human/H)
if(prob(10))
H.Stuttering(10)
/datum/dna/gene/disability/blindness
name="Blindness"
name = "Blindness"
activation_message = "You can't seem to see anything."
deactivation_message = "You can see now, in case you didn't notice..."
instability = -GENE_INSTABILITY_MAJOR
disability = BLIND
mutation = BLINDNESS
/datum/dna/gene/disability/blindness/New()
..()
block = GLOB.blindblock
/datum/dna/gene/disability/blindness/activate(mob/M, connected, flags)
@@ -130,51 +161,54 @@
activation_message = "You feel a peculiar prickling in your eyes while your perception of colour changes."
deactivation_message ="Your eyes tingle unsettlingly, though everything seems to become alot more colourful."
instability = -GENE_INSTABILITY_MODERATE
disability = COLOURBLIND
mutation = COLOURBLIND
/datum/dna/gene/disability/colourblindness/New()
block=GLOB.colourblindblock
..()
block = GLOB.colourblindblock
/datum/dna/gene/disability/colourblindness/activate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/disability/colourblindness/activate(mob/M, connected, flags)
..()
M.update_client_colour() //Handle the activation of the colourblindness on the mob.
M.update_icons() //Apply eyeshine as needed.
/datum/dna/gene/disability/colourblindness/deactivate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/disability/colourblindness/deactivate(mob/M, connected, flags)
..()
M.update_client_colour() //Handle the deactivation of the colourblindness on the mob.
M.update_icons() //Remove eyeshine as needed.
/datum/dna/gene/disability/deaf
name="Deafness"
name = "Deafness"
activation_message="It's kinda quiet."
deactivation_message ="You can hear again!"
instability = -GENE_INSTABILITY_MAJOR
disability=DEAF
mutation = DEAF
/datum/dna/gene/disability/deaf/New()
block=GLOB.deafblock
..()
block = GLOB.deafblock
/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/disability/deaf/activate(mob/M, connected, flags)
..()
M.MinimumDeafTicks(1)
/datum/dna/gene/disability/nearsighted
name="Nearsightedness"
name = "Nearsightedness"
activation_message="Your eyes feel weird..."
deactivation_message ="You can see clearly now"
instability = -GENE_INSTABILITY_MODERATE
disability=NEARSIGHTED
mutation = NEARSIGHTED
/datum/dna/gene/disability/nearsighted/New()
block=GLOB.glassesblock
..()
block = GLOB.glassesblock
/datum/dna/gene/disability/nearsighted/activate(mob/living/M, connected, flags)
. = ..()
..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/nearsighted/deactivate(mob/living/M, connected, flags)
. = ..()
..()
M.update_nearsighted_effects()
/datum/dna/gene/disability/lisp
@@ -186,9 +220,9 @@
/datum/dna/gene/disability/lisp/New()
..()
block=GLOB.lispblock
block = GLOB.lispblock
/datum/dna/gene/disability/lisp/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/lisp/OnSay(mob/M, message)
return replacetext(message,"s","th")
/datum/dna/gene/disability/comic
@@ -196,9 +230,10 @@
desc = "This will only bring death and destruction."
activation_message = "<span class='sans'>Uh oh!</span>"
deactivation_message = "Well thank god that's over with."
mutation=COMIC
mutation = COMIC
/datum/dna/gene/disability/comic/New()
..()
block = GLOB.comicblock
/datum/dna/gene/disability/wingdings
@@ -210,9 +245,10 @@
mutation = WINGDINGS
/datum/dna/gene/disability/wingdings/New()
..()
block = GLOB.wingdingsblock
/datum/dna/gene/disability/wingdings/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/wingdings/OnSay(mob/M, message)
var/list/chars = string2charlist(message)
var/garbled_message = ""
for(var/C in chars)
+22 -24
View File
@@ -11,63 +11,61 @@
/datum/dna/gene
// Display name
var/name="BASE GENE"
var/name = "BASE GENE"
// Probably won't get used but why the fuck not
var/desc="Oh god who knows what this does."
// Set in initialize()!
// What gene activates this?
var/block=0
var/block = 0
// Any of a number of GENE_ flags.
var/flags=0
var/flags = 0
// Chance of the gene to cause adverse effects when active
var/instability=0
var/instability = 0
/*
* Is the gene active in this mob's DNA?
*/
/datum/dna/gene/proc/is_active(var/mob/M)
/datum/dna/gene/proc/is_active(mob/M)
return M.active_genes && (type in M.active_genes)
// Return 1 if we can activate.
// HANDLE MUTCHK_FORCED HERE!
/datum/dna/gene/proc/can_activate(var/mob/M, var/flags)
return 0
/datum/dna/gene/proc/can_activate(mob/M, flags)
return FALSE
// Called when the gene activates. Do your magic here.
/datum/dna/gene/proc/activate(var/mob/living/M, var/connected, var/flags)
/datum/dna/gene/proc/activate(mob/living/M, connected, flags)
M.gene_stability -= instability
return
/**
* Called when the gene deactivates. Undo your magic here.
* Only called when the block is deactivated.
*/
/datum/dna/gene/proc/deactivate(var/mob/living/M, var/connected, var/flags)
/datum/dna/gene/proc/deactivate(mob/living/M, connected, flags)
M.gene_stability += instability
return
// This section inspired by goone's bioEffects.
/**
* Called in each life() tick.
*/
/datum/dna/gene/proc/OnMobLife(var/mob/M)
/datum/dna/gene/proc/OnMobLife(mob/M)
return
/**
* Called when the mob dies
*/
/datum/dna/gene/proc/OnMobDeath(var/mob/M)
/datum/dna/gene/proc/OnMobDeath(mob/M)
return
/**
* Called when the mob says shit
*/
/datum/dna/gene/proc/OnSay(var/mob/M, var/message)
/datum/dna/gene/proc/OnSay(mob/M, message)
return message
/**
@@ -77,7 +75,7 @@
* @params g Gender (m or f)
*/
/datum/dna/gene/proc/OnDrawUnderlays(mob/M, g)
return 0
return FALSE
/////////////////////
@@ -93,34 +91,34 @@
/datum/dna/gene/basic
name="BASIC GENE"
name = "BASIC GENE"
// Mutation to give
var/mutation=0
var/mutation = 0
// Activation probability
var/activation_prob=100
var/activation_prob = 100
// Possible activation messages
var/list/activation_messages=list()
var/list/activation_messages = list()
// Possible deactivation messages
var/list/deactivation_messages=list()
var/list/deactivation_messages = list()
/datum/dna/gene/basic/can_activate(var/mob/M,var/flags)
/datum/dna/gene/basic/can_activate(mob/M, flags)
if(flags & MUTCHK_FORCED)
return 1
return TRUE
// Probability check
return prob(activation_prob)
/datum/dna/gene/basic/activate(var/mob/M)
/datum/dna/gene/basic/activate(mob/M, connected, flags)
..()
M.mutations.Add(mutation)
if(activation_messages.len)
var/msg = pick(activation_messages)
to_chat(M, "<span class='notice'>[msg]</span>")
/datum/dna/gene/basic/deactivate(var/mob/M)
/datum/dna/gene/basic/deactivate(mob/living/M, connected, flags)
..()
M.mutations.Remove(mutation)
if(deactivation_messages.len)
+25 -26
View File
@@ -13,13 +13,13 @@
activation_message = "You feel unable to express yourself at all."
deactivation_message = "You feel able to speak freely again."
instability = -GENE_INSTABILITY_MODERATE
disability = MUTE
mutation = MUTE
/datum/dna/gene/disability/mute/New()
..()
block=GLOB.muteblock
block = GLOB.muteblock
/datum/dna/gene/disability/mute/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/mute/OnSay(mob/M, message)
return ""
////////////////////////////////////////
@@ -36,27 +36,26 @@
/datum/dna/gene/disability/radioactive/New()
..()
block=GLOB.radblock
block = GLOB.radblock
/datum/dna/gene/disability/radioactive/can_activate(var/mob/M,var/flags)
/datum/dna/gene/disability/radioactive/can_activate(mob/M, flags)
if(!..())
return 0
return FALSE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if((RADIMMUNE in H.dna.species.species_traits) && !(flags & MUTCHK_FORCED))
return 0
return 1
return FALSE
return TRUE
/datum/dna/gene/disability/radioactive/OnMobLife(var/mob/living/owner)
var/radiation_amount = abs(min(owner.radiation - 20,0))
owner.apply_effect(radiation_amount, IRRADIATE)
for(var/mob/living/L in range(1, owner))
if(L == owner)
/datum/dna/gene/disability/radioactive/OnMobLife(mob/living/carbon/human/H)
var/radiation_amount = abs(min(H.radiation - 20,0))
H.apply_effect(radiation_amount, IRRADIATE)
for(var/mob/living/L in range(1, H))
if(L == H)
continue
to_chat(L, "<span class='danger'>You are enveloped by a soft green glow emanating from [owner].</span>")
to_chat(L, "<span class='danger'>You are enveloped by a soft green glow emanating from [H].</span>")
L.apply_effect(5, IRRADIATE)
return
/datum/dna/gene/disability/radioactive/OnDrawUnderlays(mob/M, g)
return "rads_s"
@@ -76,7 +75,7 @@
/datum/dna/gene/disability/fat/New()
..()
block=GLOB.fatblock
block = GLOB.fatblock
// WAS: /datum/bioEffect/chav
/datum/dna/gene/disability/speech/chav
@@ -88,9 +87,9 @@
/datum/dna/gene/disability/speech/chav/New()
..()
block=GLOB.chavblock
block = GLOB.chavblock
/datum/dna/gene/disability/speech/chav/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/speech/chav/OnSay(mob/M, message)
// THIS ENTIRE THING BEGS FOR REGEX
message = replacetext(message,"dick","prat")
message = replacetext(message,"comdom","knob'ead")
@@ -127,9 +126,9 @@
/datum/dna/gene/disability/speech/swedish/New()
..()
block=GLOB.swedeblock
block = GLOB.swedeblock
/datum/dna/gene/disability/speech/swedish/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/speech/swedish/OnSay(mob/M, message)
// svedish
message = replacetextEx(message,"W","V")
message = replacetextEx(message,"w","v")
@@ -157,10 +156,10 @@
/datum/dna/gene/disability/unintelligable/New()
..()
block=GLOB.scrambleblock
block = GLOB.scrambleblock
/datum/dna/gene/disability/unintelligable/OnSay(var/mob/M, var/message)
var/prefix=copytext(message,1,2)
/datum/dna/gene/disability/unintelligable/OnSay(mob/M, message)
var/prefix = copytext(message,1,2)
if(prefix == ";")
message = copytext(message,2)
else if(prefix in list(":","#"))
@@ -197,7 +196,7 @@
/datum/dna/gene/disability/strong/New()
..()
block=GLOB.strongblock
block = GLOB.strongblock
// WAS: /datum/bioEffect/horns
/datum/dna/gene/disability/horns
@@ -209,7 +208,7 @@
/datum/dna/gene/disability/horns/New()
..()
block=GLOB.hornsblock
block = GLOB.hornsblock
/datum/dna/gene/disability/horns/OnDrawUnderlays(mob/M, g)
return "horns_s"
@@ -223,7 +222,7 @@
deactivation_messages = list("You no longer feel uncomfortably hot.")
mutation = IMMOLATE
spelltype=/obj/effect/proc_holder/spell/targeted/immolate
spelltype = /obj/effect/proc_holder/spell/targeted/immolate
/datum/dna/gene/basic/grant_spell/immolate/New()
..()
+45 -46
View File
@@ -2,26 +2,28 @@
// WAS: /datum/bioEffect/alcres
/datum/dna/gene/basic/sober
name="Sober"
activation_messages=list("You feel unusually sober.")
name = "Sober"
activation_messages = list("You feel unusually sober.")
deactivation_messages = list("You feel like you could use a stiff drink.")
mutation=SOBER
mutation = SOBER
/datum/dna/gene/basic/sober/New()
block=GLOB.soberblock
..()
block = GLOB.soberblock
//WAS: /datum/bioEffect/psychic_resist
/datum/dna/gene/basic/psychic_resist
name="Psy-Resist"
name = "Psy-Resist"
desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
activation_messages = list("Your mind feels closed.")
deactivation_messages = list("You feel oddly exposed.")
mutation=PSY_RESIST
mutation = PSY_RESIST
/datum/dna/gene/basic/psychic_resist/New()
block=GLOB.psyresistblock
..()
block = GLOB.psyresistblock
/////////////////////////
// Stealth Enhancers
@@ -30,16 +32,16 @@
/datum/dna/gene/basic/stealth
instability = GENE_INSTABILITY_MODERATE
/datum/dna/gene/basic/stealth/can_activate(var/mob/M, var/flags)
/datum/dna/gene/basic/stealth/can_activate(mob/M, flags)
// Can only activate one of these at a time.
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
testing("Cannot activate [type]: /datum/dna/gene/basic/stealth in M.active_genes.")
return 0
return ..(M,flags)
return FALSE
return ..()
/datum/dna/gene/basic/stealth/deactivate(var/mob/M)
..(M)
M.alpha=255
/datum/dna/gene/basic/stealth/deactivate(mob/living/M, connected, flags)
..()
M.alpha = 255
// WAS: /datum/bioEffect/darkcloak
/datum/dna/gene/basic/stealth/darkcloak
@@ -47,13 +49,14 @@
desc = "Enables the subject to bend low levels of light around themselves, creating a cloaking effect."
activation_messages = list("You begin to fade into the shadows.")
deactivation_messages = list("You become fully visible.")
activation_prob=25
activation_prob = 25
mutation = CLOAK
/datum/dna/gene/basic/stealth/darkcloak/New()
block=GLOB.shadowblock
..()
block = GLOB.shadowblock
/datum/dna/gene/basic/stealth/darkcloak/OnMobLife(var/mob/M)
/datum/dna/gene/basic/stealth/darkcloak/OnMobLife(mob/M)
var/turf/simulated/T = get_turf(M)
if(!istype(T))
return
@@ -69,13 +72,14 @@
desc = "The subject becomes able to subtly alter light patterns to become invisible, as long as they remain still."
activation_messages = list("You feel one with your surroundings.")
deactivation_messages = list("You feel oddly visible.")
activation_prob=25
activation_prob = 25
mutation = CHAMELEON
/datum/dna/gene/basic/stealth/chameleon/New()
block=GLOB.chameleonblock
..()
block = GLOB.chameleonblock
/datum/dna/gene/basic/stealth/chameleon/OnMobLife(var/mob/M)
/datum/dna/gene/basic/stealth/chameleon/OnMobLife(mob/M)
if((world.time - M.last_movement) >= 30 && !M.stat && M.canmove && !M.restrained())
M.alpha -= 25
else
@@ -86,27 +90,27 @@
/datum/dna/gene/basic/grant_spell
var/obj/effect/proc_holder/spell/spelltype
/datum/dna/gene/basic/grant_spell/activate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/grant_spell/activate(mob/M, connected, flags)
M.AddSpell(new spelltype(null))
..()
return 1
return TRUE
/datum/dna/gene/basic/grant_spell/deactivate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/grant_spell/deactivate(mob/M, connected, flags)
for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list)
if(istype(S, spelltype))
M.RemoveSpell(S)
..()
return 1
return TRUE
/datum/dna/gene/basic/grant_verb
var/verbtype
/datum/dna/gene/basic/grant_verb/activate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/grant_verb/activate(mob/M, connected, flags)
..()
M.verbs += verbtype
return 1
return TRUE
/datum/dna/gene/basic/grant_verb/deactivate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/grant_verb/deactivate(mob/M, connected, flags)
..()
M.verbs -= verbtype
@@ -183,8 +187,6 @@
new/obj/effect/self_deleting(C.loc, icon('icons/effects/genetics.dmi', "cryokinesis"))
return
/obj/effect/self_deleting
density = 0
opacity = 0
@@ -193,12 +195,11 @@
desc = ""
//layer = 15
/obj/effect/self_deleting/New(var/atom/location, var/icon/I, var/duration = 20, var/oname = "something")
src.name = oname
/obj/effect/self_deleting/New(atom/location, icon/I, duration = 20, oname = "something")
name = oname
loc=location
src.icon = I
spawn(duration)
qdel(src)
icon = I
QDEL_IN(src, duration)
///////////////////////////////////////////////////////////////////////////////////////////
@@ -255,7 +256,7 @@
/obj/item/implant
)
/obj/effect/proc_holder/spell/targeted/eat/proc/doHeal(var/mob/user)
/obj/effect/proc_holder/spell/targeted/eat/proc/doHeal(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
for(var/name in H.bodyparts_by_name)
@@ -300,12 +301,12 @@
perform(targets, user = user)
/obj/effect/proc_holder/spell/targeted/eat/proc/check_mouth(mob/user = usr)
var/can_eat = 1
var/can_eat = TRUE
if(iscarbon(user))
var/mob/living/carbon/C = user
if((C.head && (C.head.flags_cover & HEADCOVERSMOUTH)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSMOUTH) && !C.wear_mask.mask_adjusted))
to_chat(C, "<span class='warning'>Your mouth is covered, preventing you from eating!</span>")
can_eat = 0
can_eat = FALSE
return can_eat
/obj/effect/proc_holder/spell/targeted/eat/cast(list/targets, mob/user = usr)
@@ -320,17 +321,17 @@
if(!istype(limb))
to_chat(user, "<span class='warning'>You can't eat this part of them!</span>")
revert_cast()
return 0
return FALSE
if(istype(limb,/obj/item/organ/external/head))
// Bullshit, but prevents being unable to clone someone.
to_chat(user, "<span class='warning'>You try to put \the [limb] in your mouth, but [the_item.p_their()] ears tickle your throat!</span>")
revert_cast()
return 0
return FALSE
if(istype(limb,/obj/item/organ/external/chest))
// Bullshit, but prevents being able to instagib someone.
to_chat(user, "<span class='warning'>You try to put [the_item.p_their()] [limb] in your mouth, but it's too big to fit!</span>")
revert_cast()
return 0
return FALSE
user.visible_message("<span class='danger'>[user] begins stuffing [the_item]'s [limb.name] into [user.p_their()] gaping maw!</span>")
var/oldloc = H.loc
if(!do_mob(user,H,EAT_MOB_DELAY))
@@ -350,7 +351,6 @@
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
qdel(the_item)
doHeal(user)
return
////////////////////////////////////////////////////////////////////////
@@ -387,7 +387,7 @@
action_icon_state = "genetic_jump"
/obj/effect/proc_holder/spell/targeted/leap/cast(list/targets, mob/user = usr)
var/failure = 0
var/failure = FALSE
if(istype(user.loc,/mob/) || user.lying || user.stunned || user.buckled || user.stat)
to_chat(user, "<span class='warning'>You can't jump right now!</span>")
return
@@ -397,7 +397,7 @@
for(var/mob/M in range(user, 1))
if(M.pulling == user)
if(!M.restrained() && M.stat == 0 && M.canmove && user.Adjacent(M))
failure = 1
failure = TRUE
else
M.stop_pulling()
@@ -409,12 +409,12 @@
user.visible_message("<span class='warning'>[user] attempts to leap away but is slammed back down to the ground!</span>",
"<span class='warning'>You attempt to leap away but are suddenly slammed back down to the ground!</span>",
"<span class='notice'>You hear the flexing of powerful muscles and suddenly a crash as a body hits the floor.</span>")
return 0
return FALSE
var/prevLayer = user.layer
var/prevFlying = user.flying
user.layer = 9
user.flying = 1
user.flying = TRUE
for(var/i=0, i<10, i++)
step(user, user.dir)
if(i < 5) user.pixel_y += 8
@@ -508,7 +508,7 @@
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
instability = GENE_INSTABILITY_MINOR
mutation=EMPATH
mutation = EMPATH
/datum/dna/gene/basic/grant_spell/empath/New()
..()
@@ -614,4 +614,3 @@
to_chat(M, "<span class='warning'>You sense [user.name] reading your mind.</span>")
else if(prob(5) || M.mind.assigned_role=="Chaplain")
to_chat(M, "<span class='warning'>You sense someone intruding upon your thoughts...</span>")
return
+5 -4
View File
@@ -1,10 +1,11 @@
/datum/dna/gene/monkey
name="Monkey"
name = "Monkey"
/datum/dna/gene/monkey/New()
block=GLOB.monkeyblock
..()
block = GLOB.monkeyblock
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
/datum/dna/gene/monkey/can_activate(mob/M, flags)
return ishuman(M)
/datum/dna/gene/monkey/activate(mob/living/carbon/human/H, connected, flags)
@@ -21,7 +22,7 @@
H.regenerate_icons()
H.SetStunned(1)
H.canmove = 0
H.canmove = FALSE
H.icon = null
H.invisibility = 101
var/has_primitive_form = H.dna.species.primitive_form // cache this
+78 -63
View File
@@ -3,109 +3,121 @@
///////////////////////////////////
/datum/dna/gene/basic/nobreath
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
deactivation_messages=list("You feel the need to breathe, once more.")
name = "No Breathing"
activation_messages = list("You feel no need to breathe.")
deactivation_messages = list("You feel the need to breathe, once more.")
instability = GENE_INSTABILITY_MODERATE
mutation = BREATHLESS
activation_prob=25
activation_prob = 25
/datum/dna/gene/basic/nobreath/New()
..()
block = GLOB.breathlessblock
/datum/dna/gene/basic/regenerate
name="Regenerate"
activation_messages=list("Your wounds start healing.")
deactivation_messages=list("Your regenerative powers feel like they've vanished.")
name = "Regenerate"
activation_messages = list("Your wounds start healing.")
deactivation_messages = list("Your regenerative powers feel like they've vanished.")
instability = GENE_INSTABILITY_MINOR
mutation=REGEN
mutation = REGEN
/datum/dna/gene/basic/regenerate/New()
block=GLOB.regenerateblock
..()
block = GLOB.regenerateblock
/datum/dna/gene/basic/regenerate/OnMobLife(mob/living/carbon/human/H)
H.adjustBruteLoss(-0.1, FALSE)
H.adjustFireLoss(-0.1)
/datum/dna/gene/basic/increaserun
name="Super Speed"
activation_messages=list("You feel swift and unencumbered.")
deactivation_messages=list("You feel slow.")
name = "Super Speed"
activation_messages = list("You feel swift and unencumbered.")
deactivation_messages = list("You feel slow.")
instability = GENE_INSTABILITY_MINOR
mutation=RUN
mutation = RUN
/datum/dna/gene/basic/increaserun/New()
block=GLOB.increaserunblock
..()
block = GLOB.increaserunblock
/datum/dna/gene/basic/increaserun/can_activate(var/mob/M,var/flags)
/datum/dna/gene/basic/increaserun/can_activate(mob/M, flags)
if(!..())
return 0
return FALSE
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna.species && H.dna.species.speed_mod && !(flags & MUTCHK_FORCED))
return 0
return 1
return FALSE
return TRUE
/datum/dna/gene/basic/heat_resist
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
deactivation_messages=list("Your skin no longer feels icy to the touch.")
name = "Heat Resistance"
activation_messages = list("Your skin is icy to the touch.")
deactivation_messages = list("Your skin no longer feels icy to the touch.")
instability = GENE_INSTABILITY_MODERATE
mutation = HEATRES
/datum/dna/gene/basic/heat_resist/New()
block=GLOB.coldblock
..()
block = GLOB.coldblock
/datum/dna/gene/basic/heat_resist/OnDrawUnderlays(mob/M, g)
return "cold_s"
/datum/dna/gene/basic/cold_resist
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
deactivation_messages=list("Your body is no longer filled with warmth.")
name = "Cold Resistance"
activation_messages = list("Your body is filled with warmth.")
deactivation_messages = list("Your body is no longer filled with warmth.")
instability = GENE_INSTABILITY_MODERATE
mutation = COLDRES
/datum/dna/gene/basic/cold_resist/New()
block=GLOB.fireblock
..()
block = GLOB.fireblock
/datum/dna/gene/basic/cold_resist/OnDrawUnderlays(mob/M, g)
return "fire_s"
/datum/dna/gene/basic/noprints
name="No Prints"
activation_messages=list("Your fingers feel numb.")
deactivation_messages=list("your fingers no longer feel numb.")
name = "No Prints"
activation_messages = list("Your fingers feel numb.")
deactivation_messages = list("your fingers no longer feel numb.")
instability = GENE_INSTABILITY_MINOR
mutation=FINGERPRINTS
mutation = FINGERPRINTS
/datum/dna/gene/basic/noprints/New()
block=GLOB.noprintsblock
..()
block = GLOB.noprintsblock
/datum/dna/gene/basic/noshock
name="Shock Immunity"
activation_messages=list("Your skin feels dry and unreactive.")
deactivation_messages=list("Your skin no longer feels dry and unreactive.")
name = "Shock Immunity"
activation_messages = list("Your skin feels dry and unreactive.")
deactivation_messages = list("Your skin no longer feels dry and unreactive.")
instability = GENE_INSTABILITY_MODERATE
mutation=NO_SHOCK
mutation = NO_SHOCK
/datum/dna/gene/basic/noshock/New()
block=GLOB.shockimmunityblock
..()
block = GLOB.shockimmunityblock
/datum/dna/gene/basic/midget
name="Midget"
activation_messages=list("Everything around you seems bigger now...")
name = "Midget"
activation_messages = list("Everything around you seems bigger now...")
deactivation_messages = list("Everything around you seems to shrink...")
instability = GENE_INSTABILITY_MINOR
mutation=DWARF
mutation = DWARF
/datum/dna/gene/basic/midget/New()
block=GLOB.smallsizeblock
..()
block = GLOB.smallsizeblock
/datum/dna/gene/basic/midget/activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
/datum/dna/gene/basic/midget/activate(mob/M, connected, flags)
..()
M.pass_flags |= PASSTABLE
M.resize = 0.8
M.update_transform()
/datum/dna/gene/basic/midget/deactivate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/midget/deactivate(mob/M, connected, flags)
..()
M.pass_flags &= ~PASSTABLE
M.resize = 1.25
@@ -113,31 +125,32 @@
// OLD HULK BEHAVIOR
/datum/dna/gene/basic/hulk
name="Hulk"
activation_messages=list("Your muscles hurt.")
deactivation_messages=list("Your muscles shrink.")
name = "Hulk"
activation_messages = list("Your muscles hurt.")
deactivation_messages = list("Your muscles shrink.")
instability = GENE_INSTABILITY_MAJOR
mutation=HULK
activation_prob=15
mutation = HULK
activation_prob = 15
/datum/dna/gene/basic/hulk/New()
block=GLOB.hulkblock
..()
block = GLOB.hulkblock
/datum/dna/gene/basic/hulk/activate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/hulk/activate(mob/M, connected, flags)
..()
var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
M.status_flags &= ~status
/datum/dna/gene/basic/hulk/deactivate(var/mob/M, var/connected, var/flags)
/datum/dna/gene/basic/hulk/deactivate(mob/M, connected, flags)
..()
M.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH
/datum/dna/gene/basic/hulk/OnDrawUnderlays(mob/M, g)
if(HULK in M.mutations)
return "hulk_[g]_s"
return 0
return FALSE
/datum/dna/gene/basic/hulk/OnMobLife(var/mob/living/carbon/human/M)
/datum/dna/gene/basic/hulk/OnMobLife(mob/living/carbon/human/M)
if(!istype(M))
return
if((HULK in M.mutations) && M.health <= 0)
@@ -150,15 +163,16 @@
to_chat(M, "<span class='danger'>You suddenly feel very weak.</span>")
/datum/dna/gene/basic/xray
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
deactivation_messages=list("the walls around you re-appear.")
name = "X-Ray Vision"
activation_messages = list("The walls suddenly disappear.")
deactivation_messages = list("the walls around you re-appear.")
instability = GENE_INSTABILITY_MAJOR
mutation=XRAY
activation_prob=15
mutation = XRAY
activation_prob = 15
/datum/dna/gene/basic/xray/New()
block=GLOB.xrayblock
..()
block = GLOB.xrayblock
/datum/dna/gene/basic/xray/activate(mob/living/M, connected, flags)
..()
@@ -171,15 +185,16 @@
M.update_icons() //Remove eyeshine as needed.
/datum/dna/gene/basic/tk
name="Telekenesis"
name = "Telekenesis"
activation_messages = list("You feel smarter.")
deactivation_messages = list("You feel dumber.")
instability = GENE_INSTABILITY_MAJOR
mutation=TK
activation_prob=15
mutation = TK
activation_prob = 15
/datum/dna/gene/basic/tk/New()
block=GLOB.teleblock
..()
block = GLOB.teleblock
/datum/dna/gene/basic/tk/OnDrawUnderlays(mob/M, g)
return "telekinesishead_s"
+5 -5
View File
@@ -8,11 +8,11 @@
/datum/dna/gene/disability/speech/loud/New()
..()
block=GLOB.loudblock
block = GLOB.loudblock
/datum/dna/gene/disability/speech/loud/OnSay(var/mob/M, var/message)
/datum/dna/gene/disability/speech/loud/OnSay(mob/M, message)
message = replacetext(message,".","!")
message = replacetext(message,"?","?!")
message = replacetext(message,"!","!!")
@@ -28,15 +28,15 @@
/datum/dna/gene/disability/dizzy/New()
..()
block=GLOB.dizzyblock
block = GLOB.dizzyblock
/datum/dna/gene/disability/dizzy/OnMobLife(var/mob/living/carbon/human/M)
/datum/dna/gene/disability/dizzy/OnMobLife(mob/living/carbon/human/M)
if(!istype(M))
return
if(DIZZY in M.mutations)
M.Dizzy(300)
/datum/dna/gene/disability/dizzy/deactivate(mob/living/M, connected, flags)
. = ..()
..()
M.SetDizzy(0)
+32 -25
View File
@@ -4,10 +4,10 @@
name = "Morphism"
desc = "Enables the subject to reconfigure their appearance to that of any human."
spelltype =/obj/effect/proc_holder/spell/targeted/morph
activation_messages=list("Your body feels if can alter its appearance.")
activation_messages = list("Your body feels if can alter its appearance.")
deactivation_messages = list("Your body doesn't feel capable of altering its appearance.")
instability = GENE_INSTABILITY_MINOR
mutation=MORPH
mutation = MORPH
/datum/dna/gene/basic/grant_spell/morph/New()
..()
@@ -29,7 +29,8 @@
action_icon_state = "genetic_morph"
/obj/effect/proc_holder/spell/targeted/morph/cast(list/targets, mob/user = usr)
if(!ishuman(user)) return
if(!ishuman(user))
return
if(istype(user.loc,/mob/))
to_chat(user, "<span class='warning'>You can't change your appearance right now!</span>")
@@ -176,21 +177,21 @@
M.visible_message("<span class='notice'>[src] morphs and changes [p_their()] appearance!</span>", "<span class='notice'>You change your appearance!</span>", "<span class='warning'>Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!</span>")
/datum/dna/gene/basic/grant_spell/remotetalk
name="Telepathy"
activation_messages=list("You feel you can project your thoughts.")
deactivation_messages=list("You no longer feel you can project your thoughts.")
name = "Telepathy"
activation_messages = list("You feel you can project your thoughts.")
deactivation_messages = list("You no longer feel you can project your thoughts.")
instability = GENE_INSTABILITY_MINOR
mutation=REMOTE_TALK
mutation = REMOTE_TALK
spelltype =/obj/effect/proc_holder/spell/targeted/remotetalk
/datum/dna/gene/basic/grant_spell/remotetalk/New()
..()
block=GLOB.remotetalkblock
block = GLOB.remotetalkblock
/datum/dna/gene/basic/grant_spell/remotetalk/activate(mob/user)
/datum/dna/gene/basic/grant_spell/remotetalk/activate(mob/living/M, connected, flags)
..()
user.AddSpell(new /obj/effect/proc_holder/spell/targeted/mindscan(null))
M.AddSpell(new /obj/effect/proc_holder/spell/targeted/mindscan(null))
/datum/dna/gene/basic/grant_spell/remotetalk/deactivate(mob/user)
..()
@@ -336,22 +337,23 @@
return ..()
/datum/dna/gene/basic/grant_spell/remoteview
name="Remote Viewing"
activation_messages=list("Your mind can see things from afar.")
deactivation_messages=list("Your mind can no longer can see things from afar.")
name = "Remote Viewing"
activation_messages = list("Your mind can see things from afar.")
deactivation_messages = list("Your mind can no longer can see things from afar.")
instability = GENE_INSTABILITY_MINOR
mutation=REMOTE_VIEW
mutation = REMOTE_VIEW
spelltype =/obj/effect/proc_holder/spell/targeted/remoteview
/datum/dna/gene/basic/grant_spell/remoteview/New()
block=GLOB.remoteviewblock
..()
block = GLOB.remoteviewblock
/obj/effect/proc_holder/spell/targeted/remoteview
name = "Remote View"
desc = "Spy on people from any range!"
charge_max = 600
charge_max = 100
clothes_req = 0
stat_allowed = 0
@@ -363,18 +365,23 @@
/obj/effect/proc_holder/spell/targeted/remoteview/choose_targets(mob/user = usr)
var/list/targets = list()
var/list/remoteviewers = new /list()
for(var/mob/M in GLOB.living_mob_list)
var/list/remoteviewers = list()
for(var/mob/M in GLOB.alive_mob_list)
if(M == user)
continue
if(PSY_RESIST in M.mutations)
continue
if(REMOTE_VIEW in M.mutations)
remoteviewers += M
if(!remoteviewers.len || remoteviewers.len == 1)
if(!LAZYLEN(remoteviewers))
to_chat(user, "<span class='warning'>No valid targets with remote view were found!</span>")
start_recharge()
return
targets += input("Choose the target to spy on.", "Targeting") as mob in remoteviewers
targets += input("Choose the target to spy on.", "Targeting") as null|anything in remoteviewers
if(!targets)
to_chat(user, "<span class='warning'>You decide against remote viewing.</span>")
start_recharge()
return
perform(targets, user = user)
/obj/effect/proc_holder/spell/targeted/remoteview/cast(list/targets, mob/user = usr)
@@ -386,15 +393,15 @@
var/mob/target
if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab/))
if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
to_chat(H, "<span class='warning'>Your mind is too busy with that telekinetic grab.</span>")
H.remoteview_target = null
H.reset_perspective(0)
H.reset_perspective()
return
if(H.client.eye != user.client.mob)
H.remoteview_target = null
H.reset_perspective(0)
H.reset_perspective()
return
for(var/mob/living/L in targets)
@@ -405,4 +412,4 @@
H.reset_perspective(target)
else
H.remoteview_target = null
H.reset_perspective(0)
H.reset_perspective()
+6 -2
View File
@@ -35,11 +35,15 @@
color = blob_reagent_datum.complementary_color
..()
START_PROCESSING(SSobj, src)
/mob/camera/blob/Life(seconds, times_fired)
/mob/camera/blob/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/mob/camera/blob/process()
if(!blob_core)
qdel(src)
..()
/mob/camera/blob/Login()
..()
+1 -1
View File
@@ -357,7 +357,7 @@
if(!surrounding_turfs.len)
return
for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in GLOB.living_mob_list)
for(var/mob/living/simple_animal/hostile/blob/blobspore/BS in GLOB.alive_mob_list)
if(isturf(BS.loc) && get_dist(BS, T) <= 35)
BS.LoseTarget()
BS.Goto(pick(surrounding_turfs), BS.move_to_delay)
@@ -49,7 +49,7 @@
/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life()
..()
var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes)
if(owner.eye_blind || owner.eye_blurry || (owner.disabilities & BLIND) || (owner.disabilities & NEARSIGHTED) || (E.damage > 0))
if(owner.eye_blind || owner.eye_blurry || (BLINDNESS in owner.mutations) || (NEARSIGHTED in owner.mutations) || (E.damage > 0))
owner.reagents.add_reagent("oculine", 1)
/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat()
@@ -16,11 +16,8 @@
user.emote("deathgasp")
user.timeofdeath = world.time
user.status_flags |= FAKEDEATH //play dead
user.update_stat("fakedeath sting")
user.updatehealth("fakedeath sting")
user.update_canmove()
user.med_hud_set_health()
user.handle_hud_icons_health()
user.med_hud_set_status()
user.mind.changeling.regenerating = TRUE
addtimer(CALLBACK(src, .proc/ready_to_regenerate, user), LING_FAKEDEATH_TIME)
@@ -95,8 +95,8 @@
user.unEquip(user.head)
user.unEquip(user.wear_suit)
user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, 1, 1, 1)
user.equip_to_slot_if_possible(new helmet_type(user), slot_head, 1, 1, 1)
user.equip_to_slot_if_possible(new suit_type(user), slot_wear_suit, TRUE, TRUE)
user.equip_to_slot_if_possible(new helmet_type(user), slot_head, TRUE, TRUE)
var/datum/changeling/changeling = user.mind.changeling
changeling.chem_recharge_slowdown += recharge_slowdown
+2 -2
View File
@@ -23,7 +23,7 @@
if(!message)
return
if((user.disabilities & MUTE) || user.mind.miming) //Under vow of silence/mute?
if((MUTE in user.mutations) || user.mind.miming) //Under vow of silence/mute?
user.visible_message("[user] appears to whisper to themselves.","You begin to whisper to yourself.") //Make them do *something* abnormal.
else
user.whisper("O bidai nabora se[pick("'","`")]sma!") // Otherwise book club sayings.
@@ -32,7 +32,7 @@
if(!user)
return
if(!((user.disabilities & MUTE) || user.mind.miming)) // If they aren't mute/miming, commence the whisperting
if(!((MUTE in user.mutations) || user.mind.miming)) // If they aren't mute/miming, commence the whisperting
user.whisper(message)
var/my_message
if(istype(user, /mob/living/simple_animal/slaughter/cult)) //Harbringers of the Slaughter
@@ -5,7 +5,7 @@
return 1
return 0
/mob/living/carbon/true_devil/update_inv_r_hand(var/update_icons=1)
/mob/living/carbon/true_devil/update_inv_r_hand()
..()
if(r_hand)
var/t_state = r_hand.item_state
@@ -17,11 +17,10 @@
devil_overlays[DEVIL_R_HAND_LAYER] = I
else
devil_overlays[DEVIL_R_HAND_LAYER] = null
if(update_icons)
update_icons()
update_icons()
/mob/living/carbon/true_devil/update_inv_l_hand(var/update_icons=1)
/mob/living/carbon/true_devil/update_inv_l_hand()
..()
if(l_hand)
var/t_state = l_hand.item_state
@@ -33,8 +32,7 @@
devil_overlays[DEVIL_L_HAND_LAYER] = I
else
devil_overlays[DEVIL_L_HAND_LAYER] = null
if(update_icons)
update_icons()
update_icons()
/mob/living/carbon/true_devil/proc/remove_overlay(cache_index)
if(devil_overlays[cache_index])
@@ -590,8 +590,6 @@
GrantBorerActions()
RemoveInfestActions()
forceMove(get_turf(host))
reset_perspective(null)
machine = null
host.reset_perspective(null)
@@ -112,7 +112,7 @@
summoner.death()
/mob/living/simple_animal/hostile/guardian/handle_hud_icons_health()
/mob/living/simple_animal/hostile/guardian/update_health_hud()
if(summoner)
var/resulthealth
if(iscarbon(summoner))
@@ -121,8 +121,6 @@
resulthealth = round((summoner.health / summoner.maxHealth) * 100)
if(hud_used)
hud_used.guardianhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#efeeef'>[resulthealth]%</font></div>"
med_hud_set_health()
med_hud_set_status()
/mob/living/simple_animal/hostile/guardian/adjustHealth(amount, updating_health = TRUE) //The spirit is invincible, but passes on damage to the summoner
var/damage = amount * damage_transfer
@@ -286,7 +284,7 @@
var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
/obj/item/guardiancreator/attack_self(mob/living/user)
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list)
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.alive_mob_list)
if(G.summoner == user)
to_chat(user, "You already have a [mob_name]!")
return
@@ -139,7 +139,7 @@
/obj/effect/proc_holder/spell/targeted/sense_victims/cast(list/targets, mob/user)
var/list/victims = targets
for(var/mob/living/L in GLOB.living_mob_list)
for(var/mob/living/L in GLOB.alive_mob_list)
if(!L.stat && !iscultist(L) && L.key && L != usr)
victims.Add(L)
if(!targets.len)
+1 -1
View File
@@ -336,7 +336,7 @@
if(head_revolutionaries.len || GAMEMODE_IS_REVOLUTION)
var/num_revs = 0
var/num_survivors = 0
for(var/mob/living/carbon/survivor in GLOB.living_mob_list)
for(var/mob/living/carbon/survivor in GLOB.alive_mob_list)
if(survivor.ckey)
num_survivors++
if(survivor.mind)
+1 -1
View File
@@ -34,7 +34,7 @@
//message_admins("Assigning DNA blocks:")
// Standard muts
GLOB.blindblock = getAssignedBlock("BLIND", numsToAssign)
GLOB.blindblock = getAssignedBlock("BLINDNESS", numsToAssign)
GLOB.colourblindblock = getAssignedBlock("COLOURBLIND", numsToAssign)
GLOB.deafblock = getAssignedBlock("DEAF", numsToAssign)
GLOB.hulkblock = getAssignedBlock("HULK", numsToAssign, DNA_HARD_BOUNDS, good=1)
@@ -375,7 +375,7 @@
to_chat(target, "<span class='shadowling'><b>You focus your telepathic energies abound, harnessing and drawing together the strength of your thralls.</b></span>")
for(M in GLOB.living_mob_list)
for(M in GLOB.alive_mob_list)
if(is_thrall(M))
thralls++
to_chat(M, "<span class='shadowling'>You feel hooks sink into your mind and pull.</span>")
@@ -413,7 +413,7 @@
else if(thralls >= victory_threshold)
to_chat(target, "<span class='shadowling'><b>You are now powerful enough to ascend. Use the Ascendance ability when you are ready. <i>This will kill all of your thralls.</i></span>")
to_chat(target, "<span class='shadowling'><b>You may find Ascendance in the Shadowling Evolution tab.</b></span>")
for(M in GLOB.living_mob_list)
for(M in GLOB.alive_mob_list)
if(is_shadow(M))
var/obj/effect/proc_holder/spell/targeted/collective_mind/CM
if(CM in M.mind.spell_list)
@@ -243,7 +243,7 @@
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.update_body()
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
+2 -2
View File
@@ -809,7 +809,7 @@ GLOBAL_LIST_EMPTY(multiverse)
return
return ..()
/obj/item/voodoo/check_eye(mob/user as mob)
/obj/item/voodoo/check_eye(mob/user)
if(loc != user)
user.reset_perspective(null)
user.unset_machine()
@@ -866,7 +866,7 @@ GLOBAL_LIST_EMPTY(multiverse)
possible = list()
if(!link)
return
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(md5(H.dna.uni_identity) in link.fingerprints)
possible |= H
+1 -1
View File
@@ -1011,7 +1011,7 @@
magichead.voicechange = 1 //NEEEEIIGHH
if(!user.unEquip(user.wear_mask))
qdel(user.wear_mask)
user.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
user.equip_to_slot_if_possible(magichead, slot_wear_mask, TRUE, TRUE)
qdel(src)
else
to_chat(user, "<span class='notice'>I say thee neigh</span>")
+6 -6
View File
@@ -314,9 +314,9 @@
occupantData["intOrgan"] = intOrganData
occupantData["blind"] = (occupant.disabilities & BLIND)
occupantData["colourblind"] = (occupant.disabilities & COLOURBLIND)
occupantData["nearsighted"] = (occupant.disabilities & NEARSIGHTED)
occupantData["blind"] = (BLINDNESS in occupant.mutations)
occupantData["colourblind"] = (COLOURBLIND in occupant.mutations)
occupantData["nearsighted"] = (NEARSIGHTED in occupant.mutations)
data["occupant"] = occupantData
return data
@@ -498,11 +498,11 @@
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech][dead]</td><td></td>"
dat += "</tr>"
dat += "</table>"
if(occupant.disabilities & BLIND)
if(BLINDNESS in occupant.mutations)
dat += "<font color='red'>Cataracts detected.</font><BR>"
if(occupant.disabilities & COLOURBLIND)
if(COLOURBLIND in occupant.mutations)
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><BR>"
if(occupant.disabilities & NEARSIGHTED)
if(NEARSIGHTED in occupant.mutations)
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
else
dat += "[src] is empty."
+3 -2
View File
@@ -53,6 +53,9 @@
return TRUE
/obj/machinery/computer/security/check_eye(mob/user)
if((stat & (NOPOWER|BROKEN)) || user.incapacitated() || !user.has_vision())
user.unset_machine()
return
if(!(user in watchers))
user.unset_machine()
return
@@ -65,8 +68,6 @@
return
if(!can_access_camera(C, user))
user.unset_machine()
return
return 1
/obj/machinery/computer/security/on_unset_machine(mob/user)
watchers.Remove(user)
@@ -37,17 +37,14 @@
eyeobj.RemoveImages()
eyeobj.eye_user = null
user.remote_control = null
user.remote_view = FALSE
current_user = null
user.unset_machine()
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.has_vision() || user.incapacitated())
if((stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || !user.has_vision() || user.incapacitated())
user.unset_machine()
return 0
return 1
/obj/machinery/computer/camera_advanced/Destroy()
if(current_user)
@@ -99,8 +96,6 @@
current_user = user
eyeobj.eye_user = user
eyeobj.name = "Camera Eye ([user.name])"
// This should be able to be excised once the full view refactor rolls out
user.remote_view = 1
user.remote_control = eyeobj
user.reset_perspective(eyeobj)
+8 -2
View File
@@ -533,11 +533,17 @@
/datum/data/function/proc/display()
return
/obj/machinery/atmospherics/components/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
/obj/machinery/atmospherics/unary/cryo_cell/get_remote_view_fullscreens(mob/user)
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/machinery/atmospherics/components/unary/cryo_cell/update_remote_sight(mob/living/user)
/obj/machinery/atmospherics/unary/cryo_cell/update_remote_sight(mob/living/user)
return //we don't see the pipe network while inside cryo.
/obj/machinery/atmospherics/unary/cryo_cell/can_crawl_through()
return // can't ventcrawl in or out of cryo.
/obj/machinery/atmospherics/unary/cryo_cell/can_see_pipes()
return FALSE // you can't see the pipe network when inside a cryo cell.
#undef AUTO_EJECT_HEALTHY
#undef AUTO_EJECT_DEAD
+1 -1
View File
@@ -444,7 +444,7 @@
control_computer.frozen_crew += "[occupant.real_name]"
var/ailist[] = list()
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
+1 -1
View File
@@ -317,7 +317,7 @@
scramble(1, H, 100)
H.generate_name()
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.update_body()
H.reset_hair()
H.dna.ResetUIFrom(H)
-1
View File
@@ -1102,7 +1102,6 @@
occupant = H
H.stop_pulling()
H.forceMove(src)
H.reset_perspective(src)
add_fingerprint(H)
GrantActions(H, human_occupant = 1)
forceMove(loc)
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
user.blood_DNA |= blood_DNA.Copy()
user.bloody_hands += taken
user.hand_blood_color = basecolor
user.update_inv_gloves(1)
user.update_inv_gloves()
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
/obj/effect/decal/cleanable/blood/can_bloodcrawl_in()
+10 -12
View File
@@ -54,21 +54,21 @@
user.set_machine(src)
interact(user)
/obj/item/camera_bug/check_eye(var/mob/user as mob)
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
user.reset_perspective(null)
/obj/item/camera_bug/check_eye(mob/user)
if(loc != user || user.incapacitated() || !user.has_vision() || !current)
user.unset_machine()
return null
var/turf/T = get_turf(user.loc)
if(T.z != current.z || !current.can_use())
return FALSE
var/turf/T_user = get_turf(user.loc)
var/turf/T_current = get_turf(current)
if(!atoms_share_level(T_user, T_current) || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.reset_perspective(null)
user.unset_machine()
return null
return FALSE
return TRUE
return 1
/obj/item/camera_bug/on_unset_machine(mob/user)
user.reset_perspective(null)
/obj/item/camera_bug/proc/get_cameras()
if(world.time > (last_net_update + 100))
@@ -182,7 +182,6 @@
/obj/item/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -233,7 +232,6 @@
interact()
else
usr.unset_machine()
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
@@ -76,7 +76,7 @@
new G(T) //Spawns the switch-selected engine on the chosen beacon's turf
var/ailist[] = list()
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
@@ -74,7 +74,7 @@
if(istype(H)) //robots and aliens are unaffected
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
if(M.stat == DEAD || !eyes || (BLINDNESS in M.mutations)) //mob is dead or fully blind
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
+3 -3
View File
@@ -859,11 +859,11 @@ REAGENT SCANNER
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
dat += "</tr>"
dat += "</table>"
if(target.disabilities & BLIND)
if(BLINDNESS in target.mutations)
dat += "<font color='red'>Cataracts detected.</font><BR>"
if(target.disabilities & COLOURBLIND)
if(COLOURBLIND in target.mutations)
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><BR>"
if(target.disabilities & NEARSIGHTED)
if(NEARSIGHTED in target.mutations)
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
return dat
@@ -74,7 +74,7 @@
R.stat = CONSCIOUS
GLOB.dead_mob_list -= R //please never forget this ever kthx
GLOB.living_mob_list += R
GLOB.alive_mob_list += R
R.notify_ai(1)
return 1
+1 -1
View File
@@ -360,7 +360,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = FALSE
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
M.update_inv_wear_mask()
STOP_PROCESSING(SSobj, src)
return
smoke()
@@ -45,7 +45,7 @@
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.update_body()
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
@@ -49,8 +49,7 @@
to_chat(user, "<span class='notice'>You cut open the present.</span>")
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
M.reset_perspective(null)
M.forceMove(loc)
qdel(src)
@@ -37,7 +37,7 @@
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_organ_damage(5,5)
active = !active
@@ -290,7 +290,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.disabilities & CLUMSY && prob(50))
if((CLUMSY in H.mutations) && prob(50))
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
H.take_organ_damage(10,10)
active = !active
+1 -1
View File
@@ -76,7 +76,7 @@
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
user.take_organ_damage(5)
active = !active
@@ -19,7 +19,7 @@
L.buckled = 0
L.anchored = 0
L.forceMove(src)
L.disabilities += MUTE
L.mutations |= MUTE
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
@@ -69,7 +69,7 @@
for(var/mob/living/M in src)
M.forceMove(loc)
M.disabilities -= MUTE
M.mutations -= MUTE
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
..()
@@ -144,9 +144,7 @@
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
mob.forceMove(loc)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -158,9 +156,7 @@
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
mob.forceMove(loc)
else
station.open_animation()
+12 -12
View File
@@ -411,7 +411,7 @@
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
M.update_inv_back()
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
@@ -437,38 +437,38 @@
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0,0)
H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0,0)
H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0,0)
H.update_inv_w_uniform()
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
H.update_inv_gloves()
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0,0)
H.update_inv_shoes()
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
H.update_inv_wear_mask()
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
H.update_inv_glasses()
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
H.update_inv_ears()
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
H.update_inv_ears()
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
H.update_inv_belt()
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
M.update_inv_wear_mask()
else
O.clean_blood()
+1 -1
View File
@@ -1980,7 +1980,7 @@
to_chat(usr, "<span class='warning'>ERROR: This mob ([H]) has no mind!</span>")
return
var/list/possible_traitors = list()
for(var/mob/living/player in GLOB.living_mob_list)
for(var/mob/living/player in GLOB.alive_mob_list)
if(player.client && player.mind && player.stat != DEAD && player != H)
if(ishuman(player) && !player.mind.special_role)
if(player.client && (ROLE_TRAITOR in player.client.prefs.be_special) && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate"))
+11 -9
View File
@@ -716,23 +716,25 @@ GLOBAL_PROTECT(AdminProcCaller)
if(!check_rights(R_DEBUG))
return
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
switch(input("Which list?") in list("Players", "Admins", "Mobs", "Living Mobs", "Alive Mobs", "Dead Mobs", "Silicons", "Clients", "Respawnable Mobs"))
if("Players")
to_chat(usr, jointext(GLOB.player_list,","))
to_chat(usr, jointext(GLOB.player_list, ","))
if("Admins")
to_chat(usr, jointext(GLOB.admins,","))
to_chat(usr, jointext(GLOB.admins, ","))
if("Mobs")
to_chat(usr, jointext(GLOB.mob_list,","))
to_chat(usr, jointext(GLOB.mob_list, ","))
if("Living Mobs")
to_chat(usr, jointext(GLOB.living_mob_list,","))
to_chat(usr, jointext(GLOB.mob_living_list, ","))
if("Alive Mobs")
to_chat(usr, jointext(GLOB.alive_mob_list, ","))
if("Dead Mobs")
to_chat(usr, jointext(GLOB.dead_mob_list,","))
to_chat(usr, jointext(GLOB.dead_mob_list, ","))
if("Silicons")
to_chat(usr, jointext(GLOB.silicon_mob_list,","))
to_chat(usr, jointext(GLOB.silicon_mob_list, ","))
if("Clients")
to_chat(usr, jointext(GLOB.clients,","))
to_chat(usr, jointext(GLOB.clients, ","))
if("Respawnable Mobs")
to_chat(usr, jointext(GLOB.respawnable_list,","))
to_chat(usr, jointext(GLOB.respawnable_list, ","))
/client/proc/cmd_display_del_log()
set category = "Debug"
+2 -2
View File
@@ -979,7 +979,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/role_string
var/obj_count = 0
var/obj_string = ""
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(!isLivingSSD(H))
continue
mins_ssd = round((world.time - H.last_logout) / 600)
@@ -1016,7 +1016,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
msg += "AFK Players:<BR><TABLE border='1'>"
msg += "<TR><TD><B>Key</B></TD><TD><B>Real Name</B></TD><TD><B>Job</B></TD><TD><B>Mins AFK</B></TD><TD><B>Special Role</B></TD><TD><B>Area</B></TD><TD><B>PPN</B></TD><TD><B>Cryo</B></TD></TR>"
var/mins_afk
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.client == null || H.stat == DEAD) // No clientless or dead
continue
mins_afk = round(H.client.inactivity / 600)
@@ -173,23 +173,9 @@
to_chat(C, "<span class='notice'>Death is not your end!</span>")
spawn(rand(800,1200))
if(C.stat == DEAD)
GLOB.dead_mob_list -= C
GLOB.living_mob_list += C
C.stat = CONSCIOUS
C.timeofdeath = 0
C.setToxLoss(0)
C.setOxyLoss(0)
C.setCloneLoss(0)
C.SetParalysis(0)
C.SetStunned(0)
C.SetWeakened(0)
C.radiation = 0
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents()
C.revive()
to_chat(C, "<span class='notice'>You have regenerated.</span>")
C.visible_message("<span class='warning'>[usr] appears to wake from the dead, having healed all wounds.</span>")
C.update_canmove()
return 1
/obj/item/wildwest_communicator
@@ -247,7 +233,7 @@
used = TRUE
/obj/item/wildwest_communicator/proc/stand_down()
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.alive_mob_list)
W.on_alert = FALSE
/mob/living/simple_animal/hostile/syndicate/ranged/wildwest
@@ -262,6 +248,6 @@
// putting this up here so we don't say anything after deathgasp
if(can_die() && !on_alert)
say("How could you betray the Syndicate?")
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.living_mob_list)
for(var/mob/living/simple_animal/hostile/syndicate/ranged/wildwest/W in GLOB.alive_mob_list)
W.on_alert = TRUE
return ..(gibbed)
-1
View File
@@ -20,7 +20,6 @@
var/skip_antag = FALSE //TRUE when a player declines to be included for the selection process of game mode antagonists.
var/move_delay = 1
var/moving = null
var/adminobs = null
var/area = null
var/time_died_as_mouse = null //when the client last died as a mouse
+1 -2
View File
@@ -376,7 +376,6 @@
desc = "Covers the eyes, preventing sight."
icon_state = "blindfold"
item_state = "blindfold"
//vision_flags = BLIND
flash_protect = 2
tint = 3 //to make them blind
prescription_upgradable = 0
@@ -412,7 +411,7 @@
if(M.glasses == src)
M.EyeBlind(3)
M.EyeBlurry(5)
if(!(M.disabilities & NEARSIGHTED))
if(!(NEARSIGHTED in M.mutations))
M.BecomeNearsighted()
spawn(100)
M.CureNearsighted()
+1 -1
View File
@@ -798,7 +798,7 @@
to_chat(wearer, "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>")
return
use_obj.forceMove(wearer)
if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, 0, 1))
if(!wearer.equip_to_slot_if_possible(use_obj, equip_to, FALSE, TRUE))
use_obj.forceMove(src)
else
if(wearer)
+1 -1
View File
@@ -59,7 +59,7 @@
if(H.head)
to_chat(H,"<span class='warning'>You're already wearing something on your head!</span>")
return
else if(H.equip_to_slot_if_possible(hood, slot_head, 0, 0, 1))
else if(H.equip_to_slot_if_possible(hood, slot_head, FALSE, FALSE))
suit_adjusted = 1
icon_state = "[initial(icon_state)]_hood"
H.update_inv_wear_suit()
+1 -1
View File
@@ -68,7 +68,7 @@
if(H.head)
to_chat(H, "<span class='warning'>You're already wearing something on your head!</span>")
return
else if(H.equip_to_slot_if_possible(helmet, slot_head, 0 ,0, 1))
else if(H.equip_to_slot_if_possible(helmet, slot_head, FALSE, FALSE))
to_chat(H, "<span class='notice'>You engage the helmet on the hardsuit.</span>")
suittoggled = TRUE
H.update_inv_wear_suit()
+1 -1
View File
@@ -20,7 +20,7 @@
GLOB.event_announcement.Announce("Confirmed outbreak of level 7 major viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event/disease_outbreak/start()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(!H.client)
continue
if(issmall(H)) //don't infect monkies; that's a waste
+1 -1
View File
@@ -22,7 +22,7 @@
/datum/event/ion_storm/start()
//AI laws
for(var/mob/living/silicon/ai/M in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/M in GLOB.alive_mob_list)
if(M.stat != DEAD && M.see_in_dark != FALSE)
var/message = generate_ion_law(ionMessage)
if(message)
+1 -1
View File
@@ -2,7 +2,7 @@
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
var/armor = H.getarmor(type = "rad")
if((RADIMMUNE in H.dna.species.species_traits) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected
continue
+1 -1
View File
@@ -8,7 +8,7 @@
var/list/potential = list()
var/sentience_type = SENTIENCE_ORGANIC
for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
var/turf/T = get_turf(L)
if (T.z != 1)
continue
@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.alive_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste.
continue
if(!H.client)
+3 -3
View File
@@ -460,7 +460,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
target = T
var/image/A = null
var/kind = force_kind ? force_kind : pick("clown", "corgi", "carp", "skeleton", "demon","zombie")
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H == target)
continue
if(skip_nearby && (H in view(target)))
@@ -539,7 +539,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/mob/living/carbon/human/clone = null
var/clone_weapon = null
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
if(H.stat || H.lying)
continue
clone = H
@@ -751,7 +751,7 @@ GLOBAL_LIST_INIT(non_fakeattack_weapons, list(/obj/item/gun/projectile, /obj/ite
target.client.images.Remove(speech_overlay)
else // Radio talk
var/list/humans = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
humans += H
person = pick(humans)
target.hear_radio(message_to_multilingual(pick(radio_messages), pick(person.languages)), speaker = person, part_a = "<span class='[SSradio.frequency_span_class(PUB_FREQ)]'><b>\[[get_frequency_name(PUB_FREQ)]\]</b> <span class='name'>", part_b = "</span> <span class='message'>")
+1 -1
View File
@@ -227,7 +227,7 @@
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
add_fingerprint(user)
if((CLUMSY in user.disabilities) && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Weaken(3)
if(ishuman(user))
@@ -306,7 +306,7 @@
if(H.stat == DEAD)
H.set_species(/datum/species/shadow)
H.revive()
H.disabilities |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal
H.mutations |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE)
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
@@ -458,7 +458,7 @@
if(isliving(A) && holder_animal)
var/mob/living/L = A
L.notransform = 1
L.disabilities |= MUTE
L.mutations |= MUTE
L.status_flags |= GODMODE
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
@@ -468,7 +468,7 @@
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
L.disabilities &= ~MUTE
L.mutations -=MUTE
L.status_flags &= ~GODMODE
L.notransform = 0
if(holder_animal && !QDELETED(holder_animal))
@@ -91,10 +91,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
..()
/mob/dead/observer/Destroy()
if(ismob(following))
var/mob/M = following
M.following_mobs -= src
following = null
if(ghostimage)
GLOB.ghost_images -= ghostimage
QDEL_NULL(ghostimage)
@@ -142,13 +138,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
/mob/dead/observer/Life(seconds, times_fired)
..()
if(!loc) return
if(!client) return 0
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
@@ -477,28 +466,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
setDir(2)//reset dir so the right directional sprites show up
return ..()
/mob/proc/update_following()
. = get_turf(src)
for(var/mob/dead/observer/M in following_mobs)
if(M.following != src)
following_mobs -= M
else
if(M.loc != .)
M.forceMove(.)
/mob
var/list/following_mobs = list()
/mob/Move()
. = ..()
if(.)
update_following()
/mob/Life(seconds, times_fired)
// to catch teleports etc which directly set loc
update_following()
return ..()
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
set name = "Jump to Mob"
-1
View File
@@ -22,7 +22,6 @@
var/atom/movable/mob_container
mob_container = M
mob_container.forceMove(get_turf(src))
M.reset_perspective()
qdel(src)
+2 -2
View File
@@ -214,9 +214,9 @@
if(M.equip_to_appropriate_slot(src))
if(M.hand)
M.update_inv_l_hand(0)
M.update_inv_l_hand()
else
M.update_inv_r_hand(0)
M.update_inv_r_hand()
return 1
if(M.s_active && M.s_active.can_be_inserted(src, 1)) //if storage active insert there
+1 -1
View File
@@ -619,7 +619,7 @@
var/message_start_dead = "<i><span class='game say'>[name], <span class='name'>[speaker.name] ([ghost_follow_link(speaker, ghost=M)])</span>"
M.show_message("[message_start_dead] [message_body]", 2)
for(var/mob/living/S in GLOB.living_mob_list)
for(var/mob/living/S in GLOB.alive_mob_list)
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
continue
else if(isAI(S))
+2 -19
View File
@@ -26,6 +26,8 @@
var/death_sound = 'sound/voice/hiss6.ogg'
/mob/living/carbon/alien/New()
..()
create_reagents(1000)
verbs += /mob/living/verb/mob_sleep
verbs += /mob/living/verb/lay_down
alien_organs += new /obj/item/organ/internal/brain/xeno
@@ -33,7 +35,6 @@
alien_organs += new /obj/item/organ/internal/ears
for(var/obj/item/organ/internal/I in alien_organs)
I.insert(src)
..()
/mob/living/carbon/alien/get_default_language()
if(default_language)
@@ -67,18 +68,6 @@
/mob/living/carbon/alien/check_eye_prot()
return 2
/mob/living/carbon/alien/updatehealth(reason = "none given")
if(status_flags & GODMODE)
health = maxHealth
stat = CONSCIOUS
return
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
update_stat("updatehealth([reason])")
med_hud_set_health()
med_hud_set_status()
handle_hud_icons_health()
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
if(!environment)
@@ -118,12 +107,6 @@
else
clear_alert("alien_fire")
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
if(..())
return
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
return
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
@@ -6,7 +6,6 @@
icon_state = "aliend_s"
/mob/living/carbon/alien/humanoid/drone/New()
create_reagents(100)
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
@@ -26,7 +25,7 @@
if(powerc(500))
// Queen check
var/no_queen = 1
for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.living_mob_list)
for(var/mob/living/carbon/alien/humanoid/queen/Q in GLOB.alive_mob_list)
if(!Q.key && Q.get_int_organ(/obj/item/organ/internal/brain/))
continue
no_queen = 0
@@ -6,7 +6,6 @@
icon_state = "alienh_s"
/mob/living/carbon/alien/humanoid/hunter/New()
create_reagents(100)
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
@@ -17,28 +16,6 @@
. = -1 //hunters are sanic
. += ..() //but they still need to slow down on stun
/mob/living/carbon/alien/humanoid/hunter/handle_hud_icons_health()
..() //-Yvarov
if(healths)
if(stat != 2)
switch(health)
if(125 to INFINITY)
healths.icon_state = "health0"
if(100 to 125)
healths.icon_state = "health1"
if(50 to 100)
healths.icon_state = "health2"
if(25 to 50)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
if(m_intent == MOVE_INTENT_RUN || resting)
..()
@@ -33,7 +33,6 @@
overlays += I
/mob/living/carbon/alien/humanoid/sentinel/New()
create_reagents(100)
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
@@ -42,27 +41,6 @@
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
/mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health()
..() //-Yvarov
if(healths)
if(stat != 2)
switch(health)
if(150 to INFINITY)
healths.icon_state = "health0"
if(100 to 150)
healths.icon_state = "health1"
if(75 to 100)
healths.icon_state = "health2"
if(25 to 75)
healths.icon_state = "health3"
if(0 to 25)
healths.icon_state = "health4"
else
healths.icon_state = "health5"
else
healths.icon_state = "health6"
/*
/mob/living/carbon/alien/humanoid/sentinel/verb/evolve() // -- TLE
set name = "Evolve (250)"

Some files were not shown because too many files have changed in this diff Show More