Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Tastyfish
2011-12-03 23:33:43 -05:00
180 changed files with 8821 additions and 8256 deletions
+1 -1
View File
@@ -1969,7 +1969,7 @@
<A href='?src=\ref[src];secretsfun=sec_clothes'>Remove 'internal' clothing</A><BR>
<A href='?src=\ref[src];secretsfun=sec_all_clothes'>Remove ALL clothing</A><BR>
<A href='?src=\ref[src];secretsfun=toxic'>Toxic Air (WARNING: dangerous)</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkies</A><BR>
<A href='?src=\ref[src];secretsfun=monkey'>Turn all humans into monkeys</A><BR>
<A href='?src=\ref[src];secretsfun=sec_classic1'>Remove firesuits, grilles, and pods</A><BR>
<A href='?src=\ref[src];secretsfun=power'>Make all areas powered</A><BR>
<A href='?src=\ref[src];secretsfun=unpower'>Make all areas unpowered</A><BR>
+2 -1
View File
@@ -132,6 +132,8 @@
verbs += /client/proc/kill_air
verbs += /client/proc/cmd_debug_make_powernets
verbs += /client/proc/enable_mapping_debug
verbs += /client/proc/everyone_random
verbs += /client/proc/only_one // Fateweaver suggested I do this - Doohl
if (holder.level >= 5)//Game Admin********************************************************************
verbs += /obj/admins/proc/view_txt_log
@@ -155,7 +157,6 @@
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/only_one
verbs += /client/proc/send_space_ninja
verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/Blobize//I need to remember to move/remove this later
+32
View File
@@ -813,3 +813,35 @@ Traitors and the like can also be revived with the previous role mostly intact.
for(var/t in M.attack_log)
usr << t
/client/proc/everyone_random()
set category = "Fun"
set name = "Make Everyone Random"
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
if (ticker && ticker.mode)
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
return
if(ticker.random_players)
ticker.random_players = 0
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1)
usr << "Disabled."
return
var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
if(notifyplayers == "Cancel")
return
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!"
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
ticker.random_players = 1
+44 -12
View File
@@ -15,12 +15,20 @@
var
code = 30
frequency = 100
frequency = 1457
delay = 0
airlock_wire = null
datum/radio_frequency/radio_connection
proc
send_signal()
signal()
New()
..()
spawn(40)
set_frequency(frequency)
return
activate()
@@ -30,12 +38,10 @@
process_cooldown()
signal()
return 1
interact(mob/user as mob, flag1)
var/t1 = "-------"
// if ((src.b_stat && !( flag1 )))
// t1 = text("-------<BR>\nGreen Wire: []<BR>\nRed Wire: []<BR>\nBlue Wire: []<BR>\n", (src.wires & 4 ? text("<A href='?src=\ref[];wires=4'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=4'>Mend Wire</A>", src)), (src.wires & 2 ? text("<A href='?src=\ref[];wires=2'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=2'>Mend Wire</A>", src)), (src.wires & 1 ? text("<A href='?src=\ref[];wires=1'>Cut Wire</A>", src) : text("<A href='?src=\ref[];wires=1'>Mend Wire</A>", src)))
@@ -49,7 +55,7 @@
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
[src.frequency]
[format_frequency(src.frequency)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
@@ -75,10 +81,10 @@
return
if (href_list["freq"])
src.frequency += text2num(href_list["freq"])
src.frequency = round(src.frequency)
src.frequency = min(100, src.frequency)
src.frequency = max(1, src.frequency)
var/new_frequency = (frequency + text2num(href_list["freq"]))
if(new_frequency < 1200 || new_frequency > 1600)
new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency)
if(href_list["code"])
src.code += text2num(href_list["code"])
@@ -95,14 +101,22 @@
return
proc/signal()//will have to do for now
signal()
var/datum/signal/signal = new
signal.source = src
signal.encryption = code
signal.data["message"] = "ACTIVATE"
radio_connection.post_signal(src, signal)
return
/*
for(var/obj/item/device/assembly/signaler/S in world)
if(!S) continue
if(S == src) continue
if((S.frequency == src.frequency) && (S.code == src.code))
spawn(0)
if(S) S.pulse(0)
return 0
return 0*/
pulse(var/radio = 0)
@@ -111,4 +125,22 @@
A.pulse(src.airlock_wire)
else if(holder)
holder.process_activation(src, 1, 0)
return 1
return 1
receive_signal(datum/signal/signal)
if(!signal) return 0
if(signal.encryption != code) return 0
if(!(src.wires & WIRE_RADIO_RECEIVE)) return 0
pulse(1)
for(var/mob/O in hearers(1, src.loc))
O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2)
return
proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
return
+1 -1
View File
@@ -49,7 +49,7 @@
process()
if(timing && (time >= 0))
if(timing && (time > 0))
time--
if(timing && time <= 0)
timing = 0
+27 -25
View File
@@ -351,7 +351,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:adjustToxLoss(3)
M:oxyloss += 3
M:adjustOxyLoss(3)
M:sleeping += 1
..()
return
@@ -812,6 +812,7 @@ datum
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(!..()) return
if(isrobot(M) || isAI(M)) return // Mutagen doesn't do anything to robutts!
src = null
if((method==TOUCH && prob(33)) || method==INGEST)
randmuti(M)
@@ -823,6 +824,7 @@ datum
updateappearance(M,M.dna.uni_identity)
return
on_mob_life(var/mob/living/M as mob)
if(isrobot(M) || isAI(M)) return // Mutagen doesn't do anything to robutts!
if(!M) M = holder.my_atom
M.radiation += 3
..()
@@ -1119,7 +1121,7 @@ datum
if(!M) M = holder.my_atom
if(prob(33))
M.take_organ_damage(1, 0)
M:oxyloss += 3
M:adjustOxyLoss(3)
if(prob(20)) M:emote("gasp")
..()
return
@@ -1165,7 +1167,7 @@ datum
if(M.stat == 2.0)
return //See above, down and around. --Agouri
if(!M) M = holder.my_atom
M:oxyloss = max(M:getOxyLoss()-2, 0)
M:adjustOxyLoss(-2)
if(holder.has_reagent("lexorin"))
holder.remove_reagent("lexorin", 2)
..()
@@ -1199,9 +1201,9 @@ datum
if(M.stat == 2.0)
return
if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(40)) M:oxyloss--
if(M:getOxyLoss() && prob(40)) M:adjustOxyLoss(-1)
if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0)
if(M:fireloss && prob(40)) M:heal_organ_damage(0,1)
if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1)
if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1)
..()
return
@@ -1219,7 +1221,7 @@ datum
M:oxyloss = 0
M:radiation = 0
M:heal_organ_damage(5,5)
if(M:getToxLoss()) M:adjustToxLoss(-5)
M:adjustToxLoss(-5)
if(holder.has_reagent("toxin"))
holder.remove_reagent("toxin", 5)
if(holder.has_reagent("stoxin"))
@@ -1296,7 +1298,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:jitteriness = max(M:jitteriness-5,0)
if(prob(80)) M:brainloss++
if(prob(80)) M:adjustBrainLoss(1)
if(prob(50)) M:drowsyness = max(M:drowsyness, 3)
if(prob(10)) M:emote("drool")
..()
@@ -1327,7 +1329,7 @@ datum
return //See above, down and around. --Agouri
if(!M) M = holder.my_atom
M:radiation = max(M:radiation-7,0)
if(M:getToxLoss()) M:adjustToxLoss(-1)
M:adjustToxLoss(-1)
if(prob(15))
M.take_organ_damage(1, 0)
..()
@@ -1342,7 +1344,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:brainloss = max(M:brainloss-3 , 0)
M:adjustBrainLoss(-3)
..()
return
@@ -1401,10 +1403,10 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(M.bodytemperature < 170)
if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-1)
if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3)
M:adjustCloneLoss(-1)
M:adjustOxyLoss(-3)
M:heal_organ_damage(3,3)
if(M:getToxLoss()) M:adjustToxLoss(-3)
M:adjustToxLoss(-3)
..()
return
@@ -1418,10 +1420,10 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(M.bodytemperature < 170)
if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-3)
if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3)
M:adjustCloneLoss(-3)
M:adjustOxyLoss(-3)
M:heal_organ_damage(3,3)
if(M:getToxLoss()) M:adjustToxLoss(-3)
M:adjustToxLoss(-3)
..()
return
@@ -1458,7 +1460,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:oxyloss += 0.5
M:adjustOxyLoss(0.5)
M:adjustToxLoss(0.5)
M:weakened = max(M:weakened, 10)
M:silent = max(M:silent, 10)
@@ -1695,7 +1697,7 @@ datum
if(prob(40))
M.take_organ_damage(0, 1)
if(prob(80) && istype(M, /mob/living/carbon/metroid))
M.fireloss += rand(5,20)
M.adjustFireLoss(rand(5,20))
M << "\red You feel a terrible chill inside your body!"
..()
return
@@ -1929,7 +1931,7 @@ datum
on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor
if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(30)) M:oxyloss--
if(M:getOxyLoss() && prob(30)) M:adjustOxyLoss(-1)
M:nutrition++
..()
return
@@ -1945,7 +1947,7 @@ datum
on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor
if(!M) M = holder.my_atom
if(M:fireloss && prob(20)) M:heal_organ_damage(0,1)
if(M:getFireLoss() && prob(20)) M:heal_organ_damage(0,1)
M:nutrition++
..()
return
@@ -3041,9 +3043,9 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(50)) M:oxyloss -= 2
if(M:getOxyLoss() && prob(50)) M:adjustOxyLoss(-2)
if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0)
if(M:fireloss && prob(50)) M:heal_organ_damage(0,2)
if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2)
if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2)
if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15)
if(M.confused !=0) M.confused = max(0,M.confused - 5)
@@ -3614,7 +3616,7 @@ datum
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature+5)
M.make_jittery(5)
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0)
if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0)
M:nutrition++
..()
return
@@ -3634,7 +3636,7 @@ datum
if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = min(310, M.bodytemperature+5)
M.make_jittery(5)
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0)
if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0)
M:nutrition++
..()
return
@@ -3687,8 +3689,8 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M:oxyloss += 0.5
M:getToxLoss() += 0.5
M:adjustOxyLoss(0.5)
M:adjustOxyLoss(0.5)
M:weakened = max(M:weakened, 15)
M:silent = max(M:silent, 15)
if(!data) data = 1
+12 -25
View File
@@ -555,7 +555,7 @@
icon_state = null
w_class = 1
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,25)
var/possible_transfer_amounts = list(5,10,15,25,30)
var/volume = 30
verb/set_APTFT() //set amount_per_transfer_from_this
@@ -595,7 +595,7 @@
icon_state = "null"
item_state = "null"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,25)
possible_transfer_amounts = list(5,10,15,25,30,50)
volume = 50
flags = FPRINT | TABLEPASS | OPENCONTAINER
@@ -604,7 +604,7 @@
/obj/machinery/chem_dispenser/,
/obj/machinery/reagentgrinder,
/obj/structure/table,
/obj/structure/secure_closet,
/obj/structure/closet/secure_closet,
/obj/structure/closet,
/obj/machinery/sink,
/obj/item/weapon/storage,
@@ -1339,27 +1339,6 @@
if (gulp_size < 5) gulp_size = 5
else gulp_size = max(round(reagents.total_volume / 5), 5)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/weapon/reagent_containers/food/drinks/D in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += D;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
attack_self(mob/user as mob)
return
@@ -1699,7 +1678,7 @@
item_state = "beaker"
volume = 100
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,30,50)
possible_transfer_amounts = list(5,10,15,25,30,50,100)
flags = FPRINT | TABLEPASS | OPENCONTAINER
@@ -2625,6 +2604,14 @@
..()
reagents.add_reagent("dexalin", 30)
/obj/item/weapon/reagent_containers/pill/bicardine
name = "Bicardine pill"
desc = "Used to treat physical injuries."
icon_state = "pill18"
New()
..()
reagents.add_reagent("bicardine", 30)
//Dispensers
/obj/structure/reagent_dispensers/watertank
name = "watertank"
+2 -2
View File
@@ -14,8 +14,8 @@
vision_flags = SEE_TURFS
/obj/item/clothing/glasses/science
name = "Protective Goggles"
desc = "Protects your eyes against harmful chemicals."
name = "Science Goggles"
desc = "nothing"
icon_state = "purple"
item_state = "glasses"
+1 -1
View File
@@ -162,7 +162,7 @@
var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone))
H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee"))
else
target:bruteloss += damage
target:adjustBruteLoss(damage)
if(attack_sound)
playsound(loc, attack_sound, 50, 1, -1)
+156 -72
View File
@@ -50,8 +50,8 @@
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/candy_corn
name = "candy corm" //Not a typo
desc = "It's a handful of candy corm. Can be stored in a detective's hat."
name = "candy corn"
desc = "It's a handful of candy corn. Can be stored in a detective's hat."
icon_state = "candy_corn"
New()
..()
@@ -105,6 +105,57 @@
src.name = "frosted donut"
reagents.add_reagent("sprinkles", 2)
/obj/item/weapon/reagent_containers/food/snacks/chaosdonut
name = "Chaos Donut"
desc = "Like life, it never quite tastes the same."
icon_state = "donut1"
New()
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("sprinkles", 1)
bitesize = 10
var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10)
switch(chaosselect)
if(1)
reagents.add_reagent("nutriment", 3)
if(2)
reagents.add_reagent("capsaicin", 3)
if(3)
reagents.add_reagent("frostoil", 3)
if(4)
reagents.add_reagent("sprinkles", 3)
if(5)
reagents.add_reagent("plasma", 3)
if(6)
reagents.add_reagent("coco", 3)
if(7)
reagents.add_reagent("metroid", 3)
if(8)
reagents.add_reagent("banana", 3)
if(9)
reagents.add_reagent("berryjuice", 3)
if(10)
reagents.add_reagent("tricordrazine", 3)
if(prob(30))
src.icon_state = "donut2"
src.name = "Frosted Chaos Donut"
reagents.add_reagent("sprinkles", 2)
/obj/item/weapon/reagent_containers/food/snacks/jellydonut
name = "Jelly Donut"
desc = "You jelly?"
icon_state = "jdonut1"
New()
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sprinkles", 1)
reagents.add_reagent("berryjuice", 5)
bitesize = 5
if(prob(30))
src.icon_state = "jdonut2"
src.name = "Frosted Jelly Donut"
reagents.add_reagent("sprinkles", 2)
/obj/item/weapon/reagent_containers/food/snacks/egg
name = "egg"
desc = "An egg!"
@@ -119,6 +170,25 @@
src.visible_message("\red [src.name] has been squashed.","\red You hear a smack.")
del(src)
/obj/item/weapon/reagent_containers/food/snacks/friedegg
name = "Fried egg"
desc = "A fried egg, with a touch of salt and pepper."
icon_state = "friedegg"
New()
..()
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("sodiumchloride", 1)
reagents.add_reagent("blackpepper", 1)
bitesize = 1
/obj/item/weapon/reagent_containers/food/snacks/boiledegg
name = "Boiled egg"
desc = "A hard boiled egg."
icon_state = "egg"
New()
..()
reagents.add_reagent("nutriment", 2)
/obj/item/weapon/reagent_containers/food/snacks/flour
name = "flour"
desc = "Some flour"
@@ -428,6 +498,12 @@
reagents.add_reagent("banana",5)
bitesize = 3
throw_impact(atom/hit_atom)
..()
new/obj/effect/decal/cleanable/pie_smudge(src.loc)
src.visible_message("\red [src.name] splats.","\red You hear a splat.")
del(src)
/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis
name = "Berry Clafoutis"
desc = "No black birds, this is a good sign."
@@ -459,21 +535,6 @@
reagents.add_reagent("nutriment", 6)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/jellydonut
name = "Jelly Donut"
desc = "Oh so gooey on the inside."
icon_state = "jdonut1"
New()
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sprinkles", 1)
reagents.add_reagent("berryjuice", 5)
bitesize = 5
if(prob(30))
src.icon_state = "jdonut2"
src.name = "Frosted Jelly Donut"
reagents.add_reagent("sprinkles", 2)
/obj/item/weapon/reagent_containers/food/snacks/soylentgreen
name = "Soylent Green"
desc = "Not made of people. Honest." //Totally people.
@@ -494,22 +555,11 @@
reagents.add_reagent("nutriment", 10)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/humeatpie
name = "Meat-pie"
// var/hname = "" //TODO: need some way to find out that facts for the characters.
// var/job = null
icon_state = "meatpie"
desc = "The best meatpies on station."
trash = "plate"
New()
..()
reagents.add_reagent("nutriment", 10)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/momeatpie
/obj/item/weapon/reagent_containers/food/snacks/meatpie
name = "Meat-pie"
icon_state = "meatpie"
desc = "A delicious meatpie."
desc = "An old barber recipe, very delicious!"
trash = "plate"
New()
..()
@@ -572,24 +622,11 @@
reagents.add_reagent("nutriment", 6)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/chaosdonut
name = "Chaos Donut"
desc = "Like life, it never quite tastes the same."
icon_state = "donut1"
New()
..()
reagents.add_reagent("nutriment", 3)
bitesize = 2
if(prob(30))
src.icon_state = "donut2"
src.name = "Frosted Chaos Donut"
reagents.add_reagent("sprinkles", 3)
reagents.add_reagent(pick("capsaicin", "frostoil", "nutriment"), 3)
/obj/item/weapon/reagent_containers/food/snacks/human/kabob
name = "-kabob"
icon_state = "kabob"
desc = "A delicious kabob"
desc = "A human meat, on a stick."
New()
..()
reagents.add_reagent("nutriment", 8)
@@ -604,7 +641,7 @@
/obj/item/weapon/reagent_containers/food/snacks/monkeykabob
name = "Meat-kabob"
icon_state = "kabob"
desc = "A delicious kabob"
desc = "Delicious meat, on a stick."
New()
..()
reagents.add_reagent("nutriment", 8)
@@ -619,7 +656,7 @@
/obj/item/weapon/reagent_containers/food/snacks/tofukabob
name = "Tofu-kabob"
icon_state = "kabob"
desc = "A delicious kabob"
desc = "Vegan meat, on a stick."
New()
..()
reagents.add_reagent("nutriment", 8)
@@ -644,7 +681,7 @@
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/popcorn
name = "Popcorm" //not a typo
name = "Popcorn"
desc = "Now let's find some cinema."
icon_state = "popcorn"
trash = "popcorn"
@@ -802,7 +839,7 @@
/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff
name = "Spacy Liberty Duff"
desc = "Jello gelatin, if Alfred Hubbard were a confectionist" //TODO
desc = "Jello gelatin, from Alfred Hubbard's cookbook"
icon_state = "spacylibertyduff"
trash = "snack_bowl"
New()
@@ -836,7 +873,7 @@
/obj/item/weapon/reagent_containers/food/snacks/meatballsoup
name = "Meatball soup"
desc = "" //TODO
desc = "You've got balls kid, BALLS!"
icon_state = "meatballsoup"
trash = "snack_bowl"
New()
@@ -857,7 +894,7 @@
/obj/item/weapon/reagent_containers/food/snacks/bloodsoup
name = "Meatball soup"
desc = "So very, very red."
desc = "Smells like copper"
icon_state = "meatballsoup"
New()
..()
@@ -879,7 +916,7 @@
/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup
name = "Vegetable soup"
desc = "" //TODO
desc = "A true vegan meal" //TODO
icon_state = "vegetablesoup"
trash = "snack_bowl"
New()
@@ -890,7 +927,7 @@
/obj/item/weapon/reagent_containers/food/snacks/nettlesoup
name = "Nettle soup"
desc = "" //TODO
desc = "To think, the botanist would've beat you to death with one of these."
icon_state = "nettlesoup"
trash = "snack_bowl"
New()
@@ -902,27 +939,65 @@
/obj/item/weapon/reagent_containers/food/snacks/mysterysoup
name = "Mystery soup"
desc = "A....strange, strange soup."
desc = "The mystery is, why aren't you eating it?"
icon_state = "mysterysoup"
trash = "snack_bowl"
New()
..()
reagents.add_reagent("nutriment", 12)
reagents.add_reagent("water", 7)
bitesize = 4
var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10)
switch(mysteryselect)
if(1)
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("capsaicin", 3)
reagents.add_reagent("tomatojuice", 2)
if(2)
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("frostoil", 3)
reagents.add_reagent("tomatojuice", 2)
if(3)
reagents.add_reagent("nutriment", 5)
reagents.add_reagent("water", 5)
reagents.add_reagent("tricordrazine", 5)
if(4)
reagents.add_reagent("nutriment", 5)
reagents.add_reagent("water", 10)
if(5)
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("banana", 10)
if(6)
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("blood", 10)
if(7)
reagents.add_reagent("metroid", 10)
reagents.add_reagent("water", 10)
if(8)
reagents.add_reagent("carbon", 10)
reagents.add_reagent("toxin", 10)
if(9)
reagents.add_reagent("nutriment", 5)
reagents.add_reagent("tomatojuice", 10)
if(10)
reagents.add_reagent("nutriment", 6)
reagents.add_reagent("tomatojuice", 5)
reagents.add_reagent("imidazoline", 5)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/wishsoup
name = "Wish Soup"
desc = "I wish this was soup."
icon = 'janitor.dmi'
icon_state = "bucket"
icon_state = "wishsoup"
trash = "snack_bowl"
New()
..()
reagents.add_reagent("water", 20)
reagents.add_reagent("water", 10)
bitesize = 5
if(prob(5))
src.desc = "A wish come true!"
reagents.add_reagent("nutriment", 10)
/obj/item/weapon/reagent_containers/food/snacks/hotchili
name = "Hot Chili"
desc = "" //TODO
desc = "A five alarm Texan Chili!"
icon_state = "hotchili"
trash = "snack_bowl"
New()
@@ -935,7 +1010,7 @@
/obj/item/weapon/reagent_containers/food/snacks/coldchili
name = "Cold Chili"
desc = "" //TODO
desc = "This slush is barely a liquid!"
icon_state = "coldchili"
trash = "snack_bowl"
New()
@@ -1031,10 +1106,10 @@
reagents.add_reagent("capsaicin", 6)
bitesize = 4
/obj/item/weapon/reagent_containers/food/snacks/monkiesdelight
name = "Monkie's Delight"
/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight
name = "monkey's Delight"
desc = "Eeee Eee!"
icon_state = "monkiesdelight"
icon_state = "monkeysdelight"
trash = "tray"
New()
..()
@@ -1072,8 +1147,8 @@
trash = "plate"
New()
..()
reagents.add_reagent("nutriment", 8)
bitesize = 3
reagents.add_reagent("nutriment", 11)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich
name = "Toasted Sandwich"
@@ -1082,8 +1157,18 @@
trash = "plate"
New()
..()
reagents.add_reagent("nutriment", 9)
bitesize = 3
reagents.add_reagent("nutriment", 12)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/grilledcheese
name = "Grilled Cheese Sandwich"
desc = "Goes great with Tomato soup!"
icon_state = "toastedsandwich"
trash = "plate"
New()
..()
reagents.add_reagent("nutriment", 7)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/tomatosoup
name = "Tomato Soup"
@@ -1092,10 +1177,9 @@
trash = "snack_bowl"
New()
..()
reagents.add_reagent("nutriment", 4)
reagents.add_reagent("nutriment", 5)
reagents.add_reagent("tomatojuice", 10)
reagents.add_reagent("water", 10)
bitesize = 5
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles
name = "Roffle Waffles"
@@ -1195,7 +1279,7 @@
/obj/item/weapon/reagent_containers/food/snacks/spesslaw
name = "Spesslaw"
desc = "A lawyers favourate"
desc = "A lawyers favourite"
icon_state = "spesslaw"
New()
..()
+32 -27
View File
@@ -15,6 +15,20 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/telebacon
/datum/recipe/friedegg
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg
)
result = /obj/item/weapon/reagent_containers/food/snacks/friedegg
/datum/recipe/boiledegg
reagents = list("water" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/egg
)
result = /obj/item/weapon/reagent_containers/food/snacks/boiledegg
/*
/datum/recipe/bananaphone
reagents = list("psilocybin" = 5) //Trippin' balls, man.
@@ -332,29 +346,13 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake
/datum/recipe/humeatpie
/datum/recipe/meatpie
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/meat/human,
/obj/item/weapon/reagent_containers/food/snacks/meat,
)
result = /obj/item/weapon/reagent_containers/food/snacks/humeatpie
/datum/recipe/momeatpie
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey,
)
result = /obj/item/weapon/reagent_containers/food/snacks/momeatpie
/datum/recipe/syntipie
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/syntiflesh,
)
result = /obj/item/weapon/reagent_containers/food/snacks/momeatpie
result = /obj/item/weapon/reagent_containers/food/snacks/meatpie
/datum/recipe/tofupie
items = list(
@@ -404,7 +402,7 @@
result = /obj/item/weapon/reagent_containers/food/snacks/wingfangchu
/datum/recipe/chaosdonut
reagents = list("frostoil" = 5, "capsaicin" = 5, )
reagents = list("frostoil" = 2, "capsaicin" = 2, )
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/egg
@@ -705,14 +703,14 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread
/datum/recipe/monkiesdelight
/datum/recipe/monkeysdelight
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/monkeycube,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/flour,
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkiesdelight
result = /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight
/datum/recipe/baguette
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)
@@ -766,6 +764,14 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich
/datum/recipe/grilledcheese
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
result = /obj/item/weapon/reagent_containers/food/snacks/grilledcheese
/datum/recipe/tomatosoup
reagents = list("water" = 10)
items = list(
@@ -1066,12 +1072,11 @@
result = /obj/item/weapon/reagent_containers/food/snacks/fishfingers
/datum/recipe/mysterysoup
reagents = list("water" = 10, "blood" = 10)
reagents = list("water" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/faggot,
/obj/item/weapon/reagent_containers/food/snacks/meat,
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom,
/obj/item/weapon/reagent_containers/food/snacks/badrecipe,
/obj/item/weapon/reagent_containers/food/snacks/tofu,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
result = /obj/item/weapon/reagent_containers/food/snacks/mysterysoup
+5 -5
View File
@@ -9,7 +9,7 @@
/**********************Miner Lockers**************************/
/obj/structure/secure_closet/miner
/obj/structure/closet/secure_closet/miner
name = "Miner's Equipment"
icon_state = "miningsec1"
icon_closed = "miningsec"
@@ -18,7 +18,7 @@
icon_off = "miningsecoff"
req_access = list(access_mining)
/obj/structure/secure_closet/miner/New()
/obj/structure/closet/secure_closet/miner/New()
..()
sleep(2)
new /obj/item/device/analyzer(src)
@@ -220,14 +220,14 @@ proc/move_mining_shuttle()
/**********************Mining car (Crate like thing, not the rail car)**************************/
/obj/structure/crate/miningcar
/obj/structure/closet/crate/miningcar
desc = "A mining car. This one doesn't work on rails, but has to be dragged."
name = "Mining car (not for rails)"
icon = 'storage.dmi'
icon_state = "miningcar"
density = 1
openicon = "miningcaropen"
closedicon = "miningcar"
icon_opened = "miningcaropen"
icon_closed = "miningcar"
+2 -2
View File
@@ -43,14 +43,14 @@
bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0)
fireloss = max(getFireLoss(), 0)
if(stat)
stat = 0
return
proc/UpdateDamage()
health = 60 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + cloneloss)
return
@@ -20,7 +20,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 150 - src.getOxyLoss() - src.fireloss - src.getBruteLoss()
src.health = 150 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else
src.health = 150
src.stat = 0
@@ -75,12 +75,12 @@
toxloss = max_plasma
else
bruteloss -= 5
fireloss -= 5
adjustBruteLoss(-5)
adjustFireLoss(-5)
handle_regular_status_updates()
health = 150 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss)
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -20,7 +20,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 125 - src.getOxyLoss() - src.fireloss - src.getBruteLoss()
src.health = 125 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else
src.health = 125
src.stat = 0
@@ -75,13 +75,13 @@
toxloss = max_plasma
else
bruteloss -= 10
fireloss -= 10
adjustBruteLoss(-10)
adjustFireLoss(-10)
handle_regular_status_updates()
health = 150 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss)
health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -122,7 +122,7 @@
ear_deaf += 60
bruteloss += b_loss
fireloss += f_loss
adjustFireLoss(f_loss)
updatehealth()
@@ -140,7 +140,7 @@
show_message("\red The blob attacks!")
fireloss += damage
adjustFireLoss(damage)
return
@@ -225,7 +225,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30
adjustFireLoss(30)
updatehealth()
return
@@ -553,7 +553,7 @@
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
@@ -756,7 +756,7 @@ In all, this is a lot like the monkey code. /N
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 100 - getOxyLoss() - fireloss - getBruteLoss()
health = 100 - getOxyLoss() - getFireLoss() - getBruteLoss()
else
health = 100
stat = 0
@@ -84,10 +84,10 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0)
adjustBruteLoss(0)
adjustToxLoss(0)
adjustOxyLoss(0)
adjustFireLoss(0)
handle_disabilities()
@@ -121,13 +121,13 @@
handle_mutations_and_radiation()
if(src.fireloss)
if(src.getFireLoss())
if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss)
switch(src.getFireLoss())
if(1 to 50)
src.fireloss--
src.adjustFireLoss(-1)
if(51 to 100)
src.fireloss -= 5
src.adjustFireLoss(-5)
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
@@ -300,8 +300,8 @@
toxloss = max_plasma
else
bruteloss -= 15
fireloss -= 15
adjustBruteLoss(-15)
adjustFireLoss(-15)
@@ -396,7 +396,7 @@
handle_regular_status_updates()
health = 100 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss)
health = 100 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -23,7 +23,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 250 - src.getOxyLoss() - src.fireloss - src.getBruteLoss()
src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else
src.health = 250
src.stat = 0
@@ -78,11 +78,11 @@
toxloss = max_plasma
else
bruteloss -= 5
fireloss -= 5
adjustFireLoss(-5)
handle_regular_status_updates()
health = 250 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss)
health = 250 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -110,7 +110,7 @@
ear_deaf += 60
bruteloss += b_loss
fireloss += f_loss
adjustFireLoss(f_loss)
updatehealth()
@@ -132,7 +132,7 @@
show_message("\red The blob attacks you!")
fireloss += damage
adjustFireLoss(damage)
updatehealth()
return
@@ -151,7 +151,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30
adjustFireLoss(30)
updatehealth()
return
@@ -504,7 +504,7 @@
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 25 - getOxyLoss() - fireloss - getBruteLoss()
health = 25 - getOxyLoss() - getFireLoss() - getBruteLoss()
else
health = 25
stat = 0
@@ -85,7 +85,7 @@
bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0)
adjustFireLoss(0)
handle_mutations_and_radiation()
@@ -279,7 +279,7 @@
adjustToxLoss(5)
else
bruteloss -= 5
fireloss -= 5
adjustFireLoss(-5)
return
@@ -323,7 +323,7 @@
handle_regular_status_updates()
health = 25 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss)
health = 25 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -20,7 +20,7 @@
handle_regular_status_updates()
health = 200 - (getOxyLoss() + fireloss + getBruteLoss())
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
weakened = 0
stunned = 0
@@ -43,7 +43,7 @@
return 1
updatehealth()
src.health = 200 - src.getOxyLoss() - src.fireloss - src.getBruteLoss()
src.health = 200 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
xcom_attack(mob/living/carbon/human/target as mob)
if(!ishuman(target))
+7 -7
View File
@@ -45,10 +45,10 @@
stunned = max(stunned,0)
paralysis = max(paralysis, 0)
weakened = max(weakened, 0)
bruteloss = max(getBruteLoss(), 0)
fireloss = max(fireloss, 0)
oxyloss = max(getOxyLoss(), 0)
toxloss = max(getToxLoss(), 0)
adjustBruteLoss(0)
adjustFireLoss(0)
adjustOxyLoss(0)
adjustToxLoss(0)
handle_mutations_and_radiation()
@@ -117,8 +117,8 @@
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//fireloss += 2.5*discomfort
fireloss += 5.0*discomfort
//adjustFireLoss(2.5*discomfort)
adjustFireLoss(5.0*discomfort)
handle_chemicals_in_body()
@@ -144,7 +144,7 @@
handle_regular_status_updates()
health = 100 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 25) paralysis = max(paralysis, 3)
+2 -2
View File
@@ -126,7 +126,7 @@
return 0
src.take_overall_damage(0,shock_damage)
//src.burn_skin(shock_damage)
//src.fireloss += shock_damage //burn_skin will do this for us
//src.adjustFireLoss(shock_damage) //burn_skin will do this for us
//src.updatehealth()
src.visible_message(
"\red [src] was shocked by the [source]!", \
@@ -194,4 +194,4 @@
src.admin_observing = 0
if(src.sleeping_willingly)
src.sleeping = 0
src.sleeping_willingly = 0
src.sleeping_willingly = 0
@@ -127,8 +127,8 @@
else
usr << "\red <B>[src.name] looks very... unfinished?</B>"
if (src.fireloss)
if (src.fireloss < 30)
if (src.getFireLoss())
if (src.getFireLoss() < 30)
usr << "\red [src.name] looks slightly burned!"
else
usr << "\red <B>[src.name] looks severely burned!</B>"
@@ -1165,7 +1165,7 @@
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
@@ -2190,12 +2190,12 @@ It can still be worn/put on as normal.
src.health = 100
src.stat = 0
return
bruteloss = 0
fireloss = 0
adjustBruteLoss(-getBruteLoss())
adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs)
src.bruteloss += O.brute_dam
src.fireloss += O.burn_dam
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() - src.cloneloss
src.adjustBruteLoss(O.brute_dam)
src.adjustFireLoss(O.burn_dam)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
/mob/living/carbon/human/abiotic(var/full_body = 0)
@@ -11,12 +11,12 @@
/mob/living/carbon/human/proc/UpdateDamage()
bruteloss = 0
fireloss = 0
adjustBruteLoss(-getBruteLoss())
adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs)
if(istype(O, /datum/organ/external))
bruteloss += O.brute_dam
fireloss += O.burn_dam
adjustFireLoss(O.burn_dam)
return
// new damage icon system
+11 -11
View File
@@ -102,10 +102,10 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0)
adjustBruteLoss(0)
adjustToxLoss(0)
adjustOxyLoss(0)
adjustFireLoss(0)
update_mind()
@@ -158,7 +158,7 @@
if (prob(7))
switch(pick(1,2,3))
if(1)
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH MONKIES", "stop grifing me!!!!", "SOTP IT#"))
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
if(2)
say(pick("fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom"))
if(3)
@@ -166,7 +166,7 @@
handle_mutations_and_radiation()
if(fireloss)
if(getFireLoss())
if(mutations & COLD_RESISTANCE || (prob(1) && prob(75)))
heal_organ_damage(0,1)
@@ -414,7 +414,7 @@
var/thermal_protection = get_thermal_protection()
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [fireloss] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)]"
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)]"
if(stat != 2 && abs(bodytemperature - 310.15) < 50)
bodytemperature += adjust_body_temperature(bodytemperature, 310.15, thermal_protection)
@@ -601,7 +601,7 @@
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(fireloss)
if(getFireLoss())
heal_overall_damage(0,1)
if(getBruteLoss())
heal_overall_damage(1,0)
@@ -656,7 +656,7 @@
handle_regular_status_updates()
// health = 100 - (getOxyLoss() + getToxLoss() + fireloss + bruteloss + cloneloss)
// health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -1074,7 +1074,7 @@ snippets
if(bodytemperature < 282.591 && (!firemut))
if(bodytemperature < 250)
fireloss += 4
adjustFireLoss(4)
updatehealth()
if(paralysis <= 2) paralysis += 2
else if(prob(1) && !paralysis)
@@ -1085,7 +1085,7 @@ snippets
if(bodytemperature > 345.444)
if(!eye_blurry) src << "\red The heat blurs your vision!"
eye_blurry = max(4, eye_blurry)
if(prob(3)) fireloss += rand(1,2)
if(prob(3)) adjustFireLoss(rand(1,2))
else if(prob(3) && !paralysis)
paralysis += 2
emote("collapse")
@@ -314,7 +314,7 @@
handle_environment(datum/gas_mixture/environment)
if(!environment)
fireloss += rand(10,20)
adjustFireLoss(rand(10,20))
return
//var/environment_heat_capacity = environment.heat_capacity()
@@ -356,7 +356,7 @@
Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature
fireloss += round(sqrt(bodytemperature)) * 2
adjustFireLoss(round(sqrt(bodytemperature)) * 2)
else
Tempstun = 0
@@ -396,9 +396,9 @@
handle_regular_status_updates()
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
@@ -418,7 +418,7 @@
if(prob(30))
if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0)
if(getToxLoss()>0) adjustToxLoss(-1)
if(fireloss>0) fireloss = max(fireloss-1,0)
if(getFireLoss()>0) adjustFireLoss(-1)
if(cloneloss>0) cloneloss = max(cloneloss-1,0)
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)
@@ -175,7 +175,7 @@
b_loss += 30
bruteloss += b_loss
fireloss += f_loss
adjustFireLoss(f_loss)
updatehealth()
@@ -196,7 +196,7 @@
show_message("\red The blob attacks you!")
fireloss += damage
adjustFireLoss(damage)
updatehealth()
return
@@ -215,7 +215,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30
adjustFireLoss(30)
updatehealth()
return
@@ -648,9 +648,9 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
if (nodamage == 0)
// metroids can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
health = 150 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200
@@ -85,22 +85,22 @@
if(getBruteLoss() > 0)
bruteloss = max(0, getBruteLoss()-10)
if(fireloss > 0)
fireloss = max(0, fireloss-10)
if(getFireLoss() > 0)
adjustFireLoss(-10)
if(cloneloss > 0)
cloneloss = max(0, cloneloss-10)
if(getCloneLoss() > 0)
adjustCloneLoss(-10)
if(Victim)
for(var/mob/living/carbon/metroid/Metroid in view(1,M))
if(Metroid.Victim == M && Metroid != src)
Metroid.Feedstop()
if(getToxLoss()<0) toxloss = 0
if(getOxyLoss()<0) oxyloss = 0
if(getBruteLoss()<0) bruteloss = 0
if(fireloss<0) fireloss = 0
if(cloneloss<0) cloneloss = 0
if(getToxLoss()<0) adjustToxLoss(0)
if(getOxyLoss()<0) adjustOxyLoss(0)
if(getBruteLoss()<0) adjustBruteLoss(0)
if(getFireLoss()<0) adjustFireLoss(0)
if(getCloneLoss()<0) adjustCloneLoss(0)
nutrition += rand(10,25)
if(nutrition >= lastnut + 50)
@@ -21,8 +21,8 @@
usr << text("\red [] looks slightly bruised!", src.name)
else
usr << text("\red <B>[] looks severely bruised!</B>", src.name)
if (src.fireloss)
if (src.fireloss < 30)
if (src.getFireLoss())
if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly burnt!", src.name)
else
usr << text("\red <B>[] looks severely burnt!</B>", src.name)
@@ -124,13 +124,13 @@
handle_mutations_and_radiation()
if(src.fireloss)
if(src.getFireLoss())
if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss)
switch(src.getFireLoss())
if(1 to 50)
src.fireloss--
src.adjustFireLoss(-1)
if(51 to 100)
src.fireloss -= 5
src.adjustFireLoss(-5)
if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK
@@ -370,8 +370,8 @@
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(src.nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//fireloss += 2.5*discomfort
fireloss += 5.0*discomfort
//adjustFireLoss(2.5*discomfort)
adjustFireLoss(5.0*discomfort)
handle_chemicals_in_body()
@@ -397,7 +397,7 @@
handle_regular_status_updates()
health = 100 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss)
health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 25) paralysis = max(paralysis, 3)
+12 -12
View File
@@ -102,8 +102,8 @@
var/shielded = 0
bruteloss += 30
if ((O.icon_state == "flaming" && !( shielded )))
fireloss += 40
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
adjustFireLoss(40)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
@@ -139,7 +139,7 @@
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
var/damage = rand(1, 5)
bruteloss += damage
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0)
@@ -371,7 +371,7 @@
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
@@ -535,17 +535,17 @@
switch(severity)
if(1.0)
if (stat != 2)
bruteloss += 200
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
adjustBruteLoss(200)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if(2.0)
if (stat != 2)
bruteloss += 60
fireloss += 60
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
adjustFireLoss(60)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if(3.0)
if (stat != 2)
bruteloss += 30
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
adjustBruteLoss(30)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50))
paralysis += 10
else
@@ -553,8 +553,8 @@
/mob/living/carbon/monkey/blob_act()
if (stat != 2)
fireloss += 60
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss()
adjustFireLoss(60)
health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50))
paralysis += 10
+1 -1
View File
@@ -15,7 +15,7 @@
bruteloss += (damage/(blocked+1))
if(BURN)
if(mutations & COLD_RESISTANCE) damage = 0
fireloss += (damage/(blocked+1))
adjustFireLoss(damage/(blocked+1))
if(TOX)
adjustToxLoss(damage/(blocked+1))
if(OXY)
+7 -7
View File
@@ -2,13 +2,13 @@
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.oxyloss += src.health + 200
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss()
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
/mob/living/proc/updatehealth()
if(!src.nodamage)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() - src.cloneloss
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss
else
src.health = 100
src.stat = 0
@@ -36,7 +36,7 @@
if (src.mutations & COLD_RESISTANCE) //fireproof
return 0
var/mob/living/carbon/monkey/M = src
M.fireloss += burn_amount
M.adjustFireLoss(burn_amount)
M.updatehealth()
return 1
else if(istype(src, /mob/living/silicon/ai))
@@ -112,25 +112,25 @@
// heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn)
adjustFireLoss(-burn)
src.updatehealth()
// damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn)
bruteloss += brute
fireloss += burn
adjustFireLoss(burn)
src.updatehealth()
// heal MANY external organs, in random order
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn)
adjustFireLoss(-burn)
src.updatehealth()
// damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn)
bruteloss += brute
fireloss += burn
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/revive()
+7 -10
View File
@@ -226,22 +226,19 @@
/mob/living/silicon/ai/ex_act(severity)
flick("flash", flash)
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity)
if(1.0)
if (stat != 2)
b_loss += 100
f_loss += 100
adjustBruteLoss(100)
adjustFireLoss(100)
if(2.0)
if (stat != 2)
b_loss += 60
f_loss += 60
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (stat != 2)
b_loss += 30
bruteloss = b_loss
fireloss = f_loss
adjustBruteLoss(30)
updatehealth()
@@ -287,7 +284,7 @@
if (health > 0)
bruteloss += 30
if ((O.icon_state == "flaming"))
fireloss += 40
adjustFireLoss(40)
updatehealth()
return
@@ -11,8 +11,8 @@
usr << text("\red [] looks slightly dented", src.name)
else
usr << text("\red <B>[] looks severely dented!</B>", src.name)
if (src.fireloss)
if (src.fireloss < 30)
if (src.getFireLoss())
if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly burnt!", src.name)
else
usr << text("\red <B>[] looks severely burnt!</B>", src.name)
+2 -2
View File
@@ -20,7 +20,7 @@
/*if (istype(T, /turf))
var/ficheck = src.firecheck(T)
if (ficheck)
src.fireloss += ficheck * 10
src.adjustFireLoss(ficheck * 10)
src.updatehealth()
if (src.fire)
src.fire.icon_state = "fire1"
@@ -241,7 +241,7 @@
if(src.fire_res_on_core)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getBruteLoss()
else
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss()
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
else
src.health = 100
src.stat = 0
@@ -9,7 +9,7 @@
/mob/living/silicon/decoy/updatehealth()
if (src.nodamage == 0)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss()
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
else
src.health = 100
src.stat = 0
@@ -11,8 +11,8 @@
usr << text("\red [] looks slightly dented", src.name)
else
usr << text("\red <B>[]'s casing appears cracked and broken!</B>", src.name)
if (src.fireloss)
if (src.fireloss < 30)
if (src.getFireLoss())
if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly charred!", src.name)
else
usr << text("\red <B>[]'s casing is melted and heat-warped!</B>", src.name)
+1 -1
View File
@@ -23,4 +23,4 @@
src.health = 100
src.stat = 0
else
src.health = 100 - src.getBruteLoss() - src.fireloss
src.health = 100 - src.getBruteLoss() - src.getFireLoss()
+8 -11
View File
@@ -83,22 +83,19 @@
/mob/living/silicon/pai/ex_act(severity)
flick("flash", src.flash)
var/b_loss = src.getBruteLoss()
var/f_loss = src.fireloss
switch(severity)
if(1.0)
if (src.stat != 2)
b_loss += 100
f_loss += 100
adjustBruteLoss(100)
adjustFireLoss(100)
if(2.0)
if (src.stat != 2)
b_loss += 60
f_loss += 60
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (src.stat != 2)
b_loss += 30
src.bruteloss = b_loss
src.fireloss = f_loss
adjustBruteLoss(30)
src.updatehealth()
@@ -108,9 +105,9 @@
for(var/mob/M in viewers(src, null))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0)
src.bruteloss += 30
src.adjustBruteLoss(30)
if ((O.icon_state == "flaming"))
src.fireloss += 40
src.adjustFireLoss(40)
src.updatehealth()
return
@@ -471,7 +471,7 @@
Scan Breakdown: <br>
Respiratory: [M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font><br>
Toxicology: [M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font><br>
Burns: [M.fireloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.fireloss]</font><br>
Burns: [M.getFireLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getFireLoss()]</font><br>
Structural Integrity: [M.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getBruteLoss()]</font><br>
Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)<br>
"}
@@ -10,8 +10,8 @@
usr << text("\red [src.name] looks slightly dented")
else
usr << text("\red <B>[src.name] looks severely dented!</B>")
if (src.fireloss)
if (src.fireloss < 75)
if (src.getFireLoss())
if (src.getFireLoss() < 75)
usr << text("\red [src.name] looks slightly burnt!")
else
usr << text("\red <B>[src.name] looks severely burnt!</B>")
@@ -34,10 +34,10 @@
paralysis = max(min(paralysis, 30), 0)
weakened = max(min(weakened, 20), 0)
sleeping = 0
bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0)
adjustBruteLoss(0)
adjustToxLoss(0)
adjustOxyLoss(0)
adjustFireLoss(0)
use_power()
@@ -87,7 +87,7 @@
if(src.stat)
src.camera.status = 0
health = 200 - (getOxyLoss() + fireloss + getBruteLoss())
health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
+12 -12
View File
@@ -212,24 +212,21 @@
del(src)
return
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity)
if(1.0)
if (stat != 2)
b_loss += 100
f_loss += 100
adjustBruteLoss(100)
adjustFireLoss(100)
gib(1)
return
if(2.0)
if (stat != 2)
b_loss += 60
f_loss += 60
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (stat != 2)
b_loss += 30
bruteloss = b_loss
fireloss = f_loss
adjustBruteLoss(30)
updatehealth()
@@ -240,7 +237,7 @@
if (health > 0)
bruteloss += 30
if ((O.icon_state == "flaming"))
fireloss += 40
adjustFireLoss(40)
updatehealth()
return
@@ -269,6 +266,9 @@
return
now_pushing = 0
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
F.move_inside()
if (!istype(AM, /atom/movable))
return
if (!now_pushing)
@@ -344,8 +344,8 @@
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
var/obj/item/weapon/cable_coil/coil = W
fireloss -= 30
if(fireloss < 0) fireloss = 0
adjustFireLoss(-30)
if(getFireLoss() < 0) adjustFireLoss(0)
updatehealth()
coil.use(1)
for(var/mob/O in viewers(user, null))
@@ -54,7 +54,9 @@
New()
..()
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/device/healthanalyzer(src)
for(var/i = 1 to 3)
var/obj/item/weapon/reagent_containers/syringe/S = new /obj/item/weapon/reagent_containers/syringe(src)
switch(i)
@@ -67,24 +69,22 @@
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin(src)
for(var/i = 1 to 2)
src.modules += new /obj/item/weapon/reagent_containers/pill/kelotane(src)
for(var/i = 1 to 2)
src.modules += new /obj/item/weapon/reagent_containers/pill/dexalin(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker(src)
src.modules += new /obj/item/borg/sight/hud/med(src)
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
src.emag = new /obj/item/weapon/reagent_containers/pill/cyanide(src)
src.modules += new /obj/item/weapon/reagent_containers/pill/dexalin(src)
src.modules += new /obj/item/weapon/reagent_containers/pill/antitox(src)
src.modules += new /obj/item/weapon/reagent_containers/pill/kelotane(src)
src.modules += new /obj/item/weapon/reagent_containers/pill/bicardine(src)
return
respawn_consumable(var/mob/living/silicon/robot/R)
var/list/what = list (
/obj/item/weapon/reagent_containers/pill/kelotane,
/obj/item/weapon/reagent_containers/pill/kelotane,
/obj/item/weapon/reagent_containers/pill/dexalin,
/obj/item/weapon/reagent_containers/pill/dexalin
/obj/item/weapon/reagent_containers/pill/antitox,
/obj/item/weapon/reagent_containers/pill/kelotane,
/obj/item/weapon/reagent_containers/pill/bicardine
)
for (var/T in what)
if (!(locate(T) in src.modules))
@@ -103,23 +103,25 @@
New()
..()
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/device/analyzer(src)
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.emag = new /obj/item/borg/stun(src)
src.modules += new /obj/item/borg/rcd(src)
src.modules += new /obj/item/device/t_scanner(src)
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/device/flashlight(src)
src.modules += new /obj/item/weapon/weldingtool/largetank(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/crowbar(src)
src.modules += new /obj/item/weapon/wirecutters(src)
src.modules += new /obj/item/device/multitool(src)
src.modules += new /obj/item/device/t_scanner(src)
src.modules += new /obj/item/device/analyzer(src)
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src)
var/obj/item/stack/sheet/metal/cyborg/M = new /obj/item/stack/sheet/metal/cyborg(src)
M.amount = 50
src.modules += M
var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src)
var/obj/item/stack/sheet/rglass/cyborg/G = new /obj/item/stack/sheet/rglass/cyborg(src)
G.amount = 50
src.modules += G
@@ -127,8 +129,6 @@
W.amount = 50
src.modules += W
src.modules += new /obj/item/borg/sight/meson(src)
src.emag = new /obj/item/borg/stun(src)
return
@@ -154,10 +154,10 @@
New()
..()
src.modules += new /obj/item/weapon/melee/baton(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
src.modules += new /obj/item/borg/sight/hud/sec(src)
src.modules += new /obj/item/weapon/handcuffs/cyborg(src)
src.modules += new /obj/item/weapon/melee/baton(src)
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
return
@@ -174,6 +174,7 @@
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
src.modules += new /obj/item/weapon/trashbag(src)
src.emag = new /obj/item/weapon/cleaner(src)
var/datum/reagents/R = new/datum/reagents(1000)
src.emag.reagents = R
R.my_atom = src.emag
@@ -196,6 +197,7 @@
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
src.modules += M
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
var/obj/item/weapon/zippo/L = new /obj/item/weapon/zippo(src)
@@ -205,6 +207,7 @@
src.modules += new /obj/item/weapon/tray(src)
src.modules += new /obj/item/weapon/reagent_containers/food/drinks/shaker(src)
src.emag = new /obj/item/weapon/reagent_containers/food/drinks/beer(src)
var/datum/reagents/R = new/datum/reagents(50)
src.emag.reagents = R
R.my_atom = src.emag
@@ -220,11 +223,11 @@
New()
..()
src.modules += new /obj/item/weapon/pickaxe/jackhammer(src)
src.modules += new /obj/item/weapon/shovel(src)
src.modules += new /obj/item/weapon/satchel(src)
src.modules += new /obj/item/borg/sight/meson(src)
src.emag = new /obj/item/borg/stun(src)
src.modules += new /obj/item/weapon/satchel(src)
src.modules += new /obj/item/weapon/pickaxe/jackhammer(src)
src.modules += new /obj/item/weapon/shovel(src)
return
+20 -4
View File
@@ -14,26 +14,38 @@
/client/North()
..()
/client/South()
..()
/client/West()
..()
/client/East()
..()
/client/Northeast()
..()
swap_hand()
return
/client/Southeast()
..()
attack_self()
return
/client/Southwest()
..()
toggle_throw_mode()
return
/client/Northwest()
..()
drop_item()
return
/client/verb/swap_hand()
set hidden = 1
@@ -41,6 +53,7 @@
mob:swap_hand()
return
/client/verb/attack_self()
set hidden = 1
var/obj/item/weapon/W = mob.equipped()
@@ -48,6 +61,7 @@
W.attack_self(mob)
return
/client/verb/toggle_throw_mode()
set hidden = 1
if(!istype(mob, /mob/living/carbon)) return
@@ -55,12 +69,14 @@
mob:toggle_throw_mode()
return
/client/verb/drop_item()
set hidden = 1
if(!isrobot(mob))
mob.drop_item_v()
return
/client/Center()
if (isobj(mob.loc))
var/obj/O = mob.loc
+7 -1
View File
@@ -335,7 +335,13 @@
close_spawn_windows()
preferences.copy_to(new_character)
if(ticker.random_players)
new_character.gender = pick(MALE, MALE, FEMALE)
preferences.randomize_name()
preferences.randomize_appearance_for(new_character)
else
preferences.copy_to(new_character)
new_character.dna.ready_dna(new_character)
if(mind)
mind.transfer_to(new_character)
@@ -639,7 +639,6 @@ datum/preferences
ShowChoices(user)
proc/copy_to(mob/living/carbon/human/character, safety = 0)
if(be_random_name)
randomize_name()
@@ -12,7 +12,7 @@ datum/preferences
randomize_facial()
randomize_hair_color("facial")
randomize_eyes_color()
underwear = pick(0,1)
underwear = 1
b_type = pick("A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-")
age = rand(19,35)
copy_to(H,1)
@@ -242,7 +242,7 @@ var/global/list/uneatable = list(
if (istype(A,/obj/item/weapon/storage/backpack/holding))
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist/4),(dist/2),(dist))
explosion(src.loc,(dist),(dist*2),(dist*4))
return
if(istype(A, /obj/machinery/singularity))//Welp now you did it
@@ -250,7 +250,7 @@ var/global/list/uneatable = list(
src.energy += (S.energy/2)//Absorb most of it
del(S)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist/4),(dist/2),(dist))
explosion(src.loc,(dist),(dist*2),(dist*4))
return//Quits here, the obj should be gone, hell we might be
if((teleport_del) && (!istype(A, /obj/machinery)))//Going to see if it does not lag less to tele items over to Z 2
-21
View File
@@ -21,27 +21,6 @@
dir = pick(cardinal)
attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/trashbag))
var/obj/item/weapon/trashbag/S = W
if (S.mode == 1)
for (var/obj/item/ammo_casing/AC in locate(src.x,src.y,src.z))
if (S.contents.len < S.capacity)
S.contents += AC;
else
user << "\blue The bag is full."
break
user << "\blue You pick up all trash."
else
if (S.contents.len < S.capacity)
S.contents += src;
else
user << "\blue The bag is full."
S.update_icon()
return
//Boxes of ammo
/obj/item/ammo_magazine
+9 -1
View File
@@ -38,7 +38,7 @@
O.emp_act(severity)
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)//TODO: go over this
afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)//TODO: go over this
if(flag) return //we're placing gun on a table or in backpack
if(istype(target, /obj/machinery/recharger) && istype(src, /obj/item/weapon/gun/energy)) return//Shouldnt flag take care of this?
@@ -95,6 +95,14 @@
in_chamber.current = curloc
in_chamber.yo = targloc.y - curloc.y
in_chamber.xo = targloc.x - curloc.x
if(params)
var/list/mouse_control = params2list(params)
if(mouse_control["icon-x"])
in_chamber.p_x = text2num(mouse_control["icon-x"])
if(mouse_control["icon-y"])
in_chamber.p_y = text2num(mouse_control["icon-y"])
spawn()
if(in_chamber) in_chamber.process()
sleep(1)
@@ -36,9 +36,9 @@ obj/item/weapon/gun/energy/laser/retro
process()
charge_tick++
if(!charge_tick >= 10) return 0
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
if(!power_supply) return 0
power_supply.give(100)
update_icon()
return 1
@@ -51,9 +51,9 @@
process()
charge_tick++
if(!charge_tick >= 10) return 0
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
if(!power_supply) return 0
if((power_supply.charge / power_supply.maxcharge) != 1)
if(!failcheck()) return 0
power_supply.give(100)
@@ -7,14 +7,40 @@
charge_cost = 200
projectile_type = "/obj/item/projectile/beam/pulse"
cell_type = "/obj/item/weapon/cell/super"
var/mode = 2
attack_self(mob/living/user as mob)
switch(mode)
if(2)
mode = 0
charge_cost = 100
fire_sound = 'Taser.ogg'
user << "\red [src.name] is now set to stun."
projectile_type = "/obj/item/projectile/energy/electrode"
if(0)
mode = 1
charge_cost = 100
fire_sound = 'Laser.ogg'
user << "\red [src.name] is now set to kill."
projectile_type = "/obj/item/projectile/beam"
if(1)
mode = 2
charge_cost = 200
fire_sound = 'pulse.ogg'
user << "\red [src.name] is now set to DESTROY."
projectile_type = "/obj/item/projectile/beam/pulse"
return
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
name = "pulse destroyer"
desc = "A heavy-duty, pulse-based energy weapon."
cell_type = "/obj/item/weapon/cell/infinite"
attack_self(mob/living/user as mob)
user << "\red [src.name] has three settings, and they are all DESTROY."
/obj/item/weapon/gun/energy/pulse_rifle/M1911
+2 -3
View File
@@ -62,9 +62,8 @@
process()
charge_tick++
if(!charge_tick >= 10) return 0
charge_tick = 0
if(!power_supply) return 0
if(charge_tick < 4) return 0
if(!power_supply) return 0
power_supply.give(100)
return 1
+12 -1
View File
@@ -29,6 +29,9 @@
current = null
turf/original = null
p_x = 16
p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
damage = 10
damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
nodamage = 0 //Determines if the projectile will skip any damage inflictions
@@ -78,7 +81,15 @@
spawn(0)
if(A)
A.bullet_act(src, def_zone)
var/permutation = A.bullet_act(src, def_zone) // searches for return value
if(permutation == -1) // the bullet passes through a dense object!
bumped = 0 // reset bumped variable!
if(istype(A, /turf))
loc = A
else
loc = A.loc
return
if(istype(A,/turf))
for(var/obj/O in A)
O.bullet_act(src)
+398
View File
@@ -0,0 +1,398 @@
// converyor belt
// moves items/mobs/movables in set direction every ptick
/obj/machinery/conveyor
icon = 'recycling.dmi'
icon_state = "conveyor0"
name = "conveyor belt"
desc = "A conveyor belt."
anchored = 1
var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off
var/operable = 1 // true if can operate (no broken segments in this belt run)
var/basedir // this is the default (forward) direction, set by the map dir
// note dir var can vary when the direction changes
var/list/affecting // the list of all items that will be moved this ptick
var/id = "" // the control ID - must match controller ID
// following two only used if a diverter is present
var/divert = 0 // if non-zero, direction to divert items
var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense)
// create a conveyor
/obj/machinery/conveyor/New()
..()
basedir = dir
setdir()
// set the dir and target turf depending on the operating direction
/obj/machinery/conveyor/proc/setdir()
if(operating == -1)
dir = turn(basedir,180)
else
dir = basedir
update()
// update the icon depending on the operating condition
/obj/machinery/conveyor/proc/update()
if(stat & BROKEN)
icon_state = "conveyor-b"
operating = 0
return
if(!operable)
operating = 0
icon_state = "conveyor[(operating != 0) && !(stat & NOPOWER)]"
// machine process
// move items to the target location
/obj/machinery/conveyor/process()
if(stat & (BROKEN | NOPOWER))
return
if(!operating)
return
use_power(100)
var/movedir = dir // base movement dir
if(divert && dir==divdir) // update if diverter present
movedir = divert
affecting = loc.contents - src // moved items will be all in loc
spawn(1) // slight delay to prevent infinite propagation due to map order
var/items_moved = 0
for(var/atom/movable/A in affecting)
if(!A.anchored)
if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt
if(ismob(A))
var/mob/M = A
if(M.buckled == src)
var/obj/machinery/conveyor/C = locate() in get_step(src, dir)
M.buckled = null
step(M,dir)
if(C)
M.buckled = C
else
new/obj/item/weapon/cable_coil/cut(M.loc)
else
step(M,movedir)
else
step(A,movedir)
items_moved++
if(items_moved >= 10)
break
// attack with item, place item on conveyor
/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/grab)) // special handling if grabbing a mob
var/obj/item/weapon/grab/G = I
G.affecting.Move(src.loc)
del(G)
return
else if(istype(I, /obj/item/weapon/cable_coil)) // if cable, see if a mob is present
var/mob/M = locate() in src.loc
if(M)
if (M == user)
src.visible_message("\blue [M] ties \himself to the conveyor.")
// note don't check for lying if self-tying
else
if(M.lying)
user.visible_message("\blue [M] has been tied to the conveyor by [user].", "\blue You tie [M] to the converyor!")
else
user << "\blue [M] must be lying down to be tied to the converyor!"
return
M.buckled = src
src.add_fingerprint(user)
I:use(1)
M.lying = 1
return
// else if no mob in loc, then allow coil to be placed
else if(istype(I, /obj/item/weapon/wirecutters))
var/mob/M = locate() in src.loc
if(M && M.buckled == src)
M.buckled = null
src.add_fingerprint(user)
if (M == user)
src.visible_message("\blue [M] cuts \himself free from the conveyor.")
else
src.visible_message("\blue [M] had been cut free from the conveyor by [user].")
return
if(isrobot(user))
return
// otherwise drop and place on conveyor
user.drop_item()
if(I && I.loc) I.loc = src.loc
return
// attack with hand, move pulled object onto conveyor
/obj/machinery/conveyor/attack_hand(mob/user as mob)
if ((!( user.canmove ) || user.restrained() || !( user.pulling )))
return
if (user.pulling.anchored)
return
if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1))
return
if (ismob(user.pulling))
var/mob/M = user.pulling
M.pulling = null
step(user.pulling, get_dir(user.pulling.loc, src))
user.pulling = null
else
step(user.pulling, get_dir(user.pulling.loc, src))
user.pulling = null
return
// make the conveyor broken
// also propagate inoperability to any connected conveyor with the same ID
/obj/machinery/conveyor/proc/broken()
stat |= BROKEN
update()
var/obj/machinery/conveyor/C = locate() in get_step(src, basedir)
if(C)
C.set_operable(basedir, id, 0)
C = locate() in get_step(src, turn(basedir,180))
if(C)
C.set_operable(turn(basedir,180), id, 0)
//set the operable var if ID matches, propagating in the given direction
/obj/machinery/conveyor/proc/set_operable(stepdir, match_id, op)
if(id != match_id)
return
operable = op
update()
var/obj/machinery/conveyor/C = locate() in get_step(src, stepdir)
if(C)
C.set_operable(stepdir, id, op)
/*
/obj/machinery/conveyor/verb/destroy()
set src in view()
src.broken()
*/
/obj/machinery/conveyor/power_change()
..()
update()
// converyor diverter
// extendable arm that can be switched so items on the conveyer are diverted sideways
// situate in same turf as conveyor
// only works if belts is running proper direction
//
//
/obj/machinery/diverter
icon = 'recycling.dmi'
icon_state = "diverter0"
name = "diverter"
desc = "A diverter arm for a conveyor belt."
anchored = 1
layer = FLY_LAYER
var/obj/machinery/conveyor/conv // the conveyor this diverter works on
var/deployed = 0 // true if diverter arm is extended
var/operating = 0 // true if arm is extending/contracting
var/divert_to // the dir that diverted items will be moved
var/divert_from // the dir items must be moving to divert
// create a diverter
// set up divert_to and divert_from directions depending on dir state
/obj/machinery/diverter/New()
..()
switch(dir)
if(NORTH)
divert_to = WEST // stuff will be moved to the west
divert_from = NORTH // if entering from the north
if(SOUTH)
divert_to = EAST
divert_from = NORTH
if(EAST)
divert_to = EAST
divert_from = SOUTH
if(WEST)
divert_to = WEST
divert_from = SOUTH
if(NORTHEAST)
divert_to = NORTH
divert_from = EAST
if(NORTHWEST)
divert_to = NORTH
divert_from = WEST
if(SOUTHEAST)
divert_to = SOUTH
divert_from = EAST
if(SOUTHWEST)
divert_to = SOUTH
divert_from = WEST
spawn(2)
// wait for map load then find the conveyor in this turf
conv = locate() in src.loc
if(conv) // divert_from dir must match possible conveyor movement
if(conv.basedir != divert_from && conv.basedir != turn(divert_from,180) )
del(src) // if no dir match, then delete self
set_divert()
update()
// update the icon state depending on whether the diverter is extended
/obj/machinery/diverter/proc/update()
icon_state = "diverter[deployed]"
// call to set the diversion vars of underlying conveyor
/obj/machinery/diverter/proc/set_divert()
if(conv)
if(deployed)
conv.divert = divert_to
conv.divdir = divert_from
else
conv.divert= 0
// *** TESTING click to toggle
/obj/machinery/diverter/Click()
toggle()
// toggle between arm deployed and not deployed, showing animation
//
/obj/machinery/diverter/proc/toggle()
if( stat & (NOPOWER|BROKEN))
return
if(operating)
return
use_power(50)
operating = 1
if(deployed)
flick("diverter10",src)
icon_state = "diverter0"
sleep(10)
deployed = 0
else
flick("diverter01",src)
icon_state = "diverter1"
sleep(10)
deployed = 1
operating = 0
update()
set_divert()
// don't allow movement into the 'backwards' direction if deployed
/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target)
var/direct = get_dir(O, target)
if(direct == divert_to) // prevent movement through body of diverter
return 0
if(!deployed)
return 1
return(direct != turn(divert_from,180))
// don't allow movement through the arm if deployed
/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target)
var/direct = get_dir(O, target)
if(direct == turn(divert_to,180)) // prevent movement through body of diverter
return 0
if(!deployed)
return 1
return(direct != divert_from)
// the conveyor control switch
//
//
/obj/machinery/conveyor_switch
name = "conveyor switch"
desc = "A conveyor control switch."
icon = 'recycling.dmi'
icon_state = "switch-off"
var/position = 0 // 0 off, -1 reverse, 1 forward
var/last_pos = -1 // last direction setting
var/operated = 1 // true if just operated
var/id = "" // must match conveyor IDs to control them
var/list/conveyors // the list of converyors that are controlled by this switch
anchored = 1
/obj/machinery/conveyor_switch/New()
..()
update()
spawn(5) // allow map load
conveyors = list()
for(var/obj/machinery/conveyor/C in world)
if(C.id == id)
conveyors += C
// update the icon depending on the position
/obj/machinery/conveyor_switch/proc/update()
if(position<0)
icon_state = "switch-rev"
else if(position>0)
icon_state = "switch-fwd"
else
icon_state = "switch-off"
// timed process
// if the switch changed, update the linked conveyors
/obj/machinery/conveyor_switch/process()
if(!operated)
return
operated = 0
for(var/obj/machinery/conveyor/C in conveyors)
C.operating = position
C.setdir()
// attack with hand, switch position
/obj/machinery/conveyor_switch/attack_hand(mob/user)
if(position == 0)
if(last_pos < 0)
position = 1
last_pos = 0
else
position = -1
last_pos = 0
else
last_pos = position
position = 0
operated = 1
update()
// find any switches with same id as this one, and set their positions to match us
for(var/obj/machinery/conveyor_switch/S in world)
if(S.id == src.id)
S.position = position
S.update()
@@ -0,0 +1,152 @@
// Disposal pipe construction
/obj/structure/disposalconstruct
name = "disposal pipe segment"
desc = "A huge pipe segment used for constructing disposal systems."
icon = 'disposal.dmi'
icon_state = "conpipe-s"
anchored = 0
density = 1
pressure_resistance = 5*ONE_ATMOSPHERE
m_amt = 1850
level = 2
var/ptype = 0
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk
var/dpdir = 0 // directions as disposalpipe
var/base_state = "pipe-s"
// update iconstate and dpdir due to dir and type
proc/update()
var/flip = turn(dir, 180)
var/left = turn(dir, 90)
var/right = turn(dir, -90)
switch(ptype)
if(0)
base_state = "pipe-s"
dpdir = dir | flip
if(1)
base_state = "pipe-c"
dpdir = dir | right
if(2)
base_state = "pipe-j1"
dpdir = dir | right | flip
if(3)
base_state = "pipe-j2"
dpdir = dir | left | flip
if(4)
base_state = "pipe-y"
dpdir = dir | left | right
if(5)
base_state = "pipe-t"
dpdir = dir
icon_state = "con[base_state]"
if(invisibility) // if invisible, fade icon
icon -= rgb(0,0,0,128)
// hide called by levelupdate if turf intact status changes
// change visibility status and force update of icon
hide(var/intact)
invisibility = (intact && level==1) ? 101: 0 // hide if floor is intact
update()
// flip and rotate verbs
verb/rotate()
set name = "Rotate Pipe"
set src in view(1)
if(usr.stat)
return
if(anchored)
usr << "You must unfasten the pipe before rotating it."
dir = turn(dir, -90)
update()
verb/flip()
set name = "Flip Pipe"
set src in view(1)
if(usr.stat)
return
if(anchored)
usr << "You must unfasten the pipe before flipping it."
dir = turn(dir, 180)
if(ptype == 2)
ptype = 3
else if(ptype == 3)
ptype = 2
update()
// returns the type path of disposalpipe corresponding to this item dtype
proc/dpipetype()
switch(ptype)
if(0,1)
return /obj/structure/disposalpipe/segment
if(2,3,4)
return /obj/structure/disposalpipe/junction
if(5)
return /obj/structure/disposalpipe/trunk
return
// attackby item
// wrench: (un)anchor
// weldingtool: convert to real pipe
attackby(var/obj/item/I, var/mob/user)
var/turf/T = src.loc
if(T.intact)
user << "You can only attach the pipe if the floor plating is removed."
return
var/obj/structure/disposalpipe/CP = locate() in T
if(CP)
update()
var/pdir = CP.dpdir
if(istype(CP, /obj/structure/disposalpipe/broken))
pdir = CP.dir
if(pdir & dpdir)
user << "There is already a pipe at that location."
return
if(istype(I, /obj/item/weapon/wrench))
if(anchored)
anchored = 0
level = 2
density = 1
user << "You detach the pipe from the underfloor."
else
anchored = 1
level = 1
density = 0
user << "You attach the pipe to the underfloor."
playsound(src.loc, 'Ratchet.ogg', 100, 1)
else if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'Welder2.ogg', 100, 1)
user << "Welding the pipe in place."
W:welding = 2
if(do_after(user, 20))
update()
var/pipetype = dpipetype()
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
P.base_icon_state = base_state
P.dir = dir
P.dpdir = dpdir
P.updateicon()
del(src)
return
W:welding = 1
else
user << "You need more welding fuel to complete this task."
return
File diff suppressed because it is too large Load Diff
+289
View File
@@ -0,0 +1,289 @@
// The scrap item
// a single object type represents all combinations of size and composition of scrap
//
/obj/item/scrap
name = "scrap"
icon = 'scrap.dmi'
icon_state = "1metal0"
item_state = "scrap-metal"
desc = "A piece of scrap"
var/classtext = ""
throwforce = 14.0
m_amt = 0
g_amt = 0
w_amt = 0
var/size = 1 // 1=piece, 2= few pieces, 3=small pile, 4=large pile
var/blood = 0 // 0=none, 1=blood-stained, 2=bloody
throwforce = 8.0
throw_speed = 1
throw_range = 4
w_class = 1
flags = FPRINT | TABLEPASS | CONDUCT
#define MAX_SCRAP 15000 // maximum content amount of a scrap pile
/obj/item/scrap/New()
src.verbs -= /atom/movable/verb/pull
..()
update()
// return a copy
/obj/item/scrap/proc/copy()
var/obj/item/scrap/ret = new()
ret.set_components(m_amt, g_amt, w_amt)
return ret
// set the metal, glass and waste content
/obj/item/scrap/proc/set_components(var/m, var/g, var/w)
m_amt = m
g_amt = g
w_amt = w
update()
// returns the total amount of scrap in this pile
/obj/item/scrap/proc/total()
return m_amt + g_amt + w_amt
// sets the size, appearance, and description of the scrap depending on component amounts
/obj/item/scrap/proc/update()
var/total = total()
// determine size of pile
if(total<=400)
size = 1
else if(total<=1600)
size = 2
else
size = 3
w_class = size
var/sizetext = ""
switch(size)
if(1)
sizetext = "A piece of"
if(2)
sizetext = "A few pieces of"
if(3)
sizetext = "A pile of"
// determine bloodiness
var/bloodtext = ""
switch(blood)
if(0)
bloodtext = ""
if(1)
bloodtext = "blood-stained "
if(2)
bloodtext = "bloody "
// find mixture and composition
var/class = 0 // 0 = mixed, 1=mostly. 2=pure
var/major = "waste" // the major component type
var/max = 0
if(m_amt > max)
max = m_amt
else if(g_amt > max)
max = g_amt
else if(w_amt > max)
max = w_amt
if(max == total)
class = 2 // pure
else if(max/total > 0.6)
class = 1 // mostly
else
class = 0 // mixed
if(class>0)
var/remain = total - max
if(m_amt > remain)
major = "metal"
else if(g_amt > remain)
major = "glass"
else
major = "waste"
if(class == 1)
desc = "[sizetext] mostly [major] [bloodtext]scrap."
classtext = "mostly [major] [bloodtext]"
else
desc = "[sizetext] [bloodtext][major] scrap."
classtext = "[bloodtext][major] "
icon_state = "[size][major][blood]"
else
desc = "[sizetext] [bloodtext]mixed scrap."
classtext = "[bloodtext]mixed"
icon_state = "[size]mixed[blood]"
if(size==0)
pixel_x = rand(-5,5)
pixel_y = rand(-5,5)
else
pixel_x = 0
pixel_y = 0
// clear or set conduction flag depending on whether scrap is mostly metal
if(major=="metal")
flags |= CONDUCT
else
flags &= ~CONDUCT
item_state = "scrap-[major]"
// add a scrap item to this one
// if the resulting pile is too big, transfer only what will fit
// otherwise add them and deleted the added pile
/obj/item/scrap/proc/add_scrap(var/obj/item/scrap/other, var/limit = MAX_SCRAP)
var/total = total()
var/other_total = other.total()
if( (total + other_total) <= limit )
m_amt += other.m_amt
g_amt += other.g_amt
w_amt += other.w_amt
blood = (total*blood + other_total*other.blood) / (total + other_total)
del(other)
else
var/space = limit - total
var/m = round(other.m_amt/other_total*space, 1)
var/g = round(other.g_amt/other_total*space, 1)
var/w = round(other.w_amt/other_total*space, 1)
m_amt += m
g_amt += g
w_amt += w
other.m_amt -= m
other.g_amt -= g
other.w_amt -= w
var/other_trans = m + g + w
other.update()
blood = (total*blood + other_trans*other.blood) / (total + other_trans)
blood = round(blood,1)
src.update()
// limit this pile to maximum size
// return any remainder as a new scrap item (or null if none)
// note return item is not necessarily smaller than max size
/obj/item/scrap/proc/remainder(var/limit = MAX_SCRAP)
var/total = total()
if(total > limit)
var/m = round( m_amt/total * limit, 1)
var/g = round( g_amt/total * limit, 1)
var/w = round( w_amt/total * limit, 1)
var/obj/item/scrap/S = new()
S.set_components(m_amt - m,g_amt - g,w_amt - w)
src.set_components(m,g,w)
return S
return null
// if other pile of scrap tries to enter the same turf, then add that pile to this one
/obj/item/scrap/CanPass(var/obj/item/scrap/O)
if(istype(O))
src.add_scrap(O)
if(O)
return 0 // O still exists if not all could be transfered, so block it
return 1
/obj/item/scrap/proc/to_text()
return "[m_amt],[g_amt],[w_amt] ([total()])"
// attack with hand removes a single piece from a pile
/obj/item/scrap/attack_hand(mob/user)
add_fingerprint(user)
if(src.is_single_piece())
return ..(user)
var/obj/item/scrap/S = src.get_single_piece()
S.attack_hand(user)
return
/obj/item/scrap/attackby(obj/item/I, mob/user)
..()
if(istype(I, /obj/item/scrap))
var/obj/item/scrap/S = I
if( (S.total()+src.total() ) > MAX_SCRAP )
user << "The pile is full."
return
if(ismob(src.loc)) // can't combine scrap in hand
return
src.add_scrap(S)
// when dropped, try to make a pile if scrap is already there
/obj/item/scrap/dropped()
spawn(2) // delay to allow drop postprocessing (since src may be destroyed)
for(var/obj/item/scrap/S in oview(0,src)) // excludes src itself
S.add_scrap(src)
// return true if this is a single piece of scrap
// must be total<=400 and of single composition
/obj/item/scrap/proc/is_single_piece()
if(total() > 400)
return 0
var/empty = (m_amt == 0) + (g_amt == 0) + (w_amt == 0)
return (empty==2) // must be 2 components with zero amount
// get a single piece of scrap from a pile
/obj/item/scrap/proc/get_single_piece()
var/obj/item/scrap/S = new()
var/cmp = pick(m_amt;1 , g_amt;2, w_amt;3)
var/amount = 400
switch(cmp)
if(1)
if(m_amt < amount)
amount = m_amt
S.set_components(amount, 0, 0)
src.set_components(m_amt - amount, g_amt, w_amt)
if(2)
if(g_amt < amount)
amount = g_amt
S.set_components(0, amount, 0)
src.set_components(m_amt, g_amt - amount, w_amt)
if(3)
if(w_amt < amount)
amount = w_amt
S.set_components(0, 0, amount)
src.set_components(m_amt, g_amt, w_amt - amount)
return S
+216
View File
@@ -0,0 +1,216 @@
/obj/effect/bigDelivery
desc = "A big wrapped package."
name = "large parcel"
icon = 'storage.dmi'
icon_state = "deliverycrate"
var/obj/wrapped = null
density = 1
var/sortTag = 0
flags = FPRINT
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
attack_hand(mob/user as mob)
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
src.wrapped.loc = (get_turf(src.loc))
if (istype(src.wrapped,/obj/structure/closet))
var/obj/structure/closet/O = src.wrapped
O.welded = 0
del(src)
return
attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/destTagger))
var/obj/item/device/destTagger/O = W
user << "\blue *TAGGED*"
src.sortTag = O.currTag
return
/obj/item/smallDelivery
desc = "A small wrapped package."
name = "small parcel"
icon = 'storage.dmi'
icon_state = "deliverycrateSmall"
var/obj/item/wrapped = null
var/sortTag = 0
flags = FPRINT
attack_hand(mob/user as mob)
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
src.wrapped.loc = (get_turf(src.loc))
del(src)
return
attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/destTagger))
var/obj/item/device/destTagger/O = W
user << "\blue *TAGGED*"
src.sortTag = O.currTag
return
/obj/item/weapon/packageWrap
name = "package wrapper"
icon = 'items.dmi'
icon_state = "deliveryPaper"
var/amount = 25.0
attack(target as obj, mob/user as mob)
user.attack_log += text("\[[time_stamp()]\] <font color='blue'>Has used [src.name] on \ref[target]</font>")
if (istype(target, /obj/item))
var/obj/item/O = target
if (src.amount > 1)
var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc))
P.wrapped = O
O.loc = P
src.amount -= 1
else if (istype(target, /obj/structure/closet/crate))
var/obj/structure/closet/crate/O = target
if (src.amount > 3)
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
P.wrapped = O
O.loc = P
src.amount -= 3
else
user << "\blue You need more paper."
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
if (src.amount > 3)
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
P.wrapped = O
O.close()
O.welded = 1
O.loc = P
src.amount -= 3
else
user << "\blue The object you are trying to wrap is unsuitable for the sorting machinery!"
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
//SN src = null
del(src)
return
return
/obj/item/device/destTagger
name = "destination tagger"
desc = "Used to set the destination of properly wrapped packages."
icon_state = "forensic0"
var/currTag = 0
var/list/locationList = list(
"Disposals", "Bartender's Workspace", "Cafeteria", "Cargo Bay", "Chapel Office",
"Chemistry", "Chief Medical Officer's Office", "Crew Quarters Toilets", "Fitness",
"Head of Personnel's Office", "Head of Security's Office", "Hydroponics",
"Janitor's Closet", "Kitchen", "Library", "Locker Room", "Locker Toilets", "Medbay",
"Quartermaster's Office", "Research Director's Office", "Research Lab", "Robotics",
"Security", "Surgery", "Theatre", "Tool Storage")
//The whole system for the sorttype var is determined based on the order of this list,
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
w_class = 1
item_state = "electronic"
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT
attack_self(mob/user as mob)
var/dat = "<TT><B>TagMaster 2.2</B><BR><BR>"
if (src.currTag == 0)
dat += "<br>Current Selection: None<br>"
else
dat += "<br>Current Selection: [locationList[currTag]]<br><br>"
for (var/i = 1, i <= locationList.len, i++)
dat += "<A href='?src=\ref[src];nextTag=[i]'>[locationList[i]]</A>"
if (i%4==0)
dat += "<br>"
else
dat += " "
user << browse(dat, "window=destTagScreen")
onclose(user, "destTagScreen")
return
Topic(href, href_list)
src.add_fingerprint(usr)
if(href_list["nextTag"])
var/n = text2num(href_list["nextTag"])
src.currTag = n
src.updateUsrDialog()
/*
attack(target as obj, mob/user as mob)
user << "/blue *TAGGED*"
target.sortTag = src.currTag
attack(target as obj, mob/user as mob)
user << "/blue You can only tag properly wrapped delivery packages!"
*/
attack(target as obj, mob/user as mob)
if (istype(target, /obj/effect/bigDelivery))
user << "\blue *TAGGED*"
var/obj/effect/bigDelivery/O = target
O.sortTag = src.currTag
else if (istype(target, /obj/item/smallDelivery))
user << "\blue *TAGGED*"
var/obj/item/smallDelivery/O = target
O.sortTag = src.currTag
else
user << "\blue You can only tag properly wrapped delivery packages!"
return
/obj/machinery/disposal/deliveryChute
name = "Delivery chute"
desc = "A chute for big and small packages alike!"
density = 0
icon_state = "intake"
interact()
return
HasEntered(AM as mob|obj) //Go straight into the chute
if (istype(AM, /obj))
var/obj/O = AM
O.loc = src
else if (istype(AM, /mob))
var/mob/M = AM
M.loc = src
src.flush()
flush()
flushing = 1
flick("intake-closing", src)
var/deliveryCheck = 0
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
// travels through the pipes.
for(var/obj/effect/bigDelivery/O in src)
deliveryCheck = 1
if(O.sortTag == 0)
O.sortTag = 1
for(var/obj/item/smallDelivery/O in src)
deliveryCheck = 1
if (O.sortTag == 0)
O.sortTag = 1
if(deliveryCheck == 0)
H.destinationTag = 1
H.init(src) // copy the contents of disposer to holder
air_contents = new() // new empty gas resv.
sleep(10)
playsound(src, 'disposalflush.ogg', 50, 0, 0)
sleep(5) // wait for animation to finish
H.start(src) // start the holder processing movement
flushing = 0
// now reset disposal state
flush = 0
if(mode == 2) // if was ready,
mode = 1 // switch to charging
update()
return