From 1b1ddac33b19a68bc31d1a1a9d6432a8a04ccc65 Mon Sep 17 00:00:00 2001 From: "elly1989@rocketmail.com" Date: Thu, 31 May 2012 07:43:25 +0000 Subject: [PATCH] Changed a bunch of constants to defines and made setup.dm all pretty and easy to read. Defined some clothing-overlay layers. The defines are float-layers. So they will always appear above the mob they are overlaying. They can be found in setup.dm This pretty much means you can change to order in which the icons are added to the overlays variable without fear of eyes appearing above glasses and such. So no more of these dumb bugs. It also paves the way for selective clothing updates which should speed things up a fair bit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3704 316c924e-a436-60f5-8080-3fe189b3f50e --- .../living/carbon/alien/humanoid/humanoid.dm | 14 +- code/modules/mob/living/carbon/human/human.dm | 153 +++++----- code/setup.dm | 269 ++++++++++-------- 3 files changed, 222 insertions(+), 214 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index d11539c9941..b8676e29e2b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -392,12 +392,12 @@ var/t1 = wear_suit.item_state if (!t1) t1 = wear_suit.icon_state - overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_LAYER) if (wear_suit.blood_DNA) if (istype(wear_suit, /obj/item/clothing/suit/armor)) - overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "armorblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER) else - overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "suitblood[!lying ? "" : "2"]", "layer" = B_SUIT_LAYER) wear_suit.screen_loc = ui_alien_oclothing if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) if (handcuffed) @@ -417,9 +417,9 @@ var/t1 = head.item_state if (!t1) t1 = head.icon_state - overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = HEAD_LAYER) if (head.blood_DNA) - overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'blood.dmi', "icon_state" = "helmetblood[!lying ? "" : "2"]", "layer" = B_HEAD_LAYER) head.screen_loc = ui_alien_head if (l_store) @@ -433,12 +433,12 @@ client.screen += contents if (r_hand) - overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1) + overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER) r_hand.screen_loc = ui_rhand if (l_hand) - overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1) + overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = INHANDS_LAYER) l_hand.screen_loc = ui_lhand diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ccaa4730b4f..432d8c9de08 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -817,12 +817,6 @@ thing.dropped(src) thing.layer = initial(thing.layer) - - //if (zone_sel) - // zone_sel.overlays = null - // zone_sel.overlays += body_standing - // zone_sel.overlays += image("icon" = 'zone_sel.dmi', "icon_state" = text("[]", zone_sel.selecting)) - if (lying) icon = lying_icon @@ -857,15 +851,15 @@ if (!t1) t1 = icon_state if (FAT in src.mutations) - overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = UNIFORM_LAYER) else - overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) + overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = UNIFORM_LAYER) if (w_uniform.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "uniformblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + overlays += image("icon" = stain_icon, "layer" = B_UNIFORM_LAYER) if (wear_id) - overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = "id[!lying ? null : "2"]", "layer" = ID_LAYER) if (client) client.screen -= hud_used.intents @@ -880,36 +874,34 @@ var/t1 = gloves.item_state if (!t1) t1 = gloves.icon_state - overlays += image("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'hands.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = GLOVES_LAYER) if (gloves.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER) else if (blood_DNA) var/icon/stain_icon = icon('blood.dmi', "bloodyhands[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + overlays += image("icon" = stain_icon, "layer" = B_GLOVES_LAYER) // Glasses if (glasses) var/t1 = glasses.icon_state - overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'eyes.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = GLASSES_LAYER) // Ears if (ears) var/t1 = ears.icon_state - overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'ears.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = EARS_LAYER) // Shoes if (shoes) var/t1 = shoes.icon_state - overlays += image("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'feet.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SHOES_LAYER) if (shoes.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "shoeblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) // Radio -/* if (w_radio) - overlays += image("icon" = 'ears.dmi', "icon_state" = "headset[!lying ? "" : "2"]", "layer" = MOB_LAYER) */ + overlays += image("icon" = stain_icon, "layer" = B_SHOES_LAYER) if (s_store) var/t1 = s_store.item_state if (!t1) t1 = s_store.icon_state - overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'belt_mirror.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_STORE_LAYER) s_store.screen_loc = ui_sstore1 if (client) @@ -919,7 +911,7 @@ var/list/L = dd_text2list(intent, ",") L[1] += ":-11" - i_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT + i_select.screen_loc = dd_list2text(L,",") //ICONS4 else i_select.screen_loc = null if (m_select) @@ -928,50 +920,10 @@ var/list/L = dd_text2list(m_int, ",") L[1] += ":-11" - m_select.screen_loc = dd_list2text(L,",") //ICONS4, FUCKING SHIT + m_select.screen_loc = dd_list2text(L,",") //ICONS4 else m_select.screen_loc = null - - if (wear_suit) - if ((FAT in src.mutations) && !(wear_suit.flags & ONESIZEFITSALL)) - src << "\red You burst out of the [wear_suit.name]!" - var/obj/item/clothing/c = wear_suit - u_equip(c) - if(client) - client.screen -= c - if(c) - c:loc = loc - c:dropped(src) - c:layer = initial(c:layer) - if (istype(wear_suit, /obj/item/clothing/suit)) - var/t1 = wear_suit.icon_state - overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) - if (wear_suit) - if (wear_suit.blood_DNA) - var/icon/stain_icon = null - if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat)) - stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") - else if (istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat)) - stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]") - else - stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) - wear_suit.screen_loc = ui_oclothing - if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) - if (handcuffed) - handcuffed.loc = loc - handcuffed.layer = initial(handcuffed.layer) - handcuffed = null - if ((l_hand || r_hand)) - var/h = hand - hand = 1 - drop_item() - hand = 0 - drop_item() - hand = h - - if (lying) if (face_lying) overlays += face_lying @@ -982,11 +934,11 @@ if (wear_mask) if (istype(wear_mask, /obj/item/clothing/mask)) var/t1 = wear_mask.icon_state - overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'mask.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = FACEMASK_LAYER) if (!istype(wear_mask, /obj/item/clothing/mask/cigarette)) if (wear_mask.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "maskblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + overlays += image("icon" = stain_icon, "layer" = B_FACEMASK_LAYER) wear_mask.screen_loc = ui_mask // Head @@ -995,10 +947,10 @@ var/icon/head_icon = icon('head.dmi', text("[][]", t1, (!( lying ) ? null : "2"))) if(istype(head,/obj/item/clothing/head/kitty)) head_icon = (( lying ) ? head:mob2 : head:mob) - overlays += image("icon" = head_icon, "layer" = MOB_LAYER) + overlays += image("icon" = head_icon, "layer" = HEAD_LAYER) if (head.blood_DNA) var/icon/stain_icon = icon('blood.dmi', "helmetblood[!lying ? "" : "2"]") - overlays += image("icon" = stain_icon, "layer" = MOB_LAYER) + overlays += image("icon" = stain_icon, "layer" = B_HEAD_LAYER) head.screen_loc = ui_head // Belt @@ -1006,7 +958,7 @@ var/t1 = belt.item_state if (!t1) t1 = belt.icon_state - overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = BELT_LAYER) belt.screen_loc = ui_belt @@ -1023,44 +975,79 @@ if (back) var/t1 = back.icon_state - overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER) + overlays += image("icon" = 'back.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = BACK_LAYER) back.screen_loc = ui_back - if(client) hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar + if(client) + hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar + client.screen -= contents + client.screen += contents //to hide / show them. if (handcuffed) pulling = null if (!lying) - overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff1", "layer" = MOB_LAYER) + overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff1", "layer" = CUFFED_LAYER) else - overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff2", "layer" = MOB_LAYER) - - if (client) - client.screen -= contents - client.screen += contents + overlays += image("icon" = 'mob.dmi', "icon_state" = "handcuff2", "layer" = CUFFED_LAYER) if (r_hand) - overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = MOB_LAYER+1) - + overlays += image("icon" = 'items_righthand.dmi', "icon_state" = r_hand.item_state ? r_hand.item_state : r_hand.icon_state, "layer" = INHANDS_LAYER) r_hand.screen_loc = ui_rhand if (l_hand) - overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = MOB_LAYER+1) - + overlays += image("icon" = 'items_lefthand.dmi', "icon_state" = l_hand.item_state ? l_hand.item_state : l_hand.icon_state, "layer" = INHANDS_LAYER) l_hand.screen_loc = ui_lhand + var/shielded = 0 for (var/obj/item/weapon/cloaking_device/S in src) if (S.active) shielded = 2 break - if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active) - shielded = 3 + if (wear_suit) + if ((FAT in src.mutations) && !(wear_suit.flags & ONESIZEFITSALL)) + src << "\red You burst out of the [wear_suit.name]!" + var/obj/item/clothing/c = wear_suit + u_equip(c) + if(client) + client.screen -= c + if(c) + c:loc = loc + c:dropped(src) + c:layer = initial(c:layer) + if (wear_suit) + if (istype(wear_suit, /obj/item/clothing/suit)) + var/t1 = wear_suit.icon_state + overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = SUIT_LAYER) + if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket)) + if (handcuffed) + handcuffed.loc = loc + handcuffed.layer = initial(handcuffed.layer) + handcuffed = null + if ((l_hand || r_hand)) + var/h = hand + hand = 1 + drop_item() + hand = 0 + drop_item() + hand = h + else if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_active) + shielded = 3 + if (wear_suit.blood_DNA) + var/icon/stain_icon = null + if (istype(wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat)) + stain_icon = icon('blood.dmi', "armorblood[!lying ? "" : "2"]") + else if (istype(wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat)) + stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]") + else + stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]") + overlays += image("icon" = stain_icon, "layer" = B_SUIT_LAYER) + wear_suit.screen_loc = ui_oclothing switch(shielded) if(1) - overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = MOB_LAYER+1) + overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = SHIELD_LAYER) if(2) invisibility = 2 //New stealth. Hopefully doesn't lag too much. /N @@ -1267,7 +1254,9 @@ face_standing = new /image() face_lying = new /image() face_standing.icon = eyes_s + face_standing.layer = FACE_LAYER face_lying.icon = eyes_l + face_lying.layer = FACE_LAYER del(mouth_l) del(mouth_s) diff --git a/code/setup.dm b/code/setup.dm index 1e7bff68dca..e4a809ea7e3 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -127,50 +127,76 @@ var/MAX_EXPLOSION_RANGE = 14 #define HEADSPACE 4 // head wear protects against space -#define MASKINTERNALS 8 // mask allows internals -#define SUITSPACE 8 // suit protects against space +#define MASKINTERNALS 8 // mask allows internals +#define SUITSPACE 8 // suit protects against space -#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) -#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. -#define NOSHIELD 32 // weapon not affected by shield -#define CONDUCT 64 // conducts electricity (metal etc.) -#define FPRINT 256 // takes a fingerprint -#define ON_BORDER 512 // item has priority to check when entering or leaving +#define USEDELAY 16 // 1 second extra delay on use (Can be used once every 2s) +#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. +#define NOSHIELD 32 // weapon not affected by shield +#define CONDUCT 64 // conducts electricity (metal etc.) +#define FPRINT 256 // takes a fingerprint +#define ON_BORDER 512 // item has priority to check when entering or leaving -#define GLASSESCOVERSEYES 1024 -#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags -#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes -#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head -#define HEADCOVERSMOUTH 2048 +#define GLASSESCOVERSEYES 1024 +#define MASKCOVERSEYES 1024 // get rid of some of the other retardation in these flags +#define HEADCOVERSEYES 1024 // feel free to realloc these numbers for other purposes +#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head +#define HEADCOVERSMOUTH 2048 -#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc +#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc #define OPENCONTAINER 4096 // is an open container for chemistry purposes #define ONESIZEFITSALL 8192 // can be worn by fatties (or children? ugh) -#define NOREACT 16384 //Reagents dont' react inside this container. +#define NOREACT 16384 //Reagents dont' react inside this container. -#define BLOCKHAIR 32768 // temporarily removes the user's hair icon +#define BLOCKHAIR 32768 // temporarily removes the user's hair icon //flags for pass_flags -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 +#define PASSTABLE 1 +#define PASSGLASS 2 +#define PASSGRILLE 4 +#define PASSBLOB 8 //turf-only flags -#define NOJAUNT 1 +#define NOJAUNT 1 //Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses. -#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! -#define HIDEMASK 1 //APPLIES ONLY TO HELMETS!! -#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!! -#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!! +#define HIDEGLOVES 1 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESUITSTORAGE 2 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEJUMPSUIT 4 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDESHOES 8 //APPLIES ONLY TO THE EXTERIOR SUIT!! +#define HIDEMASK 1 //APPLIES ONLY TO HELMETS!! +#define HIDEEARS 2 //APPLIES ONLY TO HELMETS!! +#define HIDEEYES 4 //APPLIES ONLY TO HELMETS!! + +//clothing-overlay layers. They are floats so they always appear above the Mob +#define UNIFORM_LAYER -22 +#define B_UNIFORM_LAYER -21 +#define SHOES_LAYER -20 +#define B_SHOES_LAYER -19 +#define ID_LAYER -18 +#define GLOVES_LAYER -17 +#define B_GLOVES_LAYER -16 +#define EARS_LAYER -15 +#define SUIT_LAYER -14 +#define B_SUIT_LAYER -13 +#define FACE_LAYER -12 +#define GLASSES_LAYER -11 +#define FACEMASK_LAYER -10 +#define B_FACEMASK_LAYER -9 +#define HEAD_LAYER -8 +#define B_HEAD_LAYER -7 +#define SUIT_STORE_LAYER -6 +#define BELT_LAYER -5 +#define BACK_LAYER -4 +#define CUFFED_LAYER -3 +#define SHIELD_LAYER -2 +#define INHANDS_LAYER -1 + + //Cant seem to find a mob bitflags area other than the powers one @@ -191,121 +217,114 @@ var/MAX_EXPLOSION_RANGE = 14 #define HAND_LEFT 512 #define HAND_RIGHT 1024 #define HANDS 1536 - #define FULL_BODY 2047 /* //bitflags for mutations -var/const // Extra powers: - SHADOW =(1<<10) // shadow teleportation (create in/out portals anywhere) (25%) - SCREAM =(1<<11) // supersonic screaming (25%) - EXPLOSIVE =(1<<12) // exploding on-demand (15%) - REGENERATION =(1<<13) // superhuman regeneration (30%) - REPROCESSOR =(1<<14) // eat anything (50%) - SHAPESHIFTING =(1<<15) // take on the appearance of anything (40%) - PHASING =(1<<16) // ability to phase through walls (40%) - SHIELD =(1<<17) // shielding from all projectile attacks (30%) - SHOCKWAVE =(1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) - ELECTRICITY =(1<<19) // ability to shoot electric attacks (15%) +#define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM (1<<11) // supersonic screaming (25%) +#define EXPLOSIVE (1<<12) // exploding on-demand (15%) +#define REGENERATION (1<<13) // superhuman regeneration (30%) +#define REPROCESSOR (1<<14) // eat anything (50%) +#define SHAPESHIFTING (1<<15) // take on the appearance of anything (40%) +#define PHASING (1<<16) // ability to phase through walls (40%) +#define SHIELD (1<<17) // shielding from all projectile attacks (30%) +#define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) // Nanoaugmentations: - SUPRSTR =(1<<20) // super strength - RADAR =(1<<21) // on-screen mob radar - ELECTRICHANDS =(1<<22) // electric hands - ESWORDSYNTH =(1<<23) // esword synthesizer - REBREATHER =(1<<24) // removes the need to breathe - DERMALARMOR =(1<<25) // 35% damage decrease - REFLEXES =(1<<26) // dodge 50% of projectiles, dodge 25% of melee attacks - NANOREGEN =(1<<27) // regenerative nanobots, -3 all damage types per second +#define SUPRSTR (1<<20) // super strength +#define RADAR (1<<21) // on-screen mob radar +#define ELECTRICHANDS (1<<22) // electric hands +#define ESWORDSYNTH (1<<23) // esword synthesizer +#define REBREATHER (1<<24) // removes the need to breathe +#define DERMALARMOR (1<<25) // 35% damage decrease +#define REFLEXES (1<<26) // dodge 50% of projectiles, dodge 25% of melee attacks +#define NANOREGEN (1<<27) // regenerative nanobots, -3 all damage types per second */ // String identifiers for associative list lookup -var/const - // mob/var/list/mutations // Generic mutations: - TK =1 - COLD_RESISTANCE =2 - XRAY =3 - HULK =4 - CLUMSY =5 - FAT =6 - HUSK =7 - NOCLONE =8 +#define TK 1 +#define COLD_RESISTANCE 2 +#define XRAY 3 +#define HULK 4 +#define CLUMSY 5 +#define FAT 6 +#define HUSK 7 +#define NOCLONE 8 // Extra powers: - LASER =9 // harm intent - click anywhere to shoot lasers from eyes - HEAL =10 // healing people with hands - SHADOW =11 // shadow teleportation (create in/out portals anywhere) (25%) - SCREAM =12 // supersonic screaming (25%) - EXPLOSIVE =13 // exploding on-demand (15%) - REGENERATION =14 // superhuman regeneration (30%) - REPROCESSOR =15 // eat anything (50%) - SHAPESHIFTING =16 // take on the appearance of anything (40%) - PHASING =17 // ability to phase through walls (40%) - SHIELD =18 // shielding from all projectile attacks (30%) - SHOCKWAVE =19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) - ELECTRICITY =20 // ability to shoot electric attacks (15%) +#define LASER 9 // harm intent - click anywhere to shoot lasers from eyes +#define HEAL 10 // healing people with hands +#define SHADOW 11 // shadow teleportation (create in/out portals anywhere) (25%) +#define SCREAM 12 // supersonic screaming (25%) +#define EXPLOSIVE 13 // exploding on-demand (15%) +#define REGENERATION 14 // superhuman regeneration (30%) +#define REPROCESSOR 15 // eat anything (50%) +#define SHAPESHIFTING 16 // take on the appearance of anything (40%) +#define PHASING 17 // ability to phase through walls (40%) +#define SHIELD 18 // shielding from all projectile attacks (30%) +#define SHOCKWAVE 19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) +#define ELECTRICITY 20 // ability to shoot electric attacks (15%) // mob/var/list/augmentations // Nanoaugmentations: - SUPRSTR =21 // super strength (hulk powers) - RADAR =22 // on-screen mob radar - ELECTRICHANDS =23 // electric hands - ESWORDSYNTH =24 // esword synthesizer - REBREATHER =25 // removes the need to breathe - DERMALARMOR =26 // 35% damage decrease - REFLEXES =27 // dodge 50% of projectiles - NANOREGEN =28 // regenerative nanobots, -3 all damage types per second - - - +#define SUPRSTR 21 // super strength (hulk powers) +#define RADAR 22 // on-screen mob radar +#define ELECTRICHANDS 23 // electric hands +#define ESWORDSYNTH 24 // esword synthesizer +#define REBREATHER 25 // removes the need to breathe +#define DERMALARMOR 26 // 35% damage decrease +#define REFLEXES 27 // dodge 50% of projectiles +#define NANOREGEN 28 // regenerative nanobots, -3 all damage types per second //mob/var/stat things -var/const/CONSCIOUS = 0 -var/const/UNCONSCIOUS = 1 -var/const/DEAD = 2 +#define CONSCIOUS 0 +#define UNCONSCIOUS 1 +#define DEAD 2 // channel numbers for power -#define EQUIP 1 -#define LIGHT 2 -#define ENVIRON 3 -#define TOTAL 4 //for total power used only +#define EQUIP 1 +#define LIGHT 2 +#define ENVIRON 3 +#define TOTAL 4 //for total power used only // bitflags for machine stat variable -#define BROKEN 1 -#define NOPOWER 2 -#define POWEROFF 4 // tbd -#define MAINT 8 // under maintaince -#define EMPED 16 // temporary broken by EMP pulse +#define BROKEN 1 +#define NOPOWER 2 +#define POWEROFF 4 // tbd +#define MAINT 8 // under maintaince +#define EMPED 16 // temporary broken by EMP pulse //bitflags for door switches. -#define OPEN 1 -#define IDSCAN 2 -#define BOLTS 4 -#define SHOCK 8 -#define SAFE 16 +#define OPEN 1 +#define IDSCAN 2 +#define BOLTS 4 +#define SHOCK 8 +#define SAFE 16 -#define ENGINE_EJECT_Z 3 +#define ENGINE_EJECT_Z 3 //metal, glass, rod stacks -#define MAX_STACK_AMOUNT_METAL 50 -#define MAX_STACK_AMOUNT_GLASS 50 -#define MAX_STACK_AMOUNT_RODS 60 +#define MAX_STACK_AMOUNT_METAL 50 +#define MAX_STACK_AMOUNT_GLASS 50 +#define MAX_STACK_AMOUNT_RODS 60 -var/const/GAS_O2 = 1 << 0 -var/const/GAS_N2 = 1 << 1 -var/const/GAS_PL = 1 << 2 -var/const/GAS_CO2 = 1 << 3 -var/const/GAS_N2O = 1 << 4 +#define GAS_O2 (1 << 0) +#define GAS_N2 (1 << 1) +#define GAS_PL (1 << 2) +#define GAS_CO2 (1 << 3) +#define GAS_N2O (1 << 4) var/list/accessable_z_levels = list("3" = 30, "4" = 70) @@ -323,30 +342,30 @@ var/list/global_mutations = list() // list of hidden mutation things //Damage things -#define BRUTE "brute" -#define BURN "fire" -#define TOX "tox" -#define OXY "oxy" -#define CLONE "clone" -#define HALLOSS "halloss" +#define BRUTE "brute" +#define BURN "fire" +#define TOX "tox" +#define OXY "oxy" +#define CLONE "clone" +#define HALLOSS "halloss" -#define STUN "stun" -#define WEAKEN "weaken" -#define PARALYZE "paralize" -#define IRRADIATE "irradiate" -#define STUTTER "stutter" -#define EYE_BLUR "eye_blur" -#define DROWSY "drowsy" +#define STUN "stun" +#define WEAKEN "weaken" +#define PARALYZE "paralize" +#define IRRADIATE "irradiate" +#define STUTTER "stutter" +#define EYE_BLUR "eye_blur" +#define DROWSY "drowsy" var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','hiss1.ogg','hiss2.ogg','hiss3.ogg','hiss4.ogg','hiss5.ogg','hiss6.ogg','Glassbr1.ogg','Glassbr2.ogg','Glassbr3.ogg','Welder.ogg','Welder2.ogg','airlock.ogg','clownstep1.ogg','clownstep2.ogg') //Security levels -#define SEC_LEVEL_GREEN 0 -#define SEC_LEVEL_BLUE 1 -#define SEC_LEVEL_RED 2 -#define SEC_LEVEL_DELTA 3 +#define SEC_LEVEL_GREEN 0 +#define SEC_LEVEL_BLUE 1 +#define SEC_LEVEL_RED 2 +#define SEC_LEVEL_DELTA 3 -#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level +#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level var/list/liftable_structures = list(\