mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-27 10:32:40 +00:00
There's a metric assload of stuff here, mostly in preparation to my massive traitor expansion, so I'll try to be brief:
- I added in the foundations for traitor factions. See factions.dm for all the different faction datums. They don't do anything yet. - I completely ported mob/var/mutations from a bitfield to a generic list. Mutation enumerated-identifiers are added into this list. For instance, TK = 1, COLD_RESISTANCE = 2, XRAY = 3, etc... The purpose of this was because bitwise operations could not actually be used after a certain size (because BYOND is stuck in the 16bit era). - I've added in completely-functional nano-augmentations. Check under implantnanoaug.dm for a list of implants and implaners. As mentioned previously, they are completely functional but may be slightly OP. Among these nanoaugs are Super Strength, Psionic Radar, Electric Hands, Energy Blade/Sword Synthesizer, Rebreather, Dermal Armor, Combat Reflexes, and Regenerative Nanorobots. I won't go into detail as to what they do, but hopefully they should be self-explanitory. If not, check out their descriptions in the file previously mentioned. - Added in a future traitor item, the Mind Batterer. Along with it a new .ogg file. - New telecomms bus mainframe sprite, thanks to WJohnston. - New holdable shield, sprites courtesy of Muncher (i had to mangle the side sprites because of a technical little issue. I'll change it back to the original soon). It can be retracted and expanded. Probably only going to be given to traitors. - A couple of minor bugfixes here and there, along with some code tidying. Hope this isn't too large a commit. I intended it to be MUCH larger, but I've decided to split up my Traitor Factions expansion into smaller commits. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3692 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -347,7 +347,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if (M.mutations & FAT)
|
||||
if (FAT in M.mutations)
|
||||
M.gib()
|
||||
..()
|
||||
return
|
||||
@@ -782,7 +782,7 @@ datum
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.mutations = 0
|
||||
M.mutations = list()
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
..()
|
||||
@@ -1566,6 +1566,12 @@ datum
|
||||
reagent_state = GAS
|
||||
color = "#404030" // rgb: 64, 64, 48
|
||||
|
||||
ultraglue
|
||||
name = "Ulta Glue"
|
||||
id = "glue"
|
||||
description = "An extremely powerful bonding agent."
|
||||
color = "#FFFFCC" // rgb: 255, 255, 204
|
||||
|
||||
diethylamine
|
||||
name = "Diethylamine"
|
||||
id = "diethylamine"
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
if(!T.dna)
|
||||
usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)"
|
||||
return
|
||||
if(T.mutations & NOCLONE) //target done been et, no more blood in him
|
||||
if(NOCLONE in T.mutations) //target done been et, no more blood in him
|
||||
user << "\red You are unable to locate any blood."
|
||||
return
|
||||
B.holder = src
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
if ("hurt")
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if (M.mutations & HULK)//HULK SMASH
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH
|
||||
damage += 14
|
||||
spawn(0)
|
||||
Paralyse(5)
|
||||
|
||||
@@ -127,15 +127,15 @@
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if(src.getFireLoss())
|
||||
if(src.mutations & COLD_RESISTANCE || prob(50))
|
||||
if((COLD_RESISTANCE in src.mutations) || prob(50))
|
||||
switch(src.getFireLoss())
|
||||
if(1 to 50)
|
||||
src.adjustFireLoss(-1)
|
||||
if(51 to 100)
|
||||
src.adjustFireLoss(-5)
|
||||
|
||||
if (src.mutations & HULK && src.health <= 25)
|
||||
src.mutations &= ~HULK
|
||||
if ((HULK in src.mutations) && src.health <= 25)
|
||||
src.mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
@@ -284,7 +284,7 @@
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :(
|
||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "\red You feel a searing heat in your lungs!"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
@@ -340,7 +340,7 @@
|
||||
thermal_protection += 0.2
|
||||
if(wear_suit && (wear_suit.flags & SUITSPACE))
|
||||
thermal_protection += 3
|
||||
if(src.mutations & COLD_RESISTANCE)
|
||||
if(COLD_RESISTANCE in src.mutations)
|
||||
thermal_protection += 5
|
||||
|
||||
return thermal_protection
|
||||
@@ -364,15 +364,15 @@
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(src.nutrition > 500 && !(src.mutations & FAT))
|
||||
if(src.nutrition > 500 && !(FAT in src.mutations))
|
||||
if(prob(5 + round((src.nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
src.mutations |= FAT
|
||||
src.mutations.Add(FAT)
|
||||
// update_body()
|
||||
if (src.nutrition < 100 && src.mutations & FAT)
|
||||
if (src.nutrition < 100 && (FAT in src.mutations))
|
||||
if(prob(round((50 - src.nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
src.mutations &= ~FAT
|
||||
src.mutations.Remove(FAT)
|
||||
// update_body()
|
||||
if (src.nutrition > 0)
|
||||
src.nutrition -= HUNGER_FACTOR
|
||||
@@ -486,7 +486,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.mutations & XRAY)
|
||||
if (src.stat == 2 || (XRAY in src.mutations))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(70))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
@@ -430,7 +430,7 @@
|
||||
else
|
||||
var/damage = rand(1, 9)
|
||||
if (prob(90))
|
||||
if (M.mutations & HULK)
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
damage += 5
|
||||
spawn(0)
|
||||
Paralyse(1)
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
breath.toxins -= toxins_used
|
||||
breath.oxygen += toxins_used
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :(
|
||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "\red You feel a searing heat in your lungs!"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
@@ -287,15 +287,15 @@
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
|
||||
if(nutrition > 500 && !(mutations & FAT))
|
||||
if(nutrition > 500 && !(FAT in src.mutations))
|
||||
if(prob(5 + round((nutrition - 200) / 2)))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations |= FAT
|
||||
mutations.Add(FAT)
|
||||
// update_body()
|
||||
if (nutrition < 100 && mutations & FAT)
|
||||
if (nutrition < 100 && (FAT in src.mutations))
|
||||
if(prob(round((50 - nutrition) / 100)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations &= ~FAT
|
||||
mutations.Add(FAT)
|
||||
// update_body()
|
||||
if (nutrition > 0)
|
||||
nutrition-= HUNGER_FACTOR
|
||||
@@ -409,7 +409,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || mutations & XRAY)
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (stat == 2 || mutations & XRAY)
|
||||
if (stat == 2 || (XRAY in src.mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if(src.m_intent == "run")
|
||||
src.nutrition -= HUNGER_FACTOR/10
|
||||
if(src.mutations & FAT && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/user, direction)
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
if(mutations & HUSK)
|
||||
if(HUSK in src.mutations)
|
||||
return
|
||||
mutations |= HUSK
|
||||
mutations.Add(HUSK)
|
||||
real_name = "Unknown"
|
||||
update_body()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/Drain()
|
||||
ChangeToHusk()
|
||||
mutations |= NOCLONE
|
||||
mutations.Add(NOCLONE)
|
||||
return
|
||||
@@ -765,3 +765,163 @@
|
||||
src.hud_used.hotkey_ui_hidden = 1
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Radar-related things
|
||||
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/close_radar()
|
||||
radar_open = 0
|
||||
for(var/obj/screen/x in client.screen)
|
||||
if( (x.name == "radar" && x.icon == 'radar.dmi') || (x in radar_blips) )
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
place_radar_closed()
|
||||
|
||||
/mob/living/carbon/human/proc/place_radar_closed()
|
||||
var/obj/screen/closedradar = new()
|
||||
closedradar.icon = 'radar.dmi'
|
||||
closedradar.icon_state = "radarclosed"
|
||||
closedradar.screen_loc = "WEST,NORTH-1"
|
||||
closedradar.name = "radar closed"
|
||||
client.screen += closedradar
|
||||
|
||||
/mob/living/carbon/human/proc/start_radar()
|
||||
|
||||
for(var/obj/screen/x in client.screen)
|
||||
if(x.name == "radar closed" && x.icon == 'radar.dmi')
|
||||
client.screen -= x
|
||||
del(x)
|
||||
|
||||
var/obj/screen/cornerA = new()
|
||||
cornerA.icon = 'radar.dmi'
|
||||
cornerA.icon_state = "radar(1,1)"
|
||||
cornerA.screen_loc = "WEST,NORTH-2"
|
||||
cornerA.name = "radar"
|
||||
|
||||
var/obj/screen/cornerB = new()
|
||||
cornerB.icon = 'radar.dmi'
|
||||
cornerB.icon_state = "radar(2,1)"
|
||||
cornerB.screen_loc = "WEST+1,NORTH-2"
|
||||
cornerB.name = "radar"
|
||||
|
||||
var/obj/screen/cornerC = new()
|
||||
cornerC.icon = 'radar.dmi'
|
||||
cornerC.icon_state = "radar(1,2)"
|
||||
cornerC.screen_loc = "WEST,NORTH-1"
|
||||
cornerC.name = "radar"
|
||||
|
||||
var/obj/screen/cornerD = new()
|
||||
cornerD.icon = 'radar.dmi'
|
||||
cornerD.icon_state = "radar(2,2)"
|
||||
cornerD.screen_loc = "WEST+1,NORTH-1"
|
||||
cornerD.name = "radar"
|
||||
|
||||
client.screen += cornerA
|
||||
client.screen += cornerB
|
||||
client.screen += cornerC
|
||||
client.screen += cornerD
|
||||
|
||||
radar_open = 1
|
||||
|
||||
while(radar_open && (RADAR in augmentations))
|
||||
update_radar()
|
||||
sleep(6)
|
||||
|
||||
/mob/living/carbon/human/proc/update_radar()
|
||||
|
||||
if(!client) return
|
||||
var/list/found_targets = list()
|
||||
|
||||
var/max_dist = 29 // 29 tiles is the max distance
|
||||
|
||||
// If the mob is inside a turf, set the center to the object they're in
|
||||
var/atom/distance_ref = src
|
||||
if(!isturf(src.loc))
|
||||
distance_ref = loc
|
||||
|
||||
// Clear the radar_blips cache
|
||||
for(var/x in radar_blips)
|
||||
client.screen -= x
|
||||
del(x)
|
||||
radar_blips = list()
|
||||
|
||||
var/starting_px = 3
|
||||
var/starting_py = 3
|
||||
|
||||
for(var/mob/living/M in orange(max_dist, distance_ref))
|
||||
if(M.stat == 2) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
for(var/obj/effect/critter/C in orange(max_dist, distance_ref))
|
||||
if(!C.alive) continue
|
||||
found_targets.Add(C)
|
||||
|
||||
for(var/obj/mecha/M in orange(max_dist, distance_ref))
|
||||
if(!M.occupant) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
for(var/obj/structure/closet/C in orange(max_dist, distance_ref))
|
||||
for(var/mob/living/M in C.contents)
|
||||
if(M.stat == 2) continue
|
||||
found_targets.Add(M)
|
||||
|
||||
// Loop through all living mobs in a range.
|
||||
for(var/atom/A in found_targets)
|
||||
|
||||
var/a_x = A.x
|
||||
var/a_y = A.y
|
||||
|
||||
if(!isturf(A.loc))
|
||||
a_x = A.loc.x
|
||||
a_y = A.loc.y
|
||||
|
||||
var/blip_x = max_dist + (-( distance_ref.x-a_x ) ) + starting_px
|
||||
var/blip_y = max_dist + (-( distance_ref.y-a_y ) ) + starting_py
|
||||
var/obj/screen/blip = new()
|
||||
blip.icon = 'radar.dmi'
|
||||
blip.name = "Blip"
|
||||
blip.layer = 21
|
||||
blip.screen_loc = "WEST:[blip_x-1],NORTH-2:[blip_y-1]" // offset -1 because the center of the blip is not at the bottomleft corner (14)
|
||||
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/M = A
|
||||
if(ishuman(M))
|
||||
if(M:wear_id)
|
||||
var/job = M:wear_id:GetJobName()
|
||||
if(job == "Security Officer")
|
||||
blip.icon_state = "secblip"
|
||||
blip.name = "Security Officer"
|
||||
else if(job == "Captain" || job == "Research Director" || job == "Chief Engineer" || job == "Chief Medical Officer" || job == "Head of Security" || job == "Head of Personnel")
|
||||
blip.icon_state = "headblip"
|
||||
blip.name = "Station Head"
|
||||
else
|
||||
blip.icon_state = "civblip"
|
||||
blip.name = "Civilian"
|
||||
else
|
||||
blip.icon_state = "civblip"
|
||||
blip.name = "Civilian"
|
||||
|
||||
else if(issilicon(M))
|
||||
blip.icon_state = "roboblip"
|
||||
blip.name = "Robotic Organism"
|
||||
|
||||
else
|
||||
blip.icon_state = "unknownblip"
|
||||
blip.name = "Unknown Organism"
|
||||
|
||||
else if(istype(A, /obj/effect/critter))
|
||||
blip.icon_state = "unknownblip"
|
||||
blip.name = "Unknown Organism"
|
||||
|
||||
else if(istype(A, /obj/mecha))
|
||||
blip.icon_state = "roboblip"
|
||||
blip.name = "Robotic Organism"
|
||||
|
||||
radar_blips.Add(blip)
|
||||
client.screen += blip
|
||||
|
||||
|
||||
|
||||
@@ -147,8 +147,8 @@
|
||||
Metroid.UpdateFeed()
|
||||
return
|
||||
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(40) && !(mutations & FAT))
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(40) && !(FAT in src.mutations))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
@@ -207,7 +207,7 @@
|
||||
if(shoes)
|
||||
tally += shoes.slowdown
|
||||
|
||||
if(mutations & FAT)
|
||||
if(FAT in src.mutations)
|
||||
tally += 1.5
|
||||
if (bodytemperature < 283.222)
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
@@ -480,9 +480,10 @@
|
||||
return
|
||||
if (!istype(W, /obj/item))
|
||||
return
|
||||
|
||||
if (!( W.slot_flags & SLOT_OCLOTHING ))
|
||||
return
|
||||
if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
|
||||
if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL))
|
||||
src << "\red You're too fat to wear the [W.name]!"
|
||||
return
|
||||
u_equip(W)
|
||||
@@ -575,7 +576,7 @@
|
||||
return
|
||||
if (!( W.slot_flags & SLOT_ICLOTHING ))
|
||||
return
|
||||
if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
|
||||
if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL))
|
||||
src << "\red You're too fat to wear the [W.name]!"
|
||||
return
|
||||
u_equip(W)
|
||||
@@ -751,19 +752,19 @@
|
||||
|
||||
// lol
|
||||
var/fat = ""
|
||||
if (mutations & FAT)
|
||||
if (FAT in mutations)
|
||||
fat = "fat"
|
||||
|
||||
if (mutations & HULK)
|
||||
if (HULK in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & COLD_RESISTANCE)
|
||||
if (COLD_RESISTANCE in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & TK)
|
||||
if (TK in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutations & LASER)
|
||||
if (LASER in mutations)
|
||||
overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]")
|
||||
|
||||
if (mutantrace)
|
||||
@@ -839,7 +840,7 @@
|
||||
|
||||
// Uniform
|
||||
if(w_uniform)
|
||||
if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL))
|
||||
if ((FAT in src.mutations) && !(w_uniform.flags & ONESIZEFITSALL))
|
||||
src << "\red You burst out of the [w_uniform.name]!"
|
||||
var/obj/item/clothing/c = w_uniform
|
||||
u_equip(c)
|
||||
@@ -855,7 +856,7 @@
|
||||
var/t1 = w_uniform.color
|
||||
if (!t1)
|
||||
t1 = icon_state
|
||||
if (mutations & FAT)
|
||||
if (FAT in src.mutations)
|
||||
overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER)
|
||||
else
|
||||
overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER)
|
||||
@@ -933,7 +934,7 @@
|
||||
|
||||
|
||||
if (wear_suit)
|
||||
if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL))
|
||||
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)
|
||||
@@ -1203,8 +1204,8 @@
|
||||
stand_icon = new /icon('human.dmi', "blank")
|
||||
lying_icon = new /icon('human.dmi', "blank")
|
||||
|
||||
var/husk = (mutations & HUSK)
|
||||
var/obese = (mutations & FAT)
|
||||
var/husk = (HUSK in src.mutations)
|
||||
var/obese = (FAT in src.mutations)
|
||||
|
||||
if (husk)
|
||||
stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY)
|
||||
@@ -2287,17 +2288,17 @@ It can still be worn/put on as normal.
|
||||
heal_overall_damage(0, -amount)
|
||||
|
||||
/mob/living/carbon/human/Stun(amount)
|
||||
if(mutations & HULK)
|
||||
if(HULK in mutations)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/Weaken(amount)
|
||||
if(mutations & HULK)
|
||||
if(HULK in mutations)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/Paralyse(amount)
|
||||
if(mutations & HULK)
|
||||
if(HULK in mutations)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(M.mutations & HULK) damage += 5
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(SUPRSTR in M.augmentations) damage += 5
|
||||
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
|
||||
visible_message("\red <B>[M] has punched [src]!</B>")
|
||||
@@ -101,6 +103,26 @@
|
||||
return 1
|
||||
|
||||
if("hurt")
|
||||
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == "male")
|
||||
gendertxt = "his"
|
||||
if(M.gender == "female")
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Used Electric Hands nanoaug power on [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name], shocking them ([src.ckey])</font>")
|
||||
|
||||
|
||||
var/armorblock = run_armor_check(M.zone_sel.selecting, "energy")
|
||||
apply_effects(5,5,0,0,5,0,0,armorblock)
|
||||
|
||||
return
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Punched [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been punched by [M.name] ([M.ckey])</font>")
|
||||
|
||||
@@ -132,7 +154,8 @@
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
|
||||
if(M.mutations & HULK) damage += 5
|
||||
if(HULK in M.mutations) damage += 5
|
||||
if(SUPRSTR in M.augmentations) damage += 5
|
||||
|
||||
switch(attack_verb)
|
||||
if("slash")
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
if(blocked)
|
||||
damage = (damage/(blocked+1))
|
||||
|
||||
if(DERMALARMOR in augmentations)
|
||||
damage = damage - (round(damage*0.35)) // reduce damage by 35%
|
||||
|
||||
switch(damagetype)
|
||||
if(BRUTE)
|
||||
organ.take_damage(damage, 0)
|
||||
|
||||
@@ -10,6 +10,12 @@ emp_act
|
||||
|
||||
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
|
||||
if(REFLEXES in augmentations)
|
||||
if(prob(50))
|
||||
var/message = pick("[src] skillfully dodges the [P.name]!", "[src] ducks, dodging the [P.name]!", "[src] effortlessly jumps out of the way of the [P.name]!", "[src] dodges the [P.name] in one graceful movement!", "[src] leans back, dodging the [P.name] narrowly!")
|
||||
visible_message("\red <B>[message]</B>")
|
||||
return -1
|
||||
|
||||
if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof))
|
||||
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
|
||||
var/reflectchance = 40 - round(P.damage/3)
|
||||
|
||||
@@ -202,11 +202,37 @@
|
||||
|
||||
handle_mutations_and_radiation()
|
||||
if(getFireLoss())
|
||||
if(mutations & COLD_RESISTANCE || (prob(1) && prob(75)))
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1) && prob(75)))
|
||||
heal_organ_damage(0,1)
|
||||
|
||||
if (mutations & HULK && health <= 25)
|
||||
mutations &= ~HULK
|
||||
// Make nanoregen heal youu, -3 all damage types
|
||||
if(NANOREGEN in augmentations)
|
||||
var/healed = 0
|
||||
if(getToxLoss())
|
||||
adjustToxLoss(-3)
|
||||
healed = 1
|
||||
if(getOxyLoss())
|
||||
adjustOxyLoss(-3)
|
||||
healed = 1
|
||||
if(getCloneLoss())
|
||||
adjustCloneLoss(-3)
|
||||
healed = 1
|
||||
if(getBruteLoss())
|
||||
heal_organ_damage(3,0)
|
||||
healed = 1
|
||||
if(getFireLoss())
|
||||
heal_organ_damage(0,3)
|
||||
healed = 1
|
||||
if(halloss > 0)
|
||||
halloss -= 3
|
||||
if(halloss < 0) halloss = 0
|
||||
healed = 1
|
||||
if(healed)
|
||||
if(prob(5))
|
||||
src << "\blue You feel your wounds mending..."
|
||||
|
||||
if ((HULK in mutations) && health <= 25)
|
||||
mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
@@ -344,7 +370,7 @@
|
||||
*/
|
||||
|
||||
handle_breath(datum/gas_mixture/breath)
|
||||
if(nodamage)
|
||||
if(nodamage || REBREATHER in augmentations)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
@@ -430,7 +456,7 @@
|
||||
spawn(0) emote(pick("giggle", "laugh"))
|
||||
|
||||
|
||||
if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :(
|
||||
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
|
||||
if(prob(20))
|
||||
src << "\red You feel a searing heat in your lungs!"
|
||||
fire_alert = max(fire_alert, 1)
|
||||
@@ -598,7 +624,7 @@
|
||||
thermal_protection += 3
|
||||
if(head && (head.flags & HEADSPACE))
|
||||
thermal_protection += 1
|
||||
if(mutations & COLD_RESISTANCE)
|
||||
if(COLD_RESISTANCE in mutations)
|
||||
thermal_protection += 5
|
||||
|
||||
return thermal_protection
|
||||
@@ -672,13 +698,13 @@
|
||||
adjustToxLoss(-1)
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
if(overeatduration > 500 && !(mutations & FAT))
|
||||
if(overeatduration > 500 && !(FAT in mutations))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
mutations |= FAT
|
||||
mutations.Add(FAT)
|
||||
update_body()
|
||||
if ((overeatduration < 100 && mutations & FAT))
|
||||
if ((overeatduration < 100 && (FAT in mutations)))
|
||||
src << "\blue You feel fit again!"
|
||||
mutations &= ~FAT
|
||||
mutations.Remove(FAT)
|
||||
update_body()
|
||||
|
||||
// nutrition decrease
|
||||
@@ -819,7 +845,7 @@
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
del(hud)
|
||||
|
||||
if (stat == 2 || mutations & XRAY)
|
||||
if (stat == 2 || (XRAY in mutations))
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
|
||||
@@ -505,11 +505,21 @@
|
||||
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
|
||||
|
||||
else
|
||||
if(ELECTRICHANDS in M.augmentations)
|
||||
var/gendertxt = "their"
|
||||
if(M.gender == "male")
|
||||
gendertxt = "his"
|
||||
if(M.gender == "female")
|
||||
gendertxt = "her"
|
||||
|
||||
visible_message("\red <B>[M] has shocked [src] with [gendertxt] bare hands!</B>")
|
||||
return
|
||||
|
||||
var/damage = rand(1, 9)
|
||||
|
||||
attacked += 10
|
||||
if (prob(90))
|
||||
if (M.mutations & HULK)
|
||||
if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))
|
||||
damage += 5
|
||||
if(Victim)
|
||||
Victim = null
|
||||
|
||||
@@ -127,15 +127,15 @@
|
||||
handle_mutations_and_radiation()
|
||||
|
||||
if(src.getFireLoss())
|
||||
if(src.mutations & COLD_RESISTANCE || prob(50))
|
||||
if((COLD_RESISTANCE in mutations) || prob(50))
|
||||
switch(src.getFireLoss())
|
||||
if(1 to 50)
|
||||
src.adjustFireLoss(-1)
|
||||
if(51 to 100)
|
||||
src.adjustFireLoss(-5)
|
||||
|
||||
if (src.mutations & HULK && src.health <= 25)
|
||||
src.mutations &= ~HULK
|
||||
if ((HULK in mutations) && src.health <= 25)
|
||||
src.mutations.Remove(HULK)
|
||||
src << "\red You suddenly feel very weak."
|
||||
Weaken(3)
|
||||
emote("collapse")
|
||||
@@ -506,7 +506,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.mutations & XRAY)
|
||||
if (src.stat == 2 || (XRAY in mutations))
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (HULK in tmob.mutations))
|
||||
if(prob(70))
|
||||
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
@@ -115,7 +115,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 5)
|
||||
if (mutations & HULK) damage += 10
|
||||
if (HULK in mutations) damage += 10
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(BRUTE)
|
||||
adjustBruteLoss(damage/(blocked+1))
|
||||
if(BURN)
|
||||
if(mutations & COLD_RESISTANCE) damage = 0
|
||||
if(COLD_RESISTANCE in mutations) damage = 0
|
||||
adjustFireLoss(damage/(blocked+1))
|
||||
if(TOX)
|
||||
adjustToxLoss(damage/(blocked+1))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/mob/living/proc/burn_skin(burn_amount)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
//world << "DEBUG: burn_skin(), mutations=[mutations]"
|
||||
if (src.mutations & COLD_RESISTANCE) //fireproof
|
||||
if (COLD_RESISTANCE in src.mutations) //fireproof
|
||||
return 0
|
||||
var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part
|
||||
var/divided_damage = (burn_amount)/(H.organs.len)
|
||||
@@ -49,7 +49,7 @@
|
||||
H.updatehealth()
|
||||
return 1
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
if (src.mutations & COLD_RESISTANCE) //fireproof
|
||||
if (COLD_RESISTANCE in src.mutations) //fireproof
|
||||
return 0
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
M.adjustFireLoss(burn_amount)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
if (src.stat == 2 || src.mutations & XRAY || src.sight_mode & BORGXRAY)
|
||||
if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY)
|
||||
src.sight |= SEE_TURFS
|
||||
src.sight |= SEE_MOBS
|
||||
src.sight |= SEE_OBJS
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(20))
|
||||
usr << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
|
||||
@@ -183,14 +183,11 @@
|
||||
var/datum/dna/dna = null//Carbon
|
||||
var/radiation = 0.0//Carbon
|
||||
|
||||
var/mutations = 0//Carbon
|
||||
//telekinesis = 1
|
||||
//firemut = 2
|
||||
//xray = 4
|
||||
//hulk = 8
|
||||
//clumsy = 16
|
||||
//obese = 32
|
||||
//husk = 64
|
||||
var/list/mutations = list() //Carbon -- Doohl
|
||||
//see: setup.dm for list of mutations
|
||||
|
||||
var/list/augmentations = list() //Carbon -- Doohl
|
||||
//see: setup.dm for list of augmentations
|
||||
|
||||
var/voice_name = "unidentifiable voice"
|
||||
var/voice_message = null // When you are not understood by others (replaced with just screeches, hisses, chimpers etc.)
|
||||
@@ -275,4 +272,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i
|
||||
|
||||
var/geaslist = list()
|
||||
|
||||
var/list/radar_blips = list() // list of screen objects, radar blips
|
||||
var/radar_open = 0 // nonzero is radar is open
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "grabbed"
|
||||
var/obj/screen/grab/hud1 = null
|
||||
var/mob/affecting = null
|
||||
var/atom/movable/structure = null // if the grab is not grabbing a mob
|
||||
var/mob/assailant = null
|
||||
var/state = 1.0
|
||||
var/killing = 0.0
|
||||
@@ -21,32 +22,52 @@
|
||||
spawn(0)
|
||||
del(src)
|
||||
return grabee
|
||||
|
||||
else if(structure)
|
||||
var/grabee = structure
|
||||
spawn(0)
|
||||
del(src)
|
||||
return grabee
|
||||
|
||||
return null
|
||||
|
||||
|
||||
/obj/item/weapon/grab/proc/synch()
|
||||
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
|
||||
del(src)
|
||||
if (assailant.r_hand == src)
|
||||
hud1.screen_loc = ui_rhand
|
||||
else
|
||||
hud1.screen_loc = ui_lhand
|
||||
if(affecting)
|
||||
if(affecting.anchored)//This will prevent from grabbing people that are anchored.
|
||||
del(src)
|
||||
if (assailant.r_hand == src)
|
||||
hud1.screen_loc = ui_rhand
|
||||
else
|
||||
hud1.screen_loc = ui_lhand
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grab/process()
|
||||
if(!assailant || !affecting)
|
||||
del(src)
|
||||
return
|
||||
if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))))
|
||||
//SN src = null
|
||||
if(!assailant || (!affecting && !structure))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(affecting && !structure)
|
||||
if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1))))
|
||||
//SN src = null
|
||||
del(src)
|
||||
return
|
||||
else if(!affecting && structure)
|
||||
if (!isturf(structure.loc) || !isturf(structure.loc) || (assailant.loc != structure.loc && get_dist(assailant, structure) > 1))
|
||||
del(src)
|
||||
return
|
||||
|
||||
if (assailant.client)
|
||||
assailant.client.screen -= hud1
|
||||
assailant.client.screen += hud1
|
||||
if (assailant.pulling == affecting)
|
||||
if (assailant.pulling == affecting || assailant.pulling == structure)
|
||||
assailant.pulling = null
|
||||
|
||||
if (structure)
|
||||
structure.loc = assailant.loc
|
||||
structure.layer = assailant.layer + 1
|
||||
|
||||
if (state <= 2)
|
||||
allow_upgrade = 1
|
||||
if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab)))
|
||||
@@ -111,6 +132,9 @@
|
||||
/obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj)
|
||||
//if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 )))
|
||||
// return
|
||||
|
||||
if (!affecting)
|
||||
return
|
||||
if ((!( assailant.canmove ) || assailant.lying))
|
||||
del(src)
|
||||
return
|
||||
@@ -133,7 +157,7 @@
|
||||
if (state < 3)
|
||||
if(istype(affecting, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = affecting
|
||||
if(H.mutations & FAT)
|
||||
if(FAT in H.mutations)
|
||||
assailant << "\blue You can't strangle [affecting] through all that fat!"
|
||||
return
|
||||
|
||||
@@ -197,6 +221,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob)
|
||||
if(!affecting) return
|
||||
if (M == affecting)
|
||||
if (state < 3)
|
||||
s_dbclick(hud1)
|
||||
@@ -204,7 +229,7 @@
|
||||
s_click(hud1)
|
||||
return
|
||||
if(M == assailant && state >= 2)
|
||||
if( ( ishuman(user) && (user.mutations & FAT) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) )
|
||||
var/mob/living/carbon/attacker = user
|
||||
for(var/mob/N in viewers(user, null))
|
||||
if(N.client)
|
||||
|
||||
@@ -510,6 +510,12 @@
|
||||
usr:inv3.icon_state = "inv3"
|
||||
usr:module_active = null
|
||||
|
||||
if("radar")
|
||||
usr:close_radar()
|
||||
|
||||
if("radar closed")
|
||||
usr:start_radar()
|
||||
|
||||
else
|
||||
DblClick()
|
||||
return
|
||||
@@ -574,7 +580,7 @@
|
||||
if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time))
|
||||
usr.next_move = world.time + 100
|
||||
usr.last_special = world.time + 100
|
||||
if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here.
|
||||
if(isalienadult(usr) || (HULK in usr.mutations) || (SUPRSTR in usr.augmentations))//Don't want to do a lot of logic gating here.
|
||||
usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)"
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(5))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
@@ -204,7 +204,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(50))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations))
|
||||
if(prob(70))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
|
||||
@@ -58,10 +58,11 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if ((usr.mutations & CLUMSY) && prob(50))
|
||||
if ((CLUMSY in usr.mutations) && prob(50))
|
||||
usr << "\red You cut yourself on the paper."
|
||||
return
|
||||
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
|
||||
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
|
||||
n_name = copytext(n_name, 1, 32)
|
||||
if ((loc == usr && usr.stat == 0))
|
||||
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
else
|
||||
prot = 1
|
||||
|
||||
if(prot > 0 || (user.mutations & COLD_RESISTANCE))
|
||||
if(prot > 0 || (COLD_RESISTANCE in user.mutations))
|
||||
user << "You remove the light [fitting]"
|
||||
else
|
||||
user << "You try to remove the light [fitting], but you burn your hand on it!"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
if(istype(user, /mob/living))
|
||||
var/mob/living/M = user
|
||||
if ((M.mutations & CLUMSY) && prob(50))
|
||||
if ((CLUMSY in M.mutations) && prob(50))
|
||||
M << "\red The [src.name] blows up in your face."
|
||||
M.take_organ_damage(0,20)
|
||||
M.drop_item()
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
AM.loc = src
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(H.mutations & FAT) // is a human and fat?
|
||||
if(FAT in H.mutations) // is a human and fat?
|
||||
has_fat_guy = 1 // set flag on holder
|
||||
if(istype(AM, /obj/effect/bigDelivery) && !hasmob)
|
||||
var/obj/effect/bigDelivery/T = AM
|
||||
|
||||
Reference in New Issue
Block a user