mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-03 22:13:24 +00:00
Merged in Erthilo's stuff.
This commit is contained in:
@@ -400,6 +400,7 @@
|
||||
usr << "\blue [grenades] / [max_grenades] Grenades."
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
if((istype(I, /obj/item/weapon/chem_grenade)) || (istype(I, /obj/item/weapon/flashbang)) || (istype(I, /obj/item/weapon/smokebomb)) || (istype(I, /obj/item/weapon/mustardbomb)) || (istype(I, /obj/item/weapon/empgrenade)))
|
||||
if(grenades.len < max_grenades)
|
||||
user.drop_item()
|
||||
@@ -411,7 +412,15 @@
|
||||
usr << "\red The grenade launcher cannot hold more grenades."
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(target == user) return
|
||||
|
||||
if (istype(target, /obj/item/weapon/storage/backpack ))
|
||||
return
|
||||
|
||||
else if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
|
||||
else if(target == user)
|
||||
return
|
||||
|
||||
if(grenades.len)
|
||||
spawn(0) fire_grenade(target,user)
|
||||
@@ -420,7 +429,60 @@
|
||||
|
||||
proc
|
||||
fire_grenade(atom/target, mob/user)
|
||||
if (locate (/obj/structure/table, src.loc))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red [] fired a grenade!", user), 1)
|
||||
user << "\red You fire the grenade launcher!"
|
||||
if (istype(grenades[1], /obj/item/weapon/chem_grenade))
|
||||
var/obj/item/weapon/chem_grenade/F = grenades[1]
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
message_admins("[key_name_admin(user)] fired a chemistry grenade from a grenade launcher ([src.name]).")
|
||||
log_game("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
|
||||
F.state = 1
|
||||
F.icon_state = initial(icon_state)+"_armed"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
F.explode()
|
||||
else if (istype(grenades[1], /obj/item/weapon/flashbang))
|
||||
var/obj/item/weapon/flashbang/F = grenades[1]
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
F.active = 1
|
||||
F.icon_state = "flashbang1"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
F.prime()
|
||||
else if (istype(grenades[1], /obj/item/weapon/smokebomb))
|
||||
var/obj/item/weapon/smokebomb/F = grenades[1]
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
F.icon_state = "flashbang1"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
F.prime()
|
||||
else if (istype(grenades[1], /obj/item/weapon/mustardbomb))
|
||||
var/obj/item/weapon/mustardbomb/F = grenades[1]
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
F.icon_state = "flashbang1"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
F.prime()
|
||||
else if (istype(grenades[1], /obj/item/weapon/empgrenade))
|
||||
var/obj/item/weapon/empgrenade/F = grenades[1]
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2)
|
||||
F.active = 1
|
||||
F.icon_state = "empar"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
F.prime()
|
||||
if (locate (/obj/structure/table, src.loc) || locate (/obj/item/weapon/storage, src.loc))
|
||||
return
|
||||
else
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
@@ -433,7 +495,7 @@
|
||||
F.throw_at(target, 30, 2)
|
||||
message_admins("[key_name_admin(user)] fired a chemistry grenade from a grenade launcher ([src.name]).")
|
||||
log_game("[key_name_admin(user)] used a chemistry grenade ([src.name]).")
|
||||
F.path = 1
|
||||
F.state = 1
|
||||
F.icon_state = initial(icon_state)+"_armed"
|
||||
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
|
||||
spawn(15)
|
||||
@@ -480,6 +542,7 @@
|
||||
|
||||
/obj/item/weapon/gun/syringe
|
||||
name = "syringe gun"
|
||||
desc = "A spring loaded rifle designed to fit syringes, designed to incapacitate unruly patients from a distance."
|
||||
icon = 'gun.dmi'
|
||||
icon_state = "syringegun"
|
||||
item_state = "syringegun"
|
||||
@@ -495,19 +558,19 @@
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\icon [src] Syringe gun:"
|
||||
usr << "\blue [syringes] / [max_syringes] Syringes."
|
||||
usr << "\blue [syringes.len] / [max_syringes] syringes."
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
syringes += I
|
||||
user << "\blue You put the syringe in the syringe gun."
|
||||
user << "\blue [syringes.len] / [max_syringes] Syringes."
|
||||
user << "\blue You put the syringe in [src]."
|
||||
user << "\blue [syringes.len] / [max_syringes] syringes."
|
||||
else
|
||||
usr << "\red The syringe gun cannot hold more syringes."
|
||||
usr << "\red [src] cannot hold more syringes."
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!isturf(target.loc) || target == user) return
|
||||
@@ -515,7 +578,7 @@
|
||||
if(syringes.len)
|
||||
spawn(0) fire_syringe(target,user)
|
||||
else
|
||||
usr << "\red The syringe gun is empty."
|
||||
usr << "\red [src] is empty."
|
||||
|
||||
proc
|
||||
fire_syringe(atom/target, mob/user)
|
||||
@@ -558,84 +621,11 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/rapidsyringe
|
||||
/obj/item/weapon/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
icon = 'gun.dmi'
|
||||
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to four syringes."
|
||||
icon_state = "rapidsyringegun"
|
||||
item_state = "rapidsyringegun"
|
||||
w_class = 3.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
force = 8.0
|
||||
var/list/syringes = new/list()
|
||||
var/max_syringes = 40
|
||||
|
||||
examine()
|
||||
set src in view()
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
usr << "\icon [src] Rapid Syringe gun:"
|
||||
usr << "\blue [syringes] / [max_syringes] Syringes."
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
syringes += I
|
||||
user << "\blue You put the syringe in the rapid syringe gun."
|
||||
user << "\blue [syringes.len] / [max_syringes] Syringes."
|
||||
else
|
||||
usr << "\red The rapid syringe gun cannot hold more syringes."
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!isturf(target.loc) || target == user) return
|
||||
|
||||
if(syringes.len)
|
||||
spawn(0) fire_syringe(target,user)
|
||||
else
|
||||
usr << "\red rapid The syringe gun is empty."
|
||||
|
||||
proc
|
||||
fire_syringe(atom/target, mob/user)
|
||||
if (locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
else
|
||||
var/turf/trg = get_turf(target)
|
||||
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
|
||||
S.reagents.trans_to(D, S.reagents.total_volume)
|
||||
syringes -= S
|
||||
del(S)
|
||||
D.icon_state = "syringeproj"
|
||||
D.name = "syringe"
|
||||
playsound(user.loc, 'syringeproj.ogg', 50, 1)
|
||||
|
||||
for(var/i=0, i<6, i++)
|
||||
if(!D) break
|
||||
if(D.loc == trg) break
|
||||
step_towards(D,trg)
|
||||
|
||||
for(var/mob/living/carbon/M in D.loc)
|
||||
if(!istype(M,/mob/living/carbon)) continue
|
||||
if(M == user) continue
|
||||
D.reagents.trans_to(M, 15)
|
||||
M.take_organ_damage(5)
|
||||
for(var/mob/O in viewers(world.view, D))
|
||||
O.show_message(text("\red [] was hit by the syringe!", M), 1)
|
||||
|
||||
del(D)
|
||||
if(D)
|
||||
for(var/atom/A in D.loc)
|
||||
if(A == user) continue
|
||||
if(A.density) del(D)
|
||||
|
||||
sleep(1)
|
||||
|
||||
if (D) spawn(10) del(D)
|
||||
|
||||
return
|
||||
|
||||
max_syringes = 4
|
||||
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
@@ -731,9 +721,15 @@
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
return
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
@@ -943,6 +939,7 @@
|
||||
return attack_hand()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
@@ -968,7 +965,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 & HUSK) //target done been et, no more blood in him
|
||||
if(T.mutations2 & NOCLONE) //target done been et, no more blood in him
|
||||
user << "\red You are unable to locate any blood."
|
||||
return
|
||||
if(ishuman(T))
|
||||
@@ -1108,6 +1105,35 @@
|
||||
else
|
||||
icon_state = "[(has_blood?"b":"")][rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(reagents.total_volume)
|
||||
var/obj/effect/overlay = new/obj
|
||||
overlay.icon = 'syringefilling.dmi'
|
||||
switch(rounded_vol)
|
||||
if(5) overlay.icon_state = "5"
|
||||
if(10) overlay.icon_state = "10"
|
||||
if(15) overlay.icon_state = "15"
|
||||
|
||||
var/list/rgbcolor = list(0,0,0)
|
||||
var/finalcolor
|
||||
for(var/datum/reagent/re in reagents.reagent_list) // natural color mixing bullshit/algorithm
|
||||
if(!finalcolor)
|
||||
rgbcolor = GetColors(re.color)
|
||||
finalcolor = re.color
|
||||
else
|
||||
var/newcolor[3]
|
||||
var/prergbcolor[3]
|
||||
prergbcolor = rgbcolor
|
||||
newcolor = GetColors(re.color)
|
||||
|
||||
rgbcolor[1] = (prergbcolor[1]+newcolor[1])/2
|
||||
rgbcolor[2] = (prergbcolor[2]+newcolor[2])/2
|
||||
rgbcolor[3] = (prergbcolor[3]+newcolor[3])/2
|
||||
|
||||
finalcolor = rgb(rgbcolor[1], rgbcolor[2], rgbcolor[3])
|
||||
|
||||
overlay.icon += finalcolor
|
||||
if(!istype(src.loc, /turf)) overlay.layer = 30
|
||||
overlays += overlay
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/ld50_syringe
|
||||
@@ -1150,6 +1176,10 @@
|
||||
attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!target.reagents) return
|
||||
|
||||
@@ -1267,6 +1297,9 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey])</font>")
|
||||
log_admin("ATTACK: [user] ([user.ckey]) injected [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) injected [M] ([M.ckey]) with [src].")
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
|
||||
src.reagents.reaction(M, INGEST)
|
||||
if(M.reagents)
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
@@ -1355,6 +1388,7 @@
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
@@ -1395,6 +1429,8 @@
|
||||
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
@@ -1487,6 +1523,7 @@
|
||||
return 0
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
return
|
||||
@@ -1509,6 +1546,7 @@
|
||||
var/slices_num
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if((slices_num <= 0 || !slices_num) || !slice_path)
|
||||
return 1
|
||||
var/inaccurate = 0
|
||||
@@ -1621,6 +1659,8 @@
|
||||
log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
@@ -1712,6 +1752,9 @@
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
@@ -1742,6 +1785,8 @@
|
||||
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
|
||||
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
@@ -1754,6 +1799,10 @@
|
||||
|
||||
return 0
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
|
||||
if(target.is_open_container() == 1 && target.reagents)
|
||||
@@ -2370,6 +2419,7 @@
|
||||
volume = 50
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
@@ -2403,6 +2453,8 @@
|
||||
message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
|
||||
|
||||
|
||||
// log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
@@ -2413,6 +2465,7 @@
|
||||
return 0
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
@@ -2463,7 +2516,7 @@
|
||||
icon_state = "soysauce"
|
||||
if("frostoil")
|
||||
name = "Coldsauce"
|
||||
desc = "Leaves the tongue numb in it's passage."
|
||||
desc = "Leaves the tongue numb in its passage."
|
||||
icon_state = "coldsauce"
|
||||
if("sodiumchloride")
|
||||
name = "Salt Shaker"
|
||||
@@ -2566,7 +2619,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/tea
|
||||
name = "Duke Purple Tea"
|
||||
desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea."
|
||||
desc = "A refreshingly quaint drink, served piping hot."
|
||||
icon_state = "tea"
|
||||
New()
|
||||
..()
|
||||
@@ -2587,7 +2640,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/h_chocolate
|
||||
name = "Dutch Hot Coco"
|
||||
desc = "Made in Space South America."
|
||||
icon_state = "tea"
|
||||
icon_state = "hotchocolate"
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("hot_coco", 30)
|
||||
@@ -2776,7 +2829,7 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater
|
||||
name = "Flask of Holy Water"
|
||||
desc = "A flask of the chaplains holy water."
|
||||
desc = "A flask of the chaplain's holy water."
|
||||
icon_state = "holyflask"
|
||||
New()
|
||||
..()
|
||||
@@ -2984,6 +3037,25 @@
|
||||
..()
|
||||
reagents.add_reagent("fuel",1000)
|
||||
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
|
||||
explosion(src.loc,-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
blob_act()
|
||||
explosion(src.loc,0,1,5,7,10)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
ex_act()
|
||||
explosion(src.loc,-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "Pepper Spray Refiller"
|
||||
desc = "Refill pepper spray canisters."
|
||||
@@ -2991,27 +3063,11 @@
|
||||
icon_state = "peppertank"
|
||||
anchored = 1
|
||||
density = 0
|
||||
amount_per_transfer_from_this = 30
|
||||
amount_per_transfer_from_this = 45
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("condensedcapsaicin",1000)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act()
|
||||
explosion(src.loc,0,1,5,7,10)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/ex_act()
|
||||
explosion(src.loc,-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if(temperature > T0C+500)
|
||||
explosion(src.loc,-1,0,2)
|
||||
if(src)
|
||||
del(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler
|
||||
name = "Water-Cooler"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
proc/UpdateDamage()
|
||||
health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + cloneloss)
|
||||
health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -315,10 +315,10 @@
|
||||
overlays = null
|
||||
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed))
|
||||
lying = 1
|
||||
else
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
|
||||
if (zone_sel)
|
||||
|
||||
@@ -28,13 +28,16 @@
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
/*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(70))
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
/*if(prob(70))
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if(M.client)
|
||||
M << "\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return*/
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
tmob.LAssailant = src
|
||||
|
||||
now_pushing = 0
|
||||
@@ -109,7 +112,7 @@
|
||||
ear_damage += 15
|
||||
ear_deaf += 60
|
||||
|
||||
bruteloss += b_loss
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
updatehealth()
|
||||
@@ -150,7 +153,7 @@
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message(text("\red [] has been hit by []", src, O), 1)
|
||||
if (health > 0)
|
||||
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
|
||||
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
|
||||
adjustFireLoss(30)
|
||||
|
||||
updatehealth()
|
||||
@@ -249,9 +252,7 @@
|
||||
else
|
||||
m_select.screen_loc = null
|
||||
|
||||
if(client && client.admin_invis)
|
||||
invisibility = 100
|
||||
else if (alien_invis)
|
||||
if (alien_invis)
|
||||
invisibility = 2
|
||||
if(istype(loc, /turf))//If they are standing on a turf.
|
||||
AddCamoOverlay(loc)//Overlay camo.
|
||||
@@ -280,12 +281,25 @@
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
var/damage = rand(1, 3)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
updatehealth()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||
|
||||
@@ -310,7 +324,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
|
||||
bruteloss += rand(1, 3)
|
||||
adjustBruteLoss(rand(1, 3))
|
||||
updatehealth()
|
||||
return
|
||||
|
||||
@@ -335,7 +349,7 @@
|
||||
else
|
||||
damage = rand(5, 35)
|
||||
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
|
||||
|
||||
updatehealth()
|
||||
@@ -449,7 +463,7 @@
|
||||
for(var/mob/O in viewers(M, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
if(M.type != /mob/living/carbon/human/tajaran)
|
||||
@@ -492,7 +506,7 @@
|
||||
for(var/mob/O in viewers(src, null))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
|
||||
bruteloss += damage
|
||||
adjustBruteLoss(damage)
|
||||
updatehealth()
|
||||
else
|
||||
M << "\green <B>[name] is too injured for that.</B>"
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
@@ -171,7 +172,7 @@
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
@@ -82,3 +82,16 @@
|
||||
world.Reboot()
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
/mob/living/carbon/human/proc/ChangeToHusk()
|
||||
if(mutations & HUSK)
|
||||
return
|
||||
mutations |= HUSK
|
||||
real_name = "Unknown"
|
||||
update_body()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/Drain()
|
||||
ChangeToHusk()
|
||||
mutations2 |= NOCLONE
|
||||
return
|
||||
@@ -478,6 +478,11 @@
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen( null )
|
||||
mymob.pressure.icon = 'screen1_old.dmi'
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
/*
|
||||
mymob.i_select = new /obj/screen( null )
|
||||
mymob.i_select.icon_state = "selector"
|
||||
@@ -669,7 +674,7 @@
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.pain, mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.pressure, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -162,7 +162,25 @@
|
||||
now_pushing = 1
|
||||
if (ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(tmob.a_intent == "help" && a_intent == "help" && tmob.canmove && canmove) // mutual brohugs all around!
|
||||
|
||||
//BubbleWrap - Should stop you pushing a restrained person out of the way
|
||||
|
||||
if(istype(tmob, /mob/living/carbon/human))
|
||||
|
||||
for(var/mob/M in range(tmob, 1))
|
||||
if( ((M.pulling == tmob && ( tmob.restrained() && !( M.restrained() ) && M.stat == 0)) || locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restrained, you cannot push past"
|
||||
now_pushing = 0
|
||||
return
|
||||
if( tmob.pulling == M && ( M.restrained() && !( tmob.restrained() ) && tmob.stat == 0) )
|
||||
if ( !(world.time % 5) )
|
||||
src << "\red [tmob] is restraining [M], you cannot push past"
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
//BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
|
||||
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove) // mutual brohugs all around!
|
||||
var/turf/oldloc = loc
|
||||
loc = tmob.loc
|
||||
tmob.loc = oldloc
|
||||
@@ -174,10 +192,20 @@
|
||||
|
||||
/*if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(40) && !(mutations & FAT))
|
||||
visible_message("\red <B>[src] fails to push [tmob]'s fat ass out of the way.</B>", \
|
||||
"\red <B>You fail to push [tmob]'s fat ass out of the way.</B>")
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return*/
|
||||
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
|
||||
if(prob(99))
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
|
||||
@@ -866,10 +894,10 @@
|
||||
update_body()
|
||||
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed))
|
||||
lying = 1
|
||||
else
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
// Automatically drop anything in store / id / belt if you're not wearing a uniform.
|
||||
if (!w_uniform)
|
||||
@@ -1249,6 +1277,19 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.emote("[M.friendly] [src]")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone))
|
||||
var/armor = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor)
|
||||
if(armor >= 2) return
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||
if(M.Victim) return // can't attack while eating!
|
||||
@@ -2169,7 +2210,7 @@ It can still be worn/put on as normal.
|
||||
if ((target.health >= -99.0 && target.stat == 1))
|
||||
target.cpr_time = world.time
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.oxyloss -= suff
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.losebreath = 0
|
||||
target.updatehealth()
|
||||
for(var/mob/O in viewers(source, null))
|
||||
@@ -2253,6 +2294,9 @@ It can still be worn/put on as normal.
|
||||
else
|
||||
if(source)
|
||||
source.update_clothing()
|
||||
spawn(0)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
if(target)
|
||||
target.update_clothing()
|
||||
//SN src = null
|
||||
|
||||
@@ -93,6 +93,9 @@
|
||||
//Disabilities
|
||||
handle_disabilities()
|
||||
|
||||
//Random events (vomiting etc)
|
||||
handle_random_events()
|
||||
|
||||
//Status updates, death etc.
|
||||
UpdateLuminosity()
|
||||
handle_regular_status_updates()
|
||||
@@ -105,6 +108,9 @@
|
||||
if(client)
|
||||
handle_regular_hud_updates()
|
||||
|
||||
//Being buckled to a chair or bed
|
||||
check_if_buckled()
|
||||
|
||||
// Yup.
|
||||
update_canmove()
|
||||
|
||||
@@ -451,7 +457,7 @@
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
return
|
||||
oxyloss += HUMAN_MAX_OXYLOSS
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
@@ -481,10 +487,10 @@
|
||||
spawn(0) emote("gasp")
|
||||
if(O2_pp > 0)
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
oxyloss += min(5*ratio, HUMAN_MAX_OXYLOSS) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!)
|
||||
adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
else
|
||||
oxyloss += HUMAN_MAX_OXYLOSS
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
|
||||
spawn(0) emote("cough")
|
||||
@@ -493,7 +499,7 @@
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)*/
|
||||
else // We're in safe limits
|
||||
oxyloss = max(getOxyLoss()-5, 0)
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
oxygen_alert = 0
|
||||
|
||||
@@ -505,9 +511,9 @@
|
||||
co2overloadtime = world.time
|
||||
else if(world.time - co2overloadtime > 120)
|
||||
Paralyse(3)
|
||||
oxyloss += 3 // Lets hurt em a little, let them know we mean business
|
||||
adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
|
||||
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
|
||||
oxyloss += 8
|
||||
adjustOxyLoss(8)
|
||||
if(prob(20) && isbreathing) // Lets give them some chance to know somethings not right though I guess.
|
||||
spawn(0) emote("cough")
|
||||
|
||||
@@ -640,7 +646,17 @@
|
||||
bodytemperature += 0.8*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
*/
|
||||
|
||||
//Account for massive pressure differences
|
||||
//Account for massive pressure differences. Done by Polymorph
|
||||
var/pressure = environment.return_pressure()
|
||||
if(!istype(wear_suit, /obj/item/clothing/suit/space)&&!istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
/*if(pressure < 20)
|
||||
if(prob(25))
|
||||
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
|
||||
adjustBruteLoss(5)
|
||||
*/
|
||||
if(pressure > HAZARD_HIGH_PRESSURE)
|
||||
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
adjust_body_temperature(current, loc_temp, boost)
|
||||
@@ -759,14 +775,9 @@
|
||||
if(nutrition < 500) //so they can't store nutrition to survive without light forever
|
||||
nutrition += light_amount
|
||||
if(light_amount > 0) //if there's enough light, heal
|
||||
if(getFireLoss())
|
||||
heal_overall_damage(0,1)
|
||||
if(getBruteLoss())
|
||||
heal_overall_damage(1,0)
|
||||
heal_overall_damage(1,1)
|
||||
adjustToxLoss(-1)
|
||||
|
||||
if(getOxyLoss())
|
||||
oxyloss--
|
||||
adjustOxyLoss(-1)
|
||||
|
||||
/*if(overeatduration > 500 && !(mutations & FAT))
|
||||
src << "\red You suddenly feel blubbery!"
|
||||
@@ -891,19 +902,25 @@
|
||||
if(getOxyLoss() > 50) Paralyse(3)
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
// adjustHalLoss(-5)
|
||||
if(paralysis <= 0)
|
||||
Paralyse(2)
|
||||
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
if(resting)
|
||||
Weaken(3)
|
||||
if(weakened <= 0)
|
||||
Weaken(2)
|
||||
|
||||
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
else if(health < config.health_threshold_crit)
|
||||
if(health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
//if(!rejuv) oxyloss++
|
||||
if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1)
|
||||
|
||||
if(stat != 2) stat = 1
|
||||
Paralyse(5)
|
||||
|
||||
@@ -1134,7 +1151,7 @@
|
||||
|
||||
if (healths)
|
||||
if (stat != 2)
|
||||
switch(health)
|
||||
switch(health - halloss)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(80 to 100)
|
||||
@@ -1168,6 +1185,24 @@
|
||||
nutrition_icon.icon_state = "nutrition3"
|
||||
else
|
||||
nutrition_icon.icon_state = "nutrition4"
|
||||
if (pressure)
|
||||
if(istype(wear_suit, /obj/item/clothing/suit/space)||istype(wear_suit, /obj/item/clothing/suit/armor/captain))
|
||||
pressure.icon_state = "pressure0"
|
||||
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure.icon_state = "pressure-1"
|
||||
else
|
||||
pressure.icon_state = "pressure-2"
|
||||
|
||||
if(pullin) pullin.icon_state = "pull[pulling ? 1 : 0]"
|
||||
|
||||
@@ -1201,6 +1236,7 @@
|
||||
else
|
||||
bodytemp.icon_state = "temp-4"
|
||||
|
||||
if(!client) return 0 //Wish we did not need these
|
||||
client.screen -= hud_used.blurry
|
||||
client.screen -= hud_used.druggy
|
||||
client.screen -= hud_used.vimpaired
|
||||
@@ -1225,6 +1261,14 @@
|
||||
if(!head:up && tinted_weldhelh)
|
||||
client.screen += hud_used.darkMask
|
||||
|
||||
if(eye_stat > 20)
|
||||
if((eye_stat > 30))
|
||||
client.screen += hud_used.darkMask
|
||||
else
|
||||
client.screen += hud_used.vimpaired
|
||||
|
||||
|
||||
|
||||
if (stat != 2)
|
||||
if (machine)
|
||||
if (!( machine.check_eye(src) ))
|
||||
@@ -1237,10 +1281,33 @@
|
||||
return 1
|
||||
|
||||
handle_random_events()
|
||||
/* // probably stupid -- Doohl
|
||||
if (prob(1) && prob(2))
|
||||
spawn(0)
|
||||
emote("sneeze")
|
||||
return
|
||||
*/
|
||||
|
||||
// Puke if toxloss is too high
|
||||
if(!stat)
|
||||
if (getToxLoss() >= 45 && nutrition > 20)
|
||||
lastpuke ++
|
||||
if(lastpuke >= 25) // about 25 second delay I guess
|
||||
Stun(5)
|
||||
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
O.show_message(text("<b>\red [] throws up!</b>", src), 1)
|
||||
playsound(src.loc, 'splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
nutrition -= 20
|
||||
adjustToxLoss(-3)
|
||||
|
||||
// make it so you can only puke so fast
|
||||
lastpuke = 0
|
||||
|
||||
handle_virus_updates()
|
||||
if(bodytemperature > 406)
|
||||
@@ -1295,13 +1362,13 @@
|
||||
continue
|
||||
if(air_master.current_cycle%3==1)
|
||||
if(!M.nodamage)
|
||||
M.bruteloss += 5
|
||||
M.adjustBruteLoss(5)
|
||||
nutrition += 10
|
||||
|
||||
handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, (max((0.9 - (changeling.chem_charges / 50)), 0.1) + changeling.chem_charges), 50)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
|
||||
@@ -1341,3 +1408,66 @@
|
||||
src << "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")
|
||||
else if(shock_stage == 80)
|
||||
src << "<font color='red'><b>"+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.")
|
||||
|
||||
/*
|
||||
// Commented out so hunger system won't be such shock
|
||||
// Damage and effect from not eating
|
||||
if(nutrition <= 50)
|
||||
if (prob (0.1))
|
||||
src << "\red Your stomach rumbles."
|
||||
if (prob (10))
|
||||
bruteloss++
|
||||
if (prob (5))
|
||||
src << "You feel very weak."
|
||||
weakened += rand(2, 3)
|
||||
*/
|
||||
/*
|
||||
snippets
|
||||
|
||||
if (mach)
|
||||
if (machine)
|
||||
mach.icon_state = "mach1"
|
||||
else
|
||||
mach.icon_state = null
|
||||
|
||||
if (!m_flag)
|
||||
moved_recently = 0
|
||||
m_flag = null
|
||||
|
||||
|
||||
|
||||
if ((istype(loc, /turf/space) && !( locate(/obj/movable, loc) )))
|
||||
var/layers = 20
|
||||
// ******* Check
|
||||
if (((istype(head, /obj/item/clothing/head) && head.flags & 4) || (istype(wear_mask, /obj/item/clothing/mask) && (!( wear_mask.flags & 4 ) && wear_mask.flags & 8))))
|
||||
layers -= 5
|
||||
if (istype(w_uniform, /obj/item/clothing/under))
|
||||
layers -= 5
|
||||
if ((istype(wear_suit, /obj/item/clothing/suit) && wear_suit.flags & 8))
|
||||
layers -= 10
|
||||
if (layers > oxcheck)
|
||||
oxcheck = layers
|
||||
|
||||
|
||||
if(bodytemperature < 282.591 && (!firemut))
|
||||
if(bodytemperature < 250)
|
||||
adjustFireLoss(4)
|
||||
updatehealth()
|
||||
if(paralysis <= 2) paralysis += 2
|
||||
else if(prob(1) && !paralysis)
|
||||
if(paralysis <= 5) paralysis += 5
|
||||
emote("collapse")
|
||||
src << "\red You collapse from the cold!"
|
||||
if(bodytemperature > 327.444 && (!firemut))
|
||||
if(bodytemperature > 345.444)
|
||||
if(!eye_blurry) src << "\red The heat blurs your vision!"
|
||||
eye_blurry = max(4, eye_blurry)
|
||||
if(prob(3)) adjustFireLoss(rand(1,2))
|
||||
else if(prob(3) && !paralysis)
|
||||
paralysis += 2
|
||||
emote("collapse")
|
||||
src << "\red You collapse from heat exaustion!"
|
||||
plcheck = t_plasma
|
||||
oxcheck = t_oxygen
|
||||
G.turf_add(T, G.total_moles())
|
||||
*/
|
||||
|
||||
@@ -390,6 +390,12 @@
|
||||
mymob.oxygen.name = "oxygen"
|
||||
mymob.oxygen.screen_loc = ui_oxygen
|
||||
|
||||
mymob.pressure = new /obj/screen( null )
|
||||
mymob.pressure.icon = 'screen1_old.dmi'
|
||||
mymob.pressure.icon_state = "pressure0"
|
||||
mymob.pressure.name = "pressure"
|
||||
mymob.pressure.screen_loc = ui_pressure
|
||||
|
||||
/*
|
||||
mymob.i_select = new /obj/screen( null )
|
||||
mymob.i_select.icon_state = "selector"
|
||||
@@ -401,7 +407,6 @@
|
||||
mymob.m_select.name = "moving"
|
||||
mymob.m_select.screen_loc = "16:-11,14"
|
||||
*/
|
||||
|
||||
mymob.toxin = new /obj/screen( null )
|
||||
mymob.toxin.icon = ui_style
|
||||
mymob.toxin.icon_state = "tox0"
|
||||
@@ -569,7 +574,7 @@
|
||||
mymob.client.screen = null
|
||||
|
||||
//, mymob.i_select, mymob.m_select
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.hands, mymob.healths, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep, mymob.pressure, mymob.gun_setting_icon) //, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
//if(istype(mymob,/mob/living/carbon/monkey)) mymob.client.screen += src.mon_blo
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
//to find it.
|
||||
src.blinded = null
|
||||
|
||||
|
||||
//Disease Check
|
||||
handle_virus_updates()
|
||||
|
||||
@@ -260,7 +259,7 @@
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
oxyloss += 7
|
||||
adjustOxyLoss(7)
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
@@ -288,7 +287,7 @@
|
||||
if (O2_pp == 0)
|
||||
O2_pp = 0.01
|
||||
var/ratio = safe_oxygen_min/O2_pp
|
||||
oxyloss += min(5*ratio, 7) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!)
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
/*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose)
|
||||
@@ -298,7 +297,7 @@
|
||||
oxygen_used = breath.oxygen*ratio/6
|
||||
oxygen_alert = max(oxygen_alert, 1)*/
|
||||
else // We're in safe limits
|
||||
oxyloss = max(getOxyLoss()-5, 0)
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen/6
|
||||
oxygen_alert = 0
|
||||
|
||||
@@ -310,9 +309,9 @@
|
||||
co2overloadtime = world.time
|
||||
else if(world.time - co2overloadtime > 120)
|
||||
Paralyse(3)
|
||||
oxyloss += 3 // Lets hurt em a little, let them know we mean business
|
||||
adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business
|
||||
if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
|
||||
oxyloss += 8
|
||||
adjustOxyLoss(8)
|
||||
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
|
||||
spawn(0) emote("cough")
|
||||
|
||||
@@ -368,8 +367,21 @@
|
||||
|
||||
if(stat==2)
|
||||
bodytemperature += 0.1*(environment.temperature - bodytemperature)*environment_heat_capacity/(environment_heat_capacity + 270000)
|
||||
|
||||
//Account for massive pressure differences
|
||||
var/pressure = environment.return_pressure()
|
||||
|
||||
// if(!wear_suit) Monkies cannot into space.
|
||||
// if(!istype(wear_suit, /obj/item/clothing/suit/space))
|
||||
|
||||
/*if(pressure < 20)
|
||||
if(prob(25))
|
||||
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
|
||||
adjustBruteLoss(5)
|
||||
*/
|
||||
|
||||
if(pressure > HAZARD_HIGH_PRESSURE)
|
||||
|
||||
adjustBruteLoss(min((10+(round(pressure/(HIGH_STEP_PRESSURE)-2)*5)),MAX_PRESSURE_DAMAGE))
|
||||
return //TODO: DEFERRED
|
||||
|
||||
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
@@ -423,8 +435,8 @@
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
if(src.health <= 20 && prob(1)) spawn(0) emote("gasp")
|
||||
|
||||
if(!src.rejuv) src.oxyloss++
|
||||
if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++
|
||||
//if(!src.rejuv) src.oxyloss++ //-Nodrak (I can't believe I thought this should be commented back in)
|
||||
if(!src.reagents.has_reagent("inaprovaline") && src.stat != 2) src.adjustOxyLoss(2)
|
||||
|
||||
if(src.stat != 2) src.stat = 1
|
||||
Paralyse(5)
|
||||
@@ -530,6 +542,21 @@
|
||||
src.healths.icon_state = "health6"
|
||||
else
|
||||
src.healths.icon_state = "health7"
|
||||
if (pressure)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if(environment)
|
||||
switch(environment.return_pressure())
|
||||
|
||||
if(HAZARD_HIGH_PRESSURE to INFINITY)
|
||||
pressure.icon_state = "pressure2"
|
||||
if(WARNING_HIGH_PRESSURE to HAZARD_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure1"
|
||||
if(WARNING_LOW_PRESSURE to WARNING_HIGH_PRESSURE)
|
||||
pressure.icon_state = "pressure0"
|
||||
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
|
||||
pressure.icon_state = "pressure-1"
|
||||
else
|
||||
pressure.icon_state = "pressure-2"
|
||||
|
||||
if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]"
|
||||
|
||||
@@ -625,6 +652,6 @@
|
||||
handle_changeling()
|
||||
if (mind)
|
||||
if (mind.special_role == "Changeling" && changeling)
|
||||
changeling.chem_charges = between(0, (max((0.9 - (changeling.chem_charges / 50)), 0.1) + changeling.chem_charges), 50)
|
||||
changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage)
|
||||
if ((changeling.geneticdamage > 0))
|
||||
changeling.geneticdamage = changeling.geneticdamage-1
|
||||
@@ -452,10 +452,10 @@
|
||||
|
||||
/mob/living/carbon/monkey/update_clothing()
|
||||
if(buckled)
|
||||
if(istype(buckled, /obj/structure/stool/bed))
|
||||
lying = 1
|
||||
else
|
||||
if(istype(buckled, /obj/structure/stool/bed/chair))
|
||||
lying = 0
|
||||
else
|
||||
lying = 1
|
||||
|
||||
if(update_icon) // Skie
|
||||
..()
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
log_access("Login: [key_name(src)] from [src.client.address ? src.client.address : "localhost"]")
|
||||
src.lastKnownIP = src.client.address
|
||||
src.computer_id = src.client.computer_id
|
||||
if(!src.client.midis || !src.midis)
|
||||
src.client.midis = 0
|
||||
src.midis = 0
|
||||
if (config.log_access)
|
||||
for (var/mob/M in world)
|
||||
if(M == src)
|
||||
|
||||
527
code/modules/mob/mob_defines.dm
Normal file
527
code/modules/mob/mob_defines.dm
Normal file
@@ -0,0 +1,527 @@
|
||||
/mob
|
||||
density = 1
|
||||
layer = 4.0
|
||||
animate_movement = 2
|
||||
// flags = NOREACT
|
||||
//THE SOLUTION BUBBLES was funnier.
|
||||
var/datum/mind/mind
|
||||
|
||||
|
||||
|
||||
|
||||
//MOB overhaul
|
||||
|
||||
//Not in use yet
|
||||
// var/obj/organstructure/organStructure = null
|
||||
|
||||
//Vars that have been relocated to organStructure
|
||||
//Vars that have been relocated to organStructure ++END
|
||||
|
||||
|
||||
|
||||
//Vars that should only be accessed via procs
|
||||
var/bruteloss = 0.0//Living
|
||||
var/oxyloss = 0.0//Living
|
||||
var/toxloss = 0.0//Living
|
||||
var/fireloss = 0.0//Living
|
||||
var/cloneloss = 0//Carbon
|
||||
var/brainloss = 0//Carbon
|
||||
var/maxHealth = 100 //Living
|
||||
//Vars that should only be accessed via procs ++END
|
||||
|
||||
// var/uses_hud = 0
|
||||
var/obj/screen/pain = null
|
||||
var/obj/screen/flash = null
|
||||
var/obj/screen/blind = null
|
||||
var/obj/screen/hands = null
|
||||
var/obj/screen/mach = null
|
||||
var/obj/screen/sleep = null
|
||||
var/obj/screen/rest = null
|
||||
var/obj/screen/pullin = null
|
||||
var/obj/screen/internals = null
|
||||
var/obj/screen/oxygen = null
|
||||
var/obj/screen/i_select = null
|
||||
var/obj/screen/m_select = null
|
||||
var/obj/screen/toxin = null
|
||||
var/obj/screen/fire = null
|
||||
var/obj/screen/bodytemp = null
|
||||
var/obj/screen/healths = null
|
||||
var/obj/screen/throw_icon = null
|
||||
var/obj/screen/nutrition_icon = null
|
||||
var/obj/screen/pressure = null
|
||||
var/obj/screen/gun/item/item_use_icon = null
|
||||
var/obj/screen/gun/move/gun_move_icon = null
|
||||
var/obj/screen/gun/run/gun_run_icon = null
|
||||
var/obj/screen/gun/mode/gun_setting_icon = null
|
||||
|
||||
var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
|
||||
var/last_luminosity = 0
|
||||
|
||||
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
|
||||
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
|
||||
The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).
|
||||
I'll make some notes on where certain variable defines should probably go.
|
||||
Changing this around would probably require a good look-over the pre-existing code.
|
||||
*/
|
||||
//var/midis = 1 //Check if midis should be played for someone - no, this is something that is tied to clients, not mobs.
|
||||
var/alien_egg_flag = 0//Have you been infected?
|
||||
var/last_special = 0
|
||||
var/obj/screen/zone_sel/zone_sel = null
|
||||
|
||||
var/emote_allowed = 1
|
||||
var/computer_id = null
|
||||
var/lastattacker = null
|
||||
var/lastattacked = null
|
||||
var/attack_log = list( )
|
||||
var/already_placed = 0.0
|
||||
var/obj/machinery/machine = null
|
||||
var/other_mobs = null
|
||||
var/memory = ""
|
||||
var/poll_answer = 0.0
|
||||
var/sdisabilities = 0//Carbon
|
||||
var/disabilities = 0//Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/stat = 0.0
|
||||
var/next_move = null
|
||||
var/prev_move = null
|
||||
var/monkeyizing = null//Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
var/eye_blind = null//Carbon
|
||||
var/eye_blurry = null//Carbon
|
||||
var/ear_deaf = null//Carbon
|
||||
var/ear_damage = null//Carbon
|
||||
var/stuttering = null//Carbon
|
||||
var/slurring = null
|
||||
var/real_name = null
|
||||
var/original_name = null //Original name is only used in ghost chat! It is not to be edited by anything!
|
||||
var/flavor_text = ""
|
||||
var/blinded = null
|
||||
var/bhunger = 0//Carbon
|
||||
var/ajourn = 0
|
||||
var/rejuv = null
|
||||
var/druggy = 0//Carbon
|
||||
var/confused = 0//Carbon
|
||||
var/antitoxs = null
|
||||
var/plasma = null
|
||||
var/sleeping = 0.0//Carbon
|
||||
var/sleeping_willingly = 0.0 //Carbon, allows people to sleep forever if desired
|
||||
var/admin_observing = 0.0
|
||||
var/resting = 0.0//Carbon
|
||||
var/lying = 0.0
|
||||
var/canmove = 1.0
|
||||
var/eye_stat = null//Living, potentially Carbon
|
||||
var/lastpuke = 0
|
||||
|
||||
var/name_archive //For admin things like possession
|
||||
|
||||
var/timeofdeath = 0.0//Living
|
||||
var/cpr_time = 1.0//Carbon
|
||||
var/health = 100//Living
|
||||
|
||||
var/bodytemperature = 310.055 //98.7 F
|
||||
var/drowsyness = 0.0//Carbon
|
||||
var/dizziness = 0//Carbon
|
||||
var/is_dizzy = 0
|
||||
var/is_jittery = 0
|
||||
var/jitteriness = 0//Carbon
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0//Carbon
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/paralysis = 0.0
|
||||
var/stunned = 0.0
|
||||
var/weakened = 0.0
|
||||
var/losebreath = 0.0//Carbon
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = "help"//Living
|
||||
var/m_int = null//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/lastDblClick = 0
|
||||
var/lastKnownIP = null
|
||||
var/obj/structure/stool/bed/buckled = null//Living
|
||||
var/obj/item/weapon/handcuffs/handcuffed = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
var/obj/item/r_hand = null//Living
|
||||
var/obj/item/weapon/back = null//Human/Monkey
|
||||
var/obj/item/weapon/tank/internal = null//Human/Monkey
|
||||
var/obj/item/weapon/storage/s_active = null//Carbon
|
||||
var/obj/item/clothing/mask/wear_mask = null//Carbon
|
||||
var/r_epil = 0
|
||||
var/r_ch_cou = 0
|
||||
var/r_Tourette = 0//Carbon
|
||||
|
||||
var/seer = 0 //for cult//Carbon, probably Human
|
||||
|
||||
var/miming = null //checks if the guy is a mime//Human
|
||||
var/silent = null //Can't talk. Value goes down every life proc.//Human
|
||||
|
||||
var/obj/hud/hud_used = null
|
||||
|
||||
//var/list/organs = list( ) //moved to human.
|
||||
var/list/grabbed_by = list( )
|
||||
var/list/requests = list( )
|
||||
|
||||
var/list/mapobjs = list()
|
||||
|
||||
var/in_throw_mode = 0
|
||||
|
||||
var/coughedtime = null
|
||||
|
||||
var/inertia_dir = 0
|
||||
var/footstep = 1
|
||||
|
||||
var/music_lastplayed = "null"
|
||||
|
||||
var/job = null//Living
|
||||
|
||||
var/nodamage = 0
|
||||
var/logged_in = 0
|
||||
|
||||
var/underwear = 1//Human
|
||||
var/backbag = 2//Human
|
||||
var/be_syndicate = 0//This really should be a client variable.
|
||||
var/be_random_name = 0
|
||||
var/const/blindness = 1//Carbon
|
||||
var/const/deafness = 2//Carbon
|
||||
var/const/muteness = 4//Carbon
|
||||
|
||||
|
||||
var/datum/dna/dna = null//Carbon
|
||||
var/radiation = 0.0//Carbon
|
||||
|
||||
var/mutations = 0//Carbon
|
||||
var/mutations2 = 0//Carbon
|
||||
//telekinesis = 1
|
||||
//firemut = 2
|
||||
//xray = 4
|
||||
//hulk = 8
|
||||
//clumsy = 16
|
||||
//obese = 32
|
||||
//husk = 64
|
||||
|
||||
var/voice_name = "unidentifiable voice"
|
||||
var/voice_message = null // When you are not understood by others (replaced with just screeches, hisses, chimpers etc.)
|
||||
var/say_message = null // When you are understood by others. Currently only used by aliens and monkeys in their say_quote procs
|
||||
|
||||
//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed.
|
||||
var/proc_holder_list[] = list()//Right now unused.
|
||||
//Also unlike the spell list, this would only store the object in contents, not an object in itself.
|
||||
|
||||
/* Add this line to whatever stat module you need in order to use the proc holder list.
|
||||
Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus.
|
||||
This requires creating a verb for the object proc holder.
|
||||
|
||||
if (proc_holder_list.len)//Generic list for proc_holder objects.
|
||||
for(var/obj/effect/proc_holder/P in proc_holder_list)
|
||||
statpanel("[P.panel]","",P)
|
||||
*/
|
||||
|
||||
//The last mob/living/carbon to push/drag/grab this mob (mostly used by Metroids friend recognition)
|
||||
var/mob/living/carbon/LAssailant = null
|
||||
|
||||
//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button
|
||||
var/obj/effect/proc_holder/spell/list/spell_list = list()
|
||||
|
||||
//Changlings, but can be used in other modes
|
||||
var/obj/effect/proc_holder/changpower/list/power_list = list()
|
||||
|
||||
//List of active diseases
|
||||
|
||||
var/viruses = list() // replaces var/datum/disease/virus
|
||||
|
||||
//Monkey/infected mode
|
||||
var/list/resistances = list()
|
||||
var/datum/disease/virus = null
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
/*
|
||||
//Changeling mode stuff//Carbon
|
||||
var/changeling_level = 0
|
||||
var/list/absorbed_dna = list()
|
||||
var/changeling_fakedeath = 0
|
||||
var/chem_charges = 20.00
|
||||
var/sting_range = 1
|
||||
*/
|
||||
var/datum/changeling/changeling = null
|
||||
|
||||
var/universal_speak = 0 // Set to 1 to enable the mob to speak to everyone -- TLE
|
||||
var/obj/control_object // Hacking in to control objects -- TLE
|
||||
|
||||
var/robot_talk_understand = 0
|
||||
var/alien_talk_understand = 0
|
||||
var/taj_talk_understand = 0
|
||||
//You can guess what these are for. --SkyMarshal
|
||||
var/list/atom/hallucinations = list()
|
||||
var/halloss = 0
|
||||
var/hallucination = 0
|
||||
|
||||
// TG Porting Variables
|
||||
var/canstun = 1 // determines if this mob can be stunned by things
|
||||
var/canweaken = 1 // determines if this mob can be weakened/knocked down by things
|
||||
var/nopush = 0 //Can they be shoved?
|
||||
|
||||
var/area/lastarea = null
|
||||
|
||||
var/digitalcamo = 0 // Can they be tracked by the AI?
|
||||
|
||||
/*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move
|
||||
through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that
|
||||
the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/
|
||||
//0 is off, 1 is normal, 2 is for ninjas.
|
||||
var/incorporeal_move = 0
|
||||
|
||||
|
||||
var/update_icon = 1 // Set to 0 if you want that the mob's icon doesn't update when it moves -- Skie
|
||||
// This can be used if you want to change the icon on the fly and want it to stay
|
||||
|
||||
var/UI = 'screen1_old.dmi' // For changing the UI from preferences
|
||||
|
||||
// var/obj/effect/organstructure/organStructure = null //for dem organs
|
||||
var/list/organs = list( ) //List of organs.
|
||||
|
||||
//Singularity wants you!
|
||||
var/grav_delay = 0
|
||||
var/being_strangled = 0
|
||||
|
||||
/mob/proc/contract_disease(var/datum/disease/virus, var/skip_this = 0, var/force_species_check=1)
|
||||
// world << "Contract_disease called by [src] with virus [virus]"
|
||||
if(stat >=2) return
|
||||
if(virus.type in resistances)
|
||||
if(prob(99.9)) return
|
||||
resistances.Remove(virus.type)//the resistance is futile
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(istype(D, virus.type))
|
||||
return // two viruses of the same kind can't infect a body at once!!
|
||||
|
||||
|
||||
if(force_species_check)
|
||||
var/fail = 1
|
||||
for(var/name in virus.affected_species)
|
||||
var/mob_type = text2path("/mob/living/carbon/[lowertext(name)]")
|
||||
if(mob_type && istype(src, mob_type))
|
||||
fail = 0
|
||||
break
|
||||
if(fail) return
|
||||
|
||||
if(skip_this == 1)
|
||||
//if(src.virus) < -- this used to replace the current disease. Not anymore!
|
||||
//src.virus.cure(0)
|
||||
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
|
||||
//if(src.virus) //
|
||||
//return //
|
||||
|
||||
|
||||
/*
|
||||
var/list/clothing_areas = list()
|
||||
var/list/covers = list(UPPER_TORSO,LOWER_TORSO,LEGS,FEET,ARMS,HANDS)
|
||||
for(var/Covers in covers)
|
||||
clothing_areas[Covers] = list()
|
||||
|
||||
for(var/obj/item/clothing/Clothing in src)
|
||||
if(Clothing)
|
||||
for(var/Covers in covers)
|
||||
if(Clothing&Covers)
|
||||
clothing_areas[Covers] += Clothing
|
||||
|
||||
*/
|
||||
if(prob(15/virus.permeability_mod)) return //the power of immunity compels this disease!
|
||||
|
||||
var/obj/item/clothing/Cl = null
|
||||
var/passed = 1
|
||||
|
||||
//chances to target this zone
|
||||
var/head_ch
|
||||
var/body_ch
|
||||
var/hands_ch
|
||||
var/feet_ch
|
||||
|
||||
switch(virus.spread_type)
|
||||
if(CONTACT_HANDS)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 100
|
||||
feet_ch = 0
|
||||
if(CONTACT_FEET)
|
||||
head_ch = 0
|
||||
body_ch = 0
|
||||
hands_ch = 0
|
||||
feet_ch = 100
|
||||
else
|
||||
head_ch = 100
|
||||
body_ch = 100
|
||||
hands_ch = 25
|
||||
feet_ch = 25
|
||||
|
||||
|
||||
var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)//1 - head, 2 - body, 3 - hands, 4- feet
|
||||
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(isobj(H.head))
|
||||
Cl = H.head
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Head pass [passed]"
|
||||
if(passed && isobj(H.wear_mask))
|
||||
Cl = H.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Mask pass [passed]"
|
||||
if(2)//arms and legs included
|
||||
if(isobj(H.wear_suit))
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
if(passed && isobj(H.slot_w_uniform))
|
||||
Cl = H.slot_w_uniform
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Uniform pass [passed]"
|
||||
if(3)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&HANDS)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.gloves))
|
||||
Cl = H.gloves
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Gloves pass [passed]"
|
||||
if(4)
|
||||
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered&FEET)
|
||||
Cl = H.wear_suit
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Suit pass [passed]"
|
||||
|
||||
if(passed && isobj(H.shoes))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100*virus.permeability_mod)
|
||||
// world << "Shoes pass [passed]"
|
||||
else
|
||||
src << "Something strange's going on, something's wrong."
|
||||
|
||||
/*if("feet")
|
||||
if(H.shoes && istype(H.shoes, /obj/item/clothing/))
|
||||
Cl = H.shoes
|
||||
passed = prob(Cl.permeability_coefficient*100)
|
||||
//
|
||||
world << "Shoes pass [passed]"
|
||||
*/ //
|
||||
else if(istype(src, /mob/living/carbon/monkey))
|
||||
var/mob/living/carbon/monkey/M = src
|
||||
switch(target_zone)
|
||||
if(1)
|
||||
if(M.wear_mask && isobj(M.wear_mask))
|
||||
Cl = M.wear_mask
|
||||
passed = prob(Cl.permeability_coefficient*100+virus.permeability_mod)
|
||||
//world << "Mask pass [passed]"
|
||||
|
||||
if(passed && virus.spread_type == AIRBORNE && internals)
|
||||
passed = (prob(50*virus.permeability_mod))
|
||||
|
||||
if(passed)
|
||||
//world << "Infection in the mob [src]. YAY"
|
||||
|
||||
|
||||
/*
|
||||
var/score = 0
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:gloves) score += 5
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/space)) score += 10
|
||||
if(istype(src:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
|
||||
if(istype(src:head, /obj/item/clothing/head/helmet/space)) score += 5
|
||||
if(istype(src:head, /obj/item/clothing/head/bio_hood)) score += 5
|
||||
if(wear_mask)
|
||||
score += 5
|
||||
if((istype(src:wear_mask, /obj/item/clothing/mask) || istype(src:wear_mask, /obj/item/clothing/mask/surgical)) && !internal)
|
||||
score += 5
|
||||
if(internal)
|
||||
score += 5
|
||||
if(score > 20)
|
||||
return
|
||||
else if(score == 20 && prob(95))
|
||||
return
|
||||
else if(score >= 15 && prob(75))
|
||||
return
|
||||
else if(score >= 10 && prob(55))
|
||||
return
|
||||
else if(score >= 5 && prob(35))
|
||||
return
|
||||
else if(prob(15))
|
||||
return
|
||||
else*/
|
||||
var/datum/disease/v = new virus.type
|
||||
src.viruses += v
|
||||
v.affected_mob = src
|
||||
v.strain_data = v.strain_data.Copy()
|
||||
v.holder = src
|
||||
if(prob(5))
|
||||
v.carrier = 1
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS
|
||||
|
||||
/mob/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/proc/adjustBruteLoss(var/amount)
|
||||
bruteloss = max(bruteloss + amount, 0)
|
||||
|
||||
/mob/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/proc/adjustOxyLoss(var/amount)
|
||||
oxyloss = max(oxyloss + amount, 0)
|
||||
|
||||
/mob/proc/setOxyLoss(var/amount)
|
||||
oxyloss = amount
|
||||
|
||||
/mob/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/proc/adjustToxLoss(var/amount)
|
||||
toxloss = max(toxloss + amount, 0)
|
||||
|
||||
/mob/proc/setToxLoss(var/amount)
|
||||
toxloss = amount
|
||||
|
||||
/mob/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/proc/adjustFireLoss(var/amount)
|
||||
fireloss = max(fireloss + amount, 0)
|
||||
|
||||
/mob/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/proc/adjustCloneLoss(var/amount)
|
||||
cloneloss = max(cloneloss + amount, 0)
|
||||
|
||||
/mob/proc/setCloneLoss(var/amount)
|
||||
cloneloss = amount
|
||||
|
||||
/mob/proc/getBrainLoss()
|
||||
return brainloss
|
||||
|
||||
/mob/proc/adjustBrainLoss(var/amount)
|
||||
brainloss = max(brainloss + amount, 0)
|
||||
|
||||
/mob/proc/setBrainLoss(var/amount)
|
||||
brainloss = amount
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
@@ -169,24 +169,27 @@ proc/setup_skills()
|
||||
|
||||
mob/living/carbon/human/proc/GetSkillClass(points)
|
||||
// skill classes describe how your character compares in total points
|
||||
var/original_points = points
|
||||
points -= min(round((age - 20) / 2.5), 4) // every 2.5 years after 20, one extra skillpoint
|
||||
if(age > 30)
|
||||
points -= round((age - 30) / 5) // every 5 years after 30, one extra skillpoint
|
||||
if(original_points > 0 && points <= 0) points = 1
|
||||
switch(points)
|
||||
if(0)
|
||||
return "Unconfigured"
|
||||
if(1 to 3)
|
||||
return "Talentless"
|
||||
if(1 to 2)
|
||||
return "Terrifying"
|
||||
if(4 to 6)
|
||||
return "Below Average"
|
||||
if(7 to 9)
|
||||
if(7 to 10)
|
||||
return "Average"
|
||||
if(10 to 12)
|
||||
return "Talented"
|
||||
if(13 to 15)
|
||||
return "Extremely Talented"
|
||||
if(16 to 18)
|
||||
if(11 to 14)
|
||||
return "Above Average"
|
||||
if(15 to 18)
|
||||
return "Exceptional"
|
||||
if(19 to 24)
|
||||
return "Genius"
|
||||
if(19 to 21)
|
||||
return "True Genius"
|
||||
if(22 to 1000)
|
||||
if(24 to 1000)
|
||||
return "God"
|
||||
|
||||
|
||||
@@ -202,22 +205,26 @@ proc/show_skill_window(var/mob/user, var/mob/living/carbon/human/M)
|
||||
var/HTML = "<body>"
|
||||
HTML += "<b>Select your Skills</b><br>"
|
||||
HTML += "Current skill level: <b>[M.GetSkillClass(M.used_skillpoints)]</b> ([M.used_skillpoints])<br>"
|
||||
HTML += "<a href=\"byond://?src=\ref[user];skills=1;preferences=1;preconfigured=1;\">Use preconfigured skillset</a><br>"
|
||||
HTML += "<table>"
|
||||
for(var/V in SKILLS)
|
||||
HTML += "<tr><th colspan = 5><b>[V]</b></th></tr>"
|
||||
HTML += "<tr><th colspan = 5><b>[V]</b>"
|
||||
HTML += "</th></tr>"
|
||||
for(var/datum/skill/S in SKILLS[V])
|
||||
var/level = M.skills[S.ID]
|
||||
HTML += "<tr style='text-align:left;'>"
|
||||
HTML += "<th>[S.name]</th>"
|
||||
HTML += "<th><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[Layman\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Basic\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Adept\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Expert\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_NONE) ? "red" : "black"]>\[Untrained\]</font></th>"
|
||||
// secondary skills don't have an amateur level
|
||||
if(S.secondary)
|
||||
HTML += "<th></th>"
|
||||
else
|
||||
HTML += "<th><font color=[(level == SKILL_BASIC) ? "red" : "black"]>\[Amateur\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_ADEPT) ? "red" : "black"]>\[Trained\]</font></th>"
|
||||
HTML += "<th><font color=[(level == SKILL_EXPERT) ? "red" : "black"]>\[Professional\]</font></th>"
|
||||
HTML += "</tr>"
|
||||
HTML += "</table>"
|
||||
|
||||
user << browse(null, "window=show_skills")
|
||||
user << browse(null, "window=preferences")
|
||||
user << browse(HTML, "window=show_skills;size=600x800")
|
||||
return
|
||||
|
||||
|
||||
@@ -389,28 +389,43 @@
|
||||
if ((!( usr.stat ) && usr.canmove && !( usr.restrained() )))
|
||||
if (usr.internal)
|
||||
usr.internal = null
|
||||
usr << "\blue No longer running on internals."
|
||||
if (usr.internals)
|
||||
usr.internals.icon_state = "internal0"
|
||||
else
|
||||
if (!( istype(usr.wear_mask, /obj/item/clothing/mask) ))
|
||||
return
|
||||
else
|
||||
if (istype(usr.back, /obj/item/weapon/tank))
|
||||
usr.internal = usr.back
|
||||
else if (ishuman(usr) && istype(usr:s_store, /obj/item/weapon/tank))
|
||||
usr.internal = usr:s_store
|
||||
else if (ishuman(usr) && istype(usr:belt, /obj/item/weapon/tank))
|
||||
usr.internal = usr:belt
|
||||
else if (istype(usr.l_hand, /obj/item/weapon/tank))
|
||||
usr.internal = usr.l_hand
|
||||
else if (istype(usr.r_hand, /obj/item/weapon/tank))
|
||||
usr.internal = usr.r_hand
|
||||
if (usr.internal)
|
||||
//for(var/mob/M in viewers(usr, 1))
|
||||
// M.show_message(text("[] is now running on internals.", usr), 1)
|
||||
usr << "You are now running on internals."
|
||||
if (usr.internals)
|
||||
usr.internals.icon_state = "internal1"
|
||||
if(ishuman(usr))
|
||||
if (!( istype(usr.wear_mask, /obj/item/clothing/mask) ))
|
||||
usr << "\red You are not wearing a mask"
|
||||
return
|
||||
else
|
||||
if (istype(usr.back, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.back] on your back."
|
||||
usr.internal = usr.back
|
||||
else if (ishuman(usr) && istype(usr:s_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:s_store] on your [usr:wear_suit]."
|
||||
usr.internal = usr:s_store
|
||||
else if (ishuman(usr) && istype(usr:belt, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:belt] on your belt."
|
||||
usr.internal = usr:belt
|
||||
else if (istype(usr:l_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:l_store] in your left pocket."
|
||||
usr.internal = usr:l_store
|
||||
else if (istype(usr:r_store, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr:r_store] in your right pocket."
|
||||
usr.internal = usr:r_store
|
||||
else if (istype(usr.l_hand, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.l_hand] on your left hand."
|
||||
usr.internal = usr.l_hand
|
||||
else if (istype(usr.r_hand, /obj/item/weapon/tank))
|
||||
usr << "\blue You are now running on internals from the [usr.r_hand] on your right hand."
|
||||
usr.internal = usr.r_hand
|
||||
if (usr.internal)
|
||||
//for(var/mob/M in viewers(usr, 1))
|
||||
// M.show_message(text("[] is now running on internals.", usr), 1)
|
||||
if (usr.internals)
|
||||
usr.internals.icon_state = "internal1"
|
||||
else
|
||||
usr << "\blue You don't have an oxygen tank."
|
||||
if("pull")
|
||||
usr.pulling = null
|
||||
if("sleep")
|
||||
@@ -470,7 +485,7 @@
|
||||
O.show_message(text("\red <B>[] is trying to break the handcuffs!</B>", usr), 1)
|
||||
spawn(0)
|
||||
if(do_after(usr, 50))
|
||||
if(!usr:handcuffed) return
|
||||
if(!usr:handcuffed || usr:buckled) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to break the handcuffs!</B>", usr), 1)
|
||||
usr << "\green You successfully break your handcuffs."
|
||||
@@ -496,6 +511,9 @@
|
||||
"The chain jangles a bit.", // - SkyMarshal
|
||||
"\red Hurry up, dammit!", // - SkyMarshal
|
||||
"This is exhausting!") // - SkyMarshal
|
||||
for(var/mob/O in viewers(usr))
|
||||
if(prob(50)) //Reduces spam slightly
|
||||
O.show_message(text("\red [] continues to struggle in their cuffs!", usr), 1)
|
||||
if(!usr:handcuffed) return
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to remove the handcuffs!</B>", usr), 1)
|
||||
@@ -546,7 +564,7 @@
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message(text("\red <B>[] manages to unbuckle themself!</B>", usr), 1)
|
||||
usr << "\blue You successfully unbuckle yourself."
|
||||
usr:buckled.manual_unbuckle_all(usr)
|
||||
usr:buckled.manual_unbuckle(usr)
|
||||
if("module")
|
||||
if(issilicon(usr))
|
||||
if(usr:module)
|
||||
|
||||
331
code/modules/mob/simple_animal/constructs.dm
Normal file
331
code/modules/mob/simple_animal/constructs.dm
Normal file
@@ -0,0 +1,331 @@
|
||||
|
||||
/////////////////Juggernaut///////////////
|
||||
|
||||
/mob/living/simple_animal/constructarmoured
|
||||
name = "Juggernaut"
|
||||
desc = "A possessed suit of armour driven by the will of the restless dead"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "armour"
|
||||
icon_living = "armour"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 250
|
||||
health = 250
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "harmlessly punches the"
|
||||
harm_intent_damage = 0
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
attacktext = "smashes their armoured gauntlet into"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = 3
|
||||
wall_smash = 1
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
if(O.force >= 11)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b The [O] bounces harmlessly off of [src]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(5))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 10
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructarmoured/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
|
||||
////////////////////////Wraith/////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith
|
||||
name = "Wraith"
|
||||
desc = "A wicked bladed shell contraption piloted by a bound spirit"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "floating"
|
||||
icon_living = "floating"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 75
|
||||
health = 75
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "punches the"
|
||||
melee_damage_lower = 25
|
||||
melee_damage_upper = 25
|
||||
attacktext = "slashes"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = -1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
see_in_dark = 7
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(O.force)
|
||||
health -= O.force
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
|
||||
else
|
||||
usr << "\red This weapon is ineffective, it does no damage."
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if ((M.client && !( M.blinded )))
|
||||
M.show_message("\red [user] gently taps [src] with the [O]. ")
|
||||
|
||||
/mob/living/simple_animal/constructwraith/Bump(atom/movable/AM as mob|obj, yes)
|
||||
|
||||
spawn( 0 )
|
||||
if ((!( yes ) || now_pushing))
|
||||
return
|
||||
now_pushing = 1
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT)
|
||||
if(prob(50))
|
||||
src << "\red <B>You fail to push [tmob]'s fat ass out of the way.</B>"
|
||||
now_pushing = 0
|
||||
return
|
||||
if(tmob.nopush)
|
||||
now_pushing = 0
|
||||
return
|
||||
|
||||
tmob.LAssailant = src
|
||||
now_pushing = 0
|
||||
..()
|
||||
if (!( istype(AM, /atom/movable) ))
|
||||
return
|
||||
if (!( now_pushing ))
|
||||
now_pushing = 1
|
||||
if (!( AM.anchored ))
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
now_pushing = null
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructwraith/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 10
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
|
||||
|
||||
/mob/living/simple_animal/constructwraith/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
|
||||
|
||||
|
||||
/////////////////////////////Artificer/////////////////////////
|
||||
|
||||
/mob/living/simple_animal/constructbuilder
|
||||
name = "Artificer"
|
||||
desc = "A bulbous construct dedicated to building and maintaining The Cult of Nar-Sie's armies"
|
||||
icon = 'mob.dmi'
|
||||
icon_state = "artificer"
|
||||
icon_living = "artificer"
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "thinks better of touching"
|
||||
response_disarm = "flails at"
|
||||
response_harm = "viciously beats"
|
||||
harm_intent_damage = 5
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
attacktext = "rams"
|
||||
minbodytemp = 0
|
||||
maxbodytemp = 4000
|
||||
min_oxy = 0
|
||||
max_co2 = 0
|
||||
max_tox = 0
|
||||
speed = 0
|
||||
wall_smash = 1
|
||||
nopush = 1
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
canstun = 0
|
||||
canweaken = 0
|
||||
|
||||
Life()
|
||||
..()
|
||||
if(stat == 2)
|
||||
new /obj/item/weapon/ectoplasm (src.loc)
|
||||
for(var/mob/M in viewers(src, null))
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] collapses in a shattered heap ")
|
||||
ghostize(0)
|
||||
del src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(istype(M, /mob/living/simple_animal/constructbuilder))
|
||||
health += 5
|
||||
M.emote("mends some of \the <EM>[src]'s</EM> wounds")
|
||||
else
|
||||
if(M.melee_damage_upper <= 0)
|
||||
M.emote("[M.friendly] \the <EM>[src]</EM>")
|
||||
else
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='attack'>\The <EM>[M]</EM> [M.attacktext] \the <EM>[src]</EM>!</span>", 1)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
health -= damage
|
||||
|
||||
/mob/living/simple_animal/constructbuilder/examine()
|
||||
set src in oview()
|
||||
|
||||
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
|
||||
if (src.health < src.maxHealth)
|
||||
msg += "<span class='warning'>"
|
||||
if (src.health >= src.maxHealth/2)
|
||||
msg += "It looks slightly dented.\n"
|
||||
else
|
||||
msg += "<B>It looks severely dented!</B>\n"
|
||||
msg += "</span>"
|
||||
msg += "*---------*</span>"
|
||||
|
||||
usr << msg
|
||||
return
|
||||
@@ -112,9 +112,9 @@
|
||||
comm.ai += O
|
||||
|
||||
O << "<B>You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).</B>"
|
||||
O << "<B>To look at other parts of the station, double-click yourself to get a camera menu.</B>"
|
||||
O << "<B>To look at other parts of the station, double-click yourself to get a camera menu, use the freelook command, or use the Show Camera List command..</B>"
|
||||
O << "<B>While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.</B>"
|
||||
O << "To use something, simply double-click it."
|
||||
O << "To use something, simply click or double-click it."
|
||||
O << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
|
||||
if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai)))
|
||||
O.show_laws()
|
||||
@@ -123,6 +123,7 @@
|
||||
O << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
|
||||
O << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
|
||||
O << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
|
||||
O << "4.) Your laws are not in preference, laws do not take preference over one another unless specifically stated in the law."
|
||||
O << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
|
||||
|
||||
|
||||
@@ -198,8 +199,8 @@
|
||||
|
||||
O.loc = loc
|
||||
O << "<B>You are playing a Robot. A Robot can interact with most electronic objects in its view point.</B>"
|
||||
O << "<B>You must follow the laws that the AI has. You are the AI's assistant to the station basically.</B>"
|
||||
O << "To use something, simply double-click it."
|
||||
O << "<B>You must follow the laws that the AI has. You are basically the AI's extension into station.</B>"
|
||||
O << "To use something, simply click or double-click it."
|
||||
O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
|
||||
|
||||
O.job = "Cyborg"
|
||||
|
||||
Reference in New Issue
Block a user