mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 02:25:06 +01:00
Merge pull request #3767 from Neerti/8/10/2017_make_xenobio_old_again
Make Xenobiology Old(ish) Again
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
/obj
|
||||
|
||||
|
||||
/atom/movable
|
||||
var/can_buckle = 0
|
||||
var/buckle_movable = 0
|
||||
var/buckle_dir = 0
|
||||
@@ -6,7 +8,8 @@
|
||||
var/buckle_require_restraints = 0 //require people to be handcuffed before being able to buckle. eg: pipes
|
||||
var/mob/living/buckled_mob = null
|
||||
|
||||
/obj/attack_hand(mob/living/user)
|
||||
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && buckled_mob)
|
||||
user_unbuckle_mob(user)
|
||||
@@ -19,18 +22,20 @@
|
||||
return attack_hand(user) //Process as if we're a normal person touching the object.
|
||||
return ..() //Otherwise, treat this as an AI click like usual.
|
||||
|
||||
/obj/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && istype(M))
|
||||
user_buckle_mob(M, user)
|
||||
|
||||
/obj/Destroy()
|
||||
/atom/movable/Destroy()
|
||||
unbuckle_mob()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/proc/buckle_mob(mob/living/M)
|
||||
if(!can_buckle || !istype(M) || (M.loc != loc) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, forced = FALSE, check_loc = TRUE)
|
||||
if((!can_buckle && !forced) || !istype(M) || M.buckled || M.pinned.len || (buckle_require_restraints && !M.restrained()))
|
||||
return 0
|
||||
if(check_loc && M.loc != loc)
|
||||
return 0
|
||||
if(buckled_mob) //Handles trying to buckle yourself to the chair when someone is on it
|
||||
M << "<span class='notice'>\The [src] already has someone buckled to it.</span>"
|
||||
@@ -46,7 +51,7 @@
|
||||
post_buckle_mob(M)
|
||||
return 1
|
||||
|
||||
/obj/proc/unbuckle_mob()
|
||||
/atom/movable/proc/unbuckle_mob()
|
||||
if(buckled_mob && buckled_mob.buckled == src)
|
||||
. = buckled_mob
|
||||
buckled_mob.buckled = null
|
||||
@@ -57,19 +62,16 @@
|
||||
|
||||
post_buckle_mob(.)
|
||||
|
||||
/obj/proc/post_buckle_mob(mob/living/M)
|
||||
/atom/movable/proc/post_buckle_mob(mob/living/M)
|
||||
return
|
||||
|
||||
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
|
||||
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, var/forced = FALSE, var/silent = FALSE)
|
||||
if(!ticker)
|
||||
user << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
|
||||
if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai))
|
||||
return
|
||||
if(M == buckled_mob)
|
||||
return
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
user << "<span class='warning'>The [M] is too squishy to buckle in.</span>"
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
unbuckle_mob()
|
||||
@@ -78,20 +80,21 @@
|
||||
if(M.loc != src.loc)
|
||||
step_towards(M, src)
|
||||
|
||||
. = buckle_mob(M)
|
||||
. = buckle_mob(M, forced)
|
||||
if(.)
|
||||
if(M == user)
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
|
||||
"<span class='notice'>You buckle yourself to [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
if(!silent)
|
||||
if(M == user)
|
||||
M.visible_message(\
|
||||
"<span class='notice'>[M.name] buckles themselves to [src].</span>",\
|
||||
"<span class='notice'>You buckle yourself to [src].</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
else
|
||||
M.visible_message(\
|
||||
"<span class='danger'>[M.name] is buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='danger'>You are buckled to [src] by [user.name]!</span>",\
|
||||
"<span class='notice'>You hear metal clanking.</span>")
|
||||
|
||||
/obj/proc/user_unbuckle_mob(mob/user)
|
||||
/atom/movable/proc/user_unbuckle_mob(mob/user)
|
||||
var/mob/living/M = unbuckle_mob()
|
||||
if(M)
|
||||
if(M != user)
|
||||
@@ -107,3 +110,19 @@
|
||||
add_fingerprint(user)
|
||||
return M
|
||||
|
||||
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
|
||||
if(buckled_mob)
|
||||
// if(!buckled_mob.Move(newloc, direct))
|
||||
if(!buckled_mob.forceMove(newloc, direct))
|
||||
loc = buckled_mob.loc
|
||||
last_move = buckled_mob.last_move
|
||||
buckled_mob.inertia_dir = last_move
|
||||
return FALSE
|
||||
else
|
||||
buckled_mob.set_dir(dir)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct = 0)
|
||||
. = ..()
|
||||
if(. && buckled_mob && !handle_buckled_mob_movement(newloc, direct)) //movement failed due to buckled mob(s)
|
||||
. = 0
|
||||
|
||||
@@ -449,10 +449,11 @@
|
||||
/obj/item/device/flashlight/slime
|
||||
gender = PLURAL
|
||||
name = "glowing slime extract"
|
||||
desc = "A glowing ball of what appears to be amber."
|
||||
desc = "A slimy ball that appears to be glowing from bioluminesence."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "floor1" //not a slime extract sprite but... something close enough!
|
||||
item_state = "slime"
|
||||
light_color = "#FFF423"
|
||||
w_class = ITEMSIZE_TINY
|
||||
brightness_on = 6
|
||||
on = 1 //Bio-luminesence has one setting, on.
|
||||
|
||||
@@ -364,32 +364,38 @@ REAGENT SCANNER
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
|
||||
|
||||
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if (!isslime(M))
|
||||
if(!isslime(M))
|
||||
user << "<B>This device can only scan slimes!</B>"
|
||||
return
|
||||
var/mob/living/carbon/slime/T = M
|
||||
var/mob/living/simple_animal/slime/S = M
|
||||
user.show_message("Slime scan results:")
|
||||
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"))
|
||||
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()))
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: slime is starving!</span>")
|
||||
else if (T.nutrition < T.get_hunger_nutrition())
|
||||
user.show_message("<span class='warning'>Warning: slime is hungry</span>")
|
||||
user.show_message("Electric change strength: [T.powerlevel]")
|
||||
user.show_message("Health: [T.health]")
|
||||
if (T.slime_mutation[4] == T.colour)
|
||||
user.show_message("This slime does not evolve any further")
|
||||
else
|
||||
if (T.slime_mutation[3] == T.slime_mutation[4])
|
||||
if (T.slime_mutation[2] == T.slime_mutation[1])
|
||||
user.show_message(text("Possible mutation: []", T.slime_mutation[3]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting")
|
||||
else
|
||||
user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
|
||||
else
|
||||
user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4]))
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
|
||||
if (T.cores > 1)
|
||||
user.show_message("Anomalious slime core amount detected")
|
||||
user.show_message("Growth progress: [T.amount_grown]/10")
|
||||
user.show_message(text("[S.slime_color] [] slime", S.is_adult ? "adult" : "baby"))
|
||||
|
||||
user.show_message("Health: [S.health]")
|
||||
user.show_message("Mutation Probability: [S.mutation_chance]")
|
||||
|
||||
var/list/mutations = list()
|
||||
for(var/potential_color in S.slime_mutation)
|
||||
var/mob/living/simple_animal/slime/slime = potential_color
|
||||
mutations.Add(initial(slime.slime_color))
|
||||
|
||||
user.show_message("Potental to mutate into [english_list(mutations)] colors.")
|
||||
user.show_message("Extract potential: [S.cores]")
|
||||
|
||||
user.show_message(text("Nutrition: [S.nutrition]/[]", S.get_max_nutrition()))
|
||||
if (S.nutrition < S.get_starve_nutrition())
|
||||
user.show_message("<span class='alert'>Warning: Subject is starving!</span>")
|
||||
else if (S.nutrition < S.get_hunger_nutrition())
|
||||
user.show_message("<span class='warning'>Warning: Subject is hungry.</span>")
|
||||
user.show_message("Electric change strength: [S.power_charge]")
|
||||
|
||||
if(S.resentment)
|
||||
user.show_message("<span class='warning'>Warning: Subject is harboring resentment.</span>")
|
||||
if(S.docile)
|
||||
user.show_message("Subject has been pacified.")
|
||||
if(S.rabid)
|
||||
user.show_message("<span class='danger'>Subject is enraged and extremely dangerous!</span>")
|
||||
if(S.unity)
|
||||
user.show_message("Subject is friendly to other slime colors.")
|
||||
|
||||
user.show_message("Growth progress: [S.amount_grown]/10")
|
||||
|
||||
@@ -76,13 +76,14 @@
|
||||
|
||||
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
if(!ismob(G:affecting))
|
||||
var/obj/item/weapon/grab/grab = G
|
||||
if(!ismob(grab.affecting))
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
|
||||
if(M.Victim == G:affecting)
|
||||
usr << "[G:affecting:name] will not fit into the [src.name] because they have a slime latched onto their head."
|
||||
for(var/mob/living/simple_animal/slime/M in range(1,grab.affecting))
|
||||
if(M.victim == grab.affecting)
|
||||
usr << "[grab.affecting.name] will not fit into the [src.name] because they have a slime latched onto their head."
|
||||
return
|
||||
var/mob/M = G:affecting
|
||||
var/mob/M = grab.affecting
|
||||
if(put_mob(M))
|
||||
qdel(G)
|
||||
src.updateUsrDialog()
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
var/maxcharge = 1000
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
|
||||
var/self_recharge = FALSE // If true, the cell will recharge itself.
|
||||
var/charge_amount = 25 // How much power to give, if self_recharge is true. The number is in absolute cell charge, as it gets divided by CELLRATE later.
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
|
||||
|
||||
suicide_act(mob/user)
|
||||
@@ -125,8 +127,10 @@
|
||||
/obj/item/weapon/cell/slime
|
||||
name = "charged slime core"
|
||||
desc = "A yellow slime core infused with phoron, it crackles with power."
|
||||
origin_tech = list(TECH_POWER = 2, TECH_BIO = 4)
|
||||
origin_tech = list(TECH_POWER = 4, TECH_BIO = 5)
|
||||
icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi'
|
||||
icon_state = "yellow slime extract" //"potato_battery"
|
||||
description_info = "This 'cell' holds a max charge of 10k and self recharges over time."
|
||||
maxcharge = 10000
|
||||
matter = null
|
||||
self_recharge = TRUE
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
icon_state = "[initial(name)]"
|
||||
|
||||
if(icon_state == "[initial(name)]_active")
|
||||
set_light(1.5, 1, lightcolor)
|
||||
set_light(2, 1, lightcolor)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
@@ -237,4 +237,16 @@
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
else
|
||||
user << "<span class='notice'>This cell is not fitted for [src].</span>"
|
||||
user << "<span class='notice'>This cell is not fitted for [src].</span>"
|
||||
|
||||
/obj/item/weapon/melee/baton/get_description_interaction()
|
||||
var/list/results = list()
|
||||
|
||||
if(bcell)
|
||||
results += "[desc_panel_image("offhand")]to remove the weapon cell."
|
||||
else
|
||||
results += "[desc_panel_image("weapon cell")]to add a new weapon cell."
|
||||
|
||||
results += ..()
|
||||
|
||||
return results
|
||||
@@ -828,7 +828,6 @@ something, make sure it's not in one of the other lists.*/
|
||||
/obj/random/maintenance/research/item_to_spawn()
|
||||
return pick(prob(320);/obj/random/maintenance/clean,
|
||||
prob(3);/obj/item/device/analyzer/plant_analyzer,
|
||||
prob(2);/obj/item/device/analyzer/xeno_analyzer,
|
||||
prob(1);/obj/item/device/flash/synthetic,
|
||||
prob(2);/obj/item/weapon/bucket_sensor,
|
||||
prob(1);/obj/item/weapon/cell/device/weapon,
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/double/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist(src)
|
||||
new /obj/item/clothing/head/bio_hood/scientist(src)
|
||||
|
||||
|
||||
/obj/structure/closet/l3closet/medical
|
||||
icon_state = "bio_scientist"
|
||||
|
||||
@@ -88,6 +88,15 @@
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/full/double/New()
|
||||
..()
|
||||
new /obj/item/clothing/suit/fire/firefighter(src)
|
||||
new /obj/item/clothing/mask/gas(src)
|
||||
new /obj/item/device/flashlight(src)
|
||||
new /obj/item/weapon/tank/oxygen/red(src)
|
||||
new /obj/item/weapon/extinguisher(src)
|
||||
new /obj/item/clothing/head/hardhat/red(src)
|
||||
|
||||
/obj/structure/closet/firecloset/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
@@ -175,6 +184,12 @@
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
/obj/structure/closet/bombcloset/double/New() // Makes two suits.
|
||||
..()
|
||||
new /obj/item/clothing/suit/bomb_suit( src )
|
||||
new /obj/item/clothing/under/color/black( src )
|
||||
new /obj/item/clothing/shoes/black( src )
|
||||
new /obj/item/clothing/head/bomb_hood( src )
|
||||
|
||||
/obj/structure/closet/bombclosetsecurity
|
||||
name = "\improper EOD closet"
|
||||
|
||||
@@ -59,10 +59,13 @@
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
||||
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
|
||||
visible_message("[src] looks like it's about to shatter!" )
|
||||
update_icon()
|
||||
else if(health < maxhealth / 2 && initialhealth >= maxhealth / 2)
|
||||
visible_message("[src] looks seriously damaged!" )
|
||||
update_icon()
|
||||
else if(health < maxhealth * 3/4 && initialhealth >= maxhealth * 3/4)
|
||||
visible_message("Cracks begin to appear in [src]!" )
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/window/proc/apply_silicate(var/amount)
|
||||
@@ -204,6 +207,8 @@
|
||||
return
|
||||
if(damage >= 10)
|
||||
visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
if(reinf)
|
||||
damage = damage / 2
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
@@ -212,6 +217,24 @@
|
||||
|
||||
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return//I really wish I did not need this
|
||||
|
||||
// Fixing.
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(health < maxhealth)
|
||||
if(WT.remove_fuel(1 ,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
health = maxhealth
|
||||
// playsound(src, 'sound/items/Welder.ogg', 50, 1)
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
|
||||
// Slamming.
|
||||
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(istype(G.affecting,/mob/living))
|
||||
@@ -410,6 +433,15 @@
|
||||
var/image/I = image(icon, "[basestate][connections[i]]", dir = 1<<(i-1))
|
||||
overlays += I
|
||||
|
||||
// Damage overlays.
|
||||
var/ratio = health / maxhealth
|
||||
ratio = Ceiling(ratio * 4) * 25
|
||||
|
||||
if(ratio > 75)
|
||||
return
|
||||
var/image/I = image(icon, "damage[ratio]", layer + 0.1)
|
||||
overlays += I
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
@@ -439,6 +471,10 @@
|
||||
damage_per_fire_tick = 1.0
|
||||
maxhealth = 40.0
|
||||
|
||||
/obj/structure/window/phoronbasic/full
|
||||
dir = SOUTHWEST
|
||||
maxhealth = 80
|
||||
|
||||
/obj/structure/window/phoronreinforced
|
||||
name = "reinforced borosilicate window"
|
||||
desc = "A borosilicate alloy window, with rods supporting it. It seems to be very strong."
|
||||
@@ -451,6 +487,9 @@
|
||||
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
|
||||
maxhealth = 80.0
|
||||
|
||||
/obj/structure/window/phoronreinforced/full
|
||||
dir = SOUTHWEST
|
||||
maxhealth = 160
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
@@ -472,9 +511,9 @@
|
||||
state = 0
|
||||
|
||||
/obj/structure/window/reinforced/full
|
||||
dir = 5
|
||||
dir = SOUTHWEST
|
||||
icon_state = "fwindow"
|
||||
maxhealth = 60
|
||||
maxhealth = 80
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
|
||||
Reference in New Issue
Block a user