mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 21:17:44 +01:00
merging upstream master into local repo
This commit is contained in:
@@ -762,7 +762,11 @@ var/global/floorIsLava = 0
|
||||
return
|
||||
chosen = matches[chosen]
|
||||
|
||||
new chosen(usr.loc)
|
||||
if(ispath(chosen,/turf))
|
||||
var/turf/T = get_turf(usr.loc)
|
||||
T.ChangeTurf(chosen)
|
||||
else
|
||||
new chosen(usr.loc)
|
||||
|
||||
log_admin("[key_name(usr)] spawned [chosen] at ([usr.x],[usr.y],[usr.z])")
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -9,6 +9,15 @@
|
||||
item_color = "director"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/alt
|
||||
desc = "Maybe you'll engineer your own half-man, half-pig creature some day. Its fabric provides minor protection from biological contaminants."
|
||||
name = "research director's jumpsuit"
|
||||
icon_state = "rdwhimsy"
|
||||
item_state = "rdwhimsy"
|
||||
item_color = "rdwhimsy"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
/obj/item/clothing/under/rank/scientist
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. It has markings that denote the wearer as a scientist."
|
||||
name = "scientist's jumpsuit"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// TODO: Split everything into easy to manage procs.
|
||||
|
||||
/obj/item/device/detective_scanner
|
||||
name = "scanner"
|
||||
desc = "Used to scan objects for DNA and fingerprints. Can print a report of the findings."
|
||||
name = "forensic scanner"
|
||||
desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings."
|
||||
icon_state = "forensic1"
|
||||
w_class = 3.0
|
||||
item_state = "electronic"
|
||||
@@ -40,25 +40,25 @@
|
||||
user << "<span class='notice'>The scanner has no logs or is in use.</span>"
|
||||
|
||||
/obj/item/device/detective_scanner/attack(mob/living/M as mob, mob/user as mob)
|
||||
scan(M, user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A as obj|turf|area, mob/user as mob,proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(!isturf(A) && !isobj(A))
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
/obj/item/device/detective_scanner/afterattack(atom/A, mob/user as mob, proximity)
|
||||
scan(A, user)
|
||||
|
||||
/obj/item/device/detective_scanner/proc/scan(var/atom/A, var/mob/user)
|
||||
|
||||
if(!scanning)
|
||||
// Can remotely scan objects and mobs.
|
||||
if(!in_range(A, user) && !(A in view(world.view, user)))
|
||||
return
|
||||
if(loc != user)
|
||||
return
|
||||
|
||||
scanning = 1
|
||||
|
||||
user.visible_message("\The [user] scans \the [A] with \the [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]")
|
||||
user << "<span class='notice'>You scan [A]. The scanner is analysing the results...</span>"
|
||||
user.visible_message("\The [user] points the [src.name] at \the [A] and performs a forensic scan.")
|
||||
user << "<span class='notice'>You scan \the [A]. The scanner is now analysing the results...</span>"
|
||||
|
||||
|
||||
// GATHER INFORMATION
|
||||
@@ -151,7 +151,7 @@
|
||||
if(!found_something)
|
||||
add_log("<I># No forensic traces found #</I>", 0) // Don't display this to the holder user
|
||||
if(holder)
|
||||
holder << "<span class='notice'>Unable to locate any fingerprints, materials, fibers, or blood on [target_name]!</span>"
|
||||
holder << "<span class='notice'>Unable to locate any fingerprints, materials, fibers, or blood on \the [target_name]!</span>"
|
||||
else
|
||||
if(holder)
|
||||
holder << "<span class='notice'>You finish scanning \the [target_name].</span>"
|
||||
|
||||
@@ -377,6 +377,10 @@ ________________________________________________________________________________
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(src), slot_back)
|
||||
|
||||
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src)
|
||||
E.imp_in = src
|
||||
E.implanted = 1
|
||||
return 1
|
||||
|
||||
//=======//HELPER PROCS//=======//
|
||||
|
||||
@@ -62,7 +62,7 @@ proc/NewStutter(phrase,stunned)
|
||||
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||
|
||||
proc/Ellipsis(original_msg, chance = 50)
|
||||
proc/Ellipsis(original_msg, chance = 50, keep_words)
|
||||
if(chance <= 0) return "..."
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
@@ -75,8 +75,9 @@ proc/Ellipsis(original_msg, chance = 50)
|
||||
for(var/w in words)
|
||||
if(prob(chance))
|
||||
new_words += "..."
|
||||
else
|
||||
new_words += w
|
||||
if(!keep_words)
|
||||
continue
|
||||
new_words += w
|
||||
|
||||
new_msg = dd_list2text(new_words," ")
|
||||
|
||||
|
||||
@@ -16,4 +16,14 @@
|
||||
density = 0
|
||||
anchored = 1.0
|
||||
New()
|
||||
icon_state = "blank"
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/machinery/mineral
|
||||
var/input_dir = NORTH
|
||||
var/output_dir = SOUTH
|
||||
|
||||
/obj/machinery/mineral/proc/unload_mineral(var/atom/movable/S)
|
||||
S.loc = loc
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
S.loc = T
|
||||
@@ -178,9 +178,7 @@
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/CONSOLE = null
|
||||
var/ore_gold = 0;
|
||||
var/ore_silver = 0;
|
||||
@@ -201,208 +199,199 @@
|
||||
var/selected_clown = 0
|
||||
var/on = 0 //0 = off, 1 =... oh you know!
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
if (src.output && src.input)
|
||||
var/i
|
||||
for (i = 0; i < 10; i++)
|
||||
if (on)
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_glass > 0)
|
||||
ore_glass--;
|
||||
new /obj/item/stack/sheet/glass(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_glass > 0 && ore_iron > 0)
|
||||
ore_glass--;
|
||||
ore_iron--;
|
||||
new /obj/item/stack/sheet/rglass(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_gold > 0)
|
||||
ore_gold--;
|
||||
new /obj/item/stack/sheet/mineral/gold(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver > 0)
|
||||
ore_silver--;
|
||||
new /obj/item/stack/sheet/mineral/silver(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_diamond > 0)
|
||||
ore_diamond--;
|
||||
new /obj/item/stack/sheet/mineral/diamond(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_plasma > 0)
|
||||
ore_plasma--;
|
||||
new /obj/item/stack/sheet/mineral/plasma(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium > 0)
|
||||
ore_uranium--;
|
||||
new /obj/item/stack/sheet/mineral/uranium(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0)
|
||||
ore_iron--;
|
||||
new /obj/item/stack/sheet/metal(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0 && ore_plasma > 0)
|
||||
ore_iron--;
|
||||
ore_plasma--;
|
||||
new /obj/item/stack/sheet/plasteel(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
|
||||
if (ore_clown > 0)
|
||||
ore_clown--;
|
||||
new /obj/item/stack/sheet/mineral/clown(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
|
||||
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
|
||||
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium >= 2 && ore_diamond >= 1)
|
||||
ore_uranium -= 2
|
||||
ore_diamond -= 1
|
||||
new /obj/item/stack/sheet/mineral/adamantine(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver >= 1 && ore_plasma >= 3)
|
||||
ore_silver -= 1
|
||||
ore_plasma -= 3
|
||||
new /obj/item/stack/sheet/mineral/mythril(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue*/
|
||||
|
||||
|
||||
//if a non valid combination is selected
|
||||
|
||||
var/b = 1 //this part checks if all required ores are available
|
||||
|
||||
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
|
||||
b = 0
|
||||
|
||||
if (selected_gold == 1)
|
||||
if (ore_gold <= 0)
|
||||
b = 0
|
||||
if (selected_silver == 1)
|
||||
if (ore_silver <= 0)
|
||||
b = 0
|
||||
if (selected_diamond == 1)
|
||||
if (ore_diamond <= 0)
|
||||
b = 0
|
||||
if (selected_uranium == 1)
|
||||
if (ore_uranium <= 0)
|
||||
b = 0
|
||||
if (selected_plasma == 1)
|
||||
if (ore_plasma <= 0)
|
||||
b = 0
|
||||
if (selected_iron == 1)
|
||||
if (ore_iron <= 0)
|
||||
b = 0
|
||||
if (selected_glass == 1)
|
||||
if (ore_glass <= 0)
|
||||
b = 0
|
||||
if (selected_clown == 1)
|
||||
if (ore_clown <= 0)
|
||||
b = 0
|
||||
|
||||
if (b) //if they are, deduct one from each, produce slag and shut the machine off
|
||||
if (selected_gold == 1)
|
||||
ore_gold--
|
||||
if (selected_silver == 1)
|
||||
ore_silver--
|
||||
if (selected_diamond == 1)
|
||||
ore_diamond--
|
||||
if (selected_uranium == 1)
|
||||
ore_uranium--
|
||||
if (selected_plasma == 1)
|
||||
ore_plasma--
|
||||
if (selected_iron == 1)
|
||||
ore_iron--
|
||||
if (selected_clown == 1)
|
||||
ore_clown--
|
||||
new /obj/item/weapon/ore/slag(output.loc)
|
||||
on = 0
|
||||
var/i
|
||||
for (i = 0; i < 10; i++)
|
||||
if (on)
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_glass > 0)
|
||||
ore_glass--;
|
||||
generate_mineral(/obj/item/stack/sheet/glass)
|
||||
else
|
||||
on = 0
|
||||
break
|
||||
break
|
||||
continue
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_glass > 0 && ore_iron > 0)
|
||||
ore_glass--;
|
||||
ore_iron--;
|
||||
generate_mineral(/obj/item/stack/sheet/rglass)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_gold > 0)
|
||||
ore_gold--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/gold)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver > 0)
|
||||
ore_silver--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/silver)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_diamond > 0)
|
||||
ore_diamond--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/diamond)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_plasma > 0)
|
||||
ore_plasma--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/plasma)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium > 0)
|
||||
ore_uranium--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/uranium)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0)
|
||||
ore_iron--;
|
||||
generate_mineral(/obj/item/stack/sheet/metal)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (ore_iron > 0 && ore_plasma > 0)
|
||||
ore_iron--;
|
||||
ore_plasma--;
|
||||
generate_mineral(/obj/item/stack/sheet/plasteel)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
|
||||
if (ore_clown > 0)
|
||||
ore_clown--;
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/clown)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
|
||||
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
|
||||
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_uranium >= 2 && ore_diamond >= 1)
|
||||
ore_uranium -= 2
|
||||
ore_diamond -= 1
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/adamantine)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (ore_silver >= 1 && ore_plasma >= 3)
|
||||
ore_silver -= 1
|
||||
ore_plasma -= 3
|
||||
generate_mineral(/obj/item/stack/sheet/mineral/mythril)
|
||||
else
|
||||
on = 0
|
||||
continue*/
|
||||
|
||||
|
||||
//if a non valid combination is selected
|
||||
|
||||
var/b = 1 //this part checks if all required ores are available
|
||||
|
||||
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
|
||||
b = 0
|
||||
|
||||
if (selected_gold == 1)
|
||||
if (ore_gold <= 0)
|
||||
b = 0
|
||||
if (selected_silver == 1)
|
||||
if (ore_silver <= 0)
|
||||
b = 0
|
||||
if (selected_diamond == 1)
|
||||
if (ore_diamond <= 0)
|
||||
b = 0
|
||||
if (selected_uranium == 1)
|
||||
if (ore_uranium <= 0)
|
||||
b = 0
|
||||
if (selected_plasma == 1)
|
||||
if (ore_plasma <= 0)
|
||||
b = 0
|
||||
if (selected_iron == 1)
|
||||
if (ore_iron <= 0)
|
||||
b = 0
|
||||
if (selected_glass == 1)
|
||||
if (ore_glass <= 0)
|
||||
b = 0
|
||||
if (selected_clown == 1)
|
||||
if (ore_clown <= 0)
|
||||
b = 0
|
||||
|
||||
if (b) //if they are, deduct one from each, produce slag and shut the machine off
|
||||
if (selected_gold == 1)
|
||||
ore_gold--
|
||||
if (selected_silver == 1)
|
||||
ore_silver--
|
||||
if (selected_diamond == 1)
|
||||
ore_diamond--
|
||||
if (selected_uranium == 1)
|
||||
ore_uranium--
|
||||
if (selected_plasma == 1)
|
||||
ore_plasma--
|
||||
if (selected_iron == 1)
|
||||
ore_iron--
|
||||
if (selected_clown == 1)
|
||||
ore_clown--
|
||||
generate_mineral(/obj/item/weapon/ore/slag)
|
||||
on = 0
|
||||
else
|
||||
on = 0
|
||||
break
|
||||
for (i = 0; i < 10; i++)
|
||||
var/obj/item/O
|
||||
O = locate(/obj/item, input.loc)
|
||||
if (O)
|
||||
if (istype(O,/obj/item/weapon/ore/iron))
|
||||
ore_iron++;
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/glass))
|
||||
ore_glass++;
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/diamond))
|
||||
ore_diamond++;
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/plasma))
|
||||
ore_plasma++
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/gold))
|
||||
ore_gold++
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/silver))
|
||||
ore_silver++
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/uranium))
|
||||
ore_uranium++
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/clown))
|
||||
ore_clown++
|
||||
del(O)
|
||||
continue
|
||||
O.loc = src.output.loc
|
||||
else
|
||||
break
|
||||
else
|
||||
break
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
var/n = 0
|
||||
for(var/obj/item/O in T)
|
||||
n++
|
||||
if(n>10)
|
||||
break
|
||||
return
|
||||
if (istype(O,/obj/item/weapon/ore/iron))
|
||||
ore_iron++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/glass))
|
||||
ore_glass++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/diamond))
|
||||
ore_diamond++;
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/plasma))
|
||||
ore_plasma++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/gold))
|
||||
ore_gold++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/silver))
|
||||
ore_silver++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/uranium))
|
||||
ore_uranium++
|
||||
O.loc = null
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/clown))
|
||||
ore_clown++
|
||||
O.loc = null
|
||||
continue
|
||||
unload_mineral(O)
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/generate_mineral(var/P)
|
||||
var/O = new P(src)
|
||||
unload_mineral(O)
|
||||
@@ -47,8 +47,7 @@
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
out.amount = inp.amount
|
||||
inp.amount = 0
|
||||
out.loc = machine.output.loc
|
||||
|
||||
machine.unload_mineral(out)
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
@@ -66,30 +65,12 @@
|
||||
var/obj/machinery/mineral/stacking_unit_console/CONSOLE
|
||||
var/stk_types = list()
|
||||
var/stk_amt = list()
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/stack_list[0] //Key: Type. Value: Instance of type.
|
||||
var/stack_amt = 50; //ammount to stack before releassing
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
if(!istype(output) || !istype(input))
|
||||
del(src)
|
||||
return
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
return
|
||||
input_dir = EAST
|
||||
output_dir = WEST
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
|
||||
if(!istype(inp)) //Non-sheets. Yuck.
|
||||
return
|
||||
if(!(inp.type in stack_list)) //It's the first of this sheet added
|
||||
var/obj/item/stack/sheet/s = new inp.type(src,0)
|
||||
s.amount = 0
|
||||
@@ -100,14 +81,11 @@
|
||||
while(storage.amount > stack_amt) //Get rid of excessive stackage
|
||||
var/obj/item/stack/sheet/out = new inp.type()
|
||||
out.amount = stack_amt
|
||||
out.loc = output.loc
|
||||
unload_mineral(out)
|
||||
storage.amount -= stack_amt
|
||||
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
var/obj/item/stack/sheet/O
|
||||
while (locate(/obj/item/stack/sheet, input.loc))
|
||||
O = locate(/obj/item/stack/sheet, input.loc)
|
||||
if(istype(O,/obj/item/stack/sheet))
|
||||
process_sheet(O)
|
||||
return
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/stack/sheet/S in T)
|
||||
process_sheet(S)
|
||||
|
||||
@@ -7,40 +7,22 @@
|
||||
icon_state = "unloader"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
return
|
||||
return
|
||||
input_dir = WEST
|
||||
output_dir = EAST
|
||||
|
||||
/obj/machinery/mineral/unloading_machine/process()
|
||||
if (src.output && src.input)
|
||||
if (locate(/obj/structure/ore_box, input.loc))
|
||||
var/obj/structure/ore_box/BOX = locate(/obj/structure/ore_box, input.loc)
|
||||
var/i = 0
|
||||
for (var/obj/item/weapon/ore/O in BOX.contents)
|
||||
BOX.contents -= O
|
||||
O.loc = output.loc
|
||||
i++
|
||||
if (i>=10)
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
var/limit
|
||||
for(var/obj/structure/ore_box/B in T)
|
||||
for (var/obj/item/weapon/ore/O in B)
|
||||
B.contents -= O
|
||||
unload_mineral(O)
|
||||
limit++
|
||||
if (limit>=10)
|
||||
return
|
||||
if (locate(/obj/item, input.loc))
|
||||
var/obj/item/O
|
||||
var/i
|
||||
for (i = 0; i<10; i++)
|
||||
O = locate(/obj/item, input.loc)
|
||||
if (O)
|
||||
O.loc = src.output.loc
|
||||
else
|
||||
return
|
||||
return
|
||||
for(var/obj/item/I in T)
|
||||
unload_mineral(I)
|
||||
limit++
|
||||
if (limit>=10)
|
||||
return
|
||||
+101
-153
@@ -7,8 +7,6 @@
|
||||
icon_state = "coinpress0"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/amt_silver = 0 //amount of silver
|
||||
var/amt_gold = 0 //amount of gold
|
||||
var/amt_diamond = 0
|
||||
@@ -23,63 +21,41 @@
|
||||
var/chosen = "metal" //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
|
||||
if(src.input) break
|
||||
for (var/dir in cardinal)
|
||||
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
|
||||
if(src.output) break
|
||||
processing_objects.Add(src)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
if ( src.input)
|
||||
var/obj/item/stack/sheet/O
|
||||
O = locate(/obj/item/stack/sheet, input.loc)
|
||||
if(O)
|
||||
var/turf/T = get_step(src,input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
amt_gold += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
amt_silver += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
amt_diamond += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
|
||||
amt_plasma += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
amt_uranium += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
amt_iron += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/clown))
|
||||
amt_clown += 100 * O.amount
|
||||
del(O)
|
||||
O.loc = null
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
|
||||
amt_adamantine += 100 * O.amount
|
||||
del(O) //Commented out for now. -Durandan
|
||||
O.loc = null //Commented out for now. -Durandan
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(user as mob) //TODO: Adamantine coins! -Durandan
|
||||
|
||||
var/dat = "<b>Coin Press</b><br>"
|
||||
|
||||
if (!input)
|
||||
dat += text("input connection status: ")
|
||||
dat += text("<b><font color='red'>NOT CONNECTED</font></b><br>")
|
||||
if (!output)
|
||||
dat += text("<br>output connection status: ")
|
||||
dat += text("<b><font color='red'>NOT CONNECTED</font></b><br>")
|
||||
|
||||
dat += text("<br><font color='#ffcc00'><b>Gold inserted: </b>[amt_gold]</font> ")
|
||||
if (chosen == "gold")
|
||||
dat += text("chosen")
|
||||
@@ -149,121 +125,93 @@
|
||||
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
if (src.output)
|
||||
processing = 1;
|
||||
icon_state = "coinpress1"
|
||||
var/obj/item/weapon/moneybag/M
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new/obj/item/weapon/coin/iron(M)
|
||||
amt_iron -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("gold")
|
||||
while(amt_gold > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/gold(M)
|
||||
amt_gold -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("silver")
|
||||
while(amt_silver > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/silver(M)
|
||||
amt_silver -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("diamond")
|
||||
while(amt_diamond > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/diamond(M)
|
||||
amt_diamond -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("plasma")
|
||||
while(amt_plasma > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/plasma(M)
|
||||
amt_plasma -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("uranium")
|
||||
while(amt_uranium > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/uranium(M)
|
||||
amt_uranium -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5)
|
||||
if("clown")
|
||||
while(amt_clown > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/clown(M)
|
||||
amt_clown -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("adamantine")
|
||||
while(amt_adamantine > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/adamantine(M)
|
||||
amt_adamantine -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("mythril")
|
||||
while(amt_adamantine > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
else
|
||||
M = new/obj/item/weapon/moneybag(output.loc)
|
||||
new /obj/item/weapon/coin/mythril(M)
|
||||
amt_mythril -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
icon_state = "coinpress0"
|
||||
processing = 0;
|
||||
coinsToProduce = temp_coins
|
||||
processing = 1;
|
||||
icon_state = "coinpress1"
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/iron)
|
||||
amt_iron -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("gold")
|
||||
while(amt_gold > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/gold)
|
||||
amt_gold -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("silver")
|
||||
while(amt_silver > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/silver)
|
||||
amt_silver -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("diamond")
|
||||
while(amt_diamond > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/diamond)
|
||||
amt_diamond -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("plasma")
|
||||
while(amt_plasma > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/plasma)
|
||||
amt_plasma -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("uranium")
|
||||
while(amt_uranium > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/uranium)
|
||||
amt_uranium -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5)
|
||||
if("clown")
|
||||
while(amt_clown > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/clown)
|
||||
amt_clown -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("adamantine")
|
||||
while(amt_adamantine > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/adamantine)
|
||||
amt_adamantine -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
if("mythril")
|
||||
while(amt_adamantine > 0 && coinsToProduce > 0)
|
||||
create_coins(/obj/item/weapon/coin/mythril)
|
||||
amt_mythril -= 20
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5);
|
||||
icon_state = "coinpress0"
|
||||
processing = 0;
|
||||
coinsToProduce = temp_coins
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins(var/P)
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
var/obj/item/O = new P(src)
|
||||
var/obj/item/weapon/moneybag/M = locate(/obj/item/weapon/moneybag/, T)
|
||||
if(!M)
|
||||
M = new /obj/item/weapon/moneybag(src)
|
||||
unload_mineral(M)
|
||||
O.loc = M
|
||||
|
||||
@@ -179,27 +179,30 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Follow" // "Haunt"
|
||||
set desc = "Follow and haunt a mob."
|
||||
|
||||
if(istype(usr, /mob/dead/observer))
|
||||
var/list/mobs = getmobs()
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
if(target && target != usr)
|
||||
following = target
|
||||
spawn(0)
|
||||
var/turf/pos = get_turf(src)
|
||||
while(src.loc == pos)
|
||||
var/list/mobs = getmobs()
|
||||
var/input = input("Please, select a mob!", "Haunt", null, null) as null|anything in mobs
|
||||
var/mob/target = mobs[input]
|
||||
ManualFollow(target)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
break
|
||||
if(following != target)
|
||||
break
|
||||
if(!client)
|
||||
break
|
||||
src.loc = T
|
||||
pos = src.loc
|
||||
sleep(15)
|
||||
following = null
|
||||
// This is the ghost's follow verb with an argument
|
||||
/mob/dead/observer/proc/ManualFollow(var/atom/movable/target)
|
||||
if(target && target != src)
|
||||
if(following && following == target)
|
||||
return
|
||||
following = target
|
||||
src << "\blue Now following [target]"
|
||||
spawn(0)
|
||||
var/turf/pos = get_turf(src)
|
||||
while(loc == pos && target && following == target && client)
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
break
|
||||
// To stop the ghost flickering.
|
||||
if(loc != T)
|
||||
loc = T
|
||||
pos = loc
|
||||
sleep(15)
|
||||
following = null
|
||||
|
||||
|
||||
/mob/dead/observer/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
|
||||
|
||||
@@ -28,14 +28,8 @@
|
||||
if(!gibbed)
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD
|
||||
|
||||
//For ninjas exploding when they die./N
|
||||
if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized )
|
||||
src << browse(null, "window=spideros")//Just in case.
|
||||
var/location = loc
|
||||
explosion(location, 1, 2, 3, 4)
|
||||
|
||||
update_canmove()
|
||||
if(client) blind.layer = 0
|
||||
if(client) blind.layer = 0
|
||||
|
||||
tod = worldtime2text() //weasellos time of death patch
|
||||
if(mind) mind.store_memory("Time of death: [tod]", 0)
|
||||
|
||||
@@ -136,7 +136,7 @@ emp_act
|
||||
O.show_message(text("\blue [user] has fixed some of the dents on [src]'s [affecting.getDisplayName()]!"), 1) //Tell everyone [src]'s limb (by its real name) has been repaired
|
||||
return //So we don't attack them as well
|
||||
else
|
||||
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condidtion</span>"
|
||||
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condition</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='warning'>Need more welding fuel!</span>"
|
||||
@@ -154,7 +154,7 @@ emp_act
|
||||
O.show_message(text("\blue [user] has fixed some of the burnt wires on [src]'s [affecting.getDisplayName()]!"), 1)
|
||||
return //So we don't attack them as well
|
||||
else
|
||||
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condidtion</span>"
|
||||
user << "<span class='notice'>[src]'s [affecting.getDisplayName()] is already in good condition</span>"
|
||||
return
|
||||
|
||||
//-------------------- End of Cyber limb stuff ---------------------\\
|
||||
|
||||
@@ -114,3 +114,6 @@
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
return 1//Humans can use guns and such
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
@@ -1,4 +1,3 @@
|
||||
//Lallander was here
|
||||
/mob/living/carbon/human/whisper(message as text)
|
||||
|
||||
if(!IsVocal())
|
||||
@@ -24,16 +23,12 @@
|
||||
return
|
||||
|
||||
|
||||
if (src.stat == 2)
|
||||
if (src.stat == DEAD)
|
||||
return src.say_dead(message)
|
||||
|
||||
if (src.stat)
|
||||
return
|
||||
|
||||
var/alt_name = ""
|
||||
if (istype(src, /mob/living/carbon/human) && src.name != GetVoice())
|
||||
var/mob/living/carbon/human/H = src
|
||||
alt_name = " (as [H.get_id_name("Unknown")])"
|
||||
if (src.name != GetVoice())
|
||||
alt_name = " (as [get_id_name("Unknown")])"
|
||||
// Mute disability
|
||||
if (src.sdisabilities & MUTE)
|
||||
return
|
||||
@@ -41,6 +36,24 @@
|
||||
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return
|
||||
|
||||
var/whispers = "whispers"
|
||||
|
||||
|
||||
var/critical = InCritical()
|
||||
|
||||
// We are unconscious but not in critical, so don't allow them to whisper.
|
||||
if(stat == UNCONSCIOUS && !critical)
|
||||
return
|
||||
|
||||
// If whispering your last words, limit the whisper based on how close you are to death.
|
||||
if(critical)
|
||||
var/health_diff = round(-config.health_threshold_dead + health)
|
||||
// If we cut our message short, abruptly end it with a-..
|
||||
var/message_len = length(message)
|
||||
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
|
||||
message = Ellipsis(message, 10, 1)
|
||||
whispers = "whispers in their final breath"
|
||||
|
||||
var/italics = 1
|
||||
var/message_range = 1
|
||||
|
||||
@@ -57,7 +70,8 @@
|
||||
|
||||
var/list/listening = hearers(message_range, src)
|
||||
listening -= src
|
||||
listening += src
|
||||
if(!critical)
|
||||
listening += src
|
||||
var/list/eavesdropping = hearers(2, src)
|
||||
eavesdropping -= src
|
||||
eavesdropping -= listening
|
||||
@@ -79,9 +93,9 @@
|
||||
|
||||
for (var/mob/M in watching)
|
||||
if (M.say_understands(src))
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> whispers something.</span>"
|
||||
rendered = "<span class='game say'><span class='name'>[src.name]</span> [whispers] something.</span>"
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers] something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (length(heard_a))
|
||||
@@ -90,7 +104,7 @@
|
||||
if (italics)
|
||||
message_a = "<i>[message_a]</i>"
|
||||
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_a]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message_a]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_a)
|
||||
M.show_message(rendered, 2)
|
||||
@@ -106,7 +120,7 @@
|
||||
if (italics)
|
||||
message_b = "<i>[message_b]</i>"
|
||||
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers, <span class='message'>\"[message_b]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers], <span class='message'>\"[message_b]\"</span></span>"
|
||||
|
||||
for (var/mob/M in heard_b)
|
||||
M.show_message(rendered, 2)
|
||||
@@ -115,18 +129,24 @@
|
||||
if (M.say_understands(src))
|
||||
var/message_c
|
||||
message_c = stars(message)
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message_c]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message_c]\"</span></span>"
|
||||
M.show_message(rendered, 2)
|
||||
else
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> whispers something.</span>"
|
||||
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [whispers] something.</span>"
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
if (italics)
|
||||
message = "<i>[message]</i>"
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] whispers, <span class='message'>\"[message]\"</span></span>"
|
||||
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message]\"</span></span>"
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if (!(M.client))
|
||||
continue
|
||||
if (M.stat > 1 && !(M in heard_a))
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
// We whispered our final breath, now we die and show the message you have sent
|
||||
// since it might have been cut off and it would be annoying not being able to know.
|
||||
if(critical)
|
||||
src << rendered
|
||||
succumb(1)
|
||||
|
||||
@@ -5,15 +5,19 @@
|
||||
cur_area.mob_activate(src)
|
||||
|
||||
|
||||
/mob/living/verb/succumb()
|
||||
/mob/living/verb/succumb(var/whispered as null)
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
src.attack_log += "[src] has succumbed to death with [health] points of health!"
|
||||
if (InCritical())
|
||||
src.attack_log += "[src] has [whispered ? "whispered his final words" : "succumbed to death"] with [round(health, 0.1)] points of health!"
|
||||
src.adjustOxyLoss(src.health + 200)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
if(!whispered)
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
death()
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/ex_act(severity)
|
||||
if(client && !blinded)
|
||||
flick("flash", src.flash)
|
||||
@@ -559,4 +563,4 @@
|
||||
|
||||
|
||||
/mob/living/proc/get_visible_name()
|
||||
return name
|
||||
return name
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
if(client)
|
||||
client.screen -= O
|
||||
contents -= O
|
||||
if(module)
|
||||
O.loc = module //Return item to module so it appears in its contents, so it can be taken out again.
|
||||
|
||||
if(module_active == O)
|
||||
module_active = null
|
||||
@@ -37,6 +39,36 @@
|
||||
inv3.icon_state = "inv3"
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/robot/proc/activate_module(var/obj/item/O)
|
||||
if(!(locate(O) in src.module.modules) && O != src.module.emag)
|
||||
return
|
||||
if(activated(O))
|
||||
src << "<span class='notice'>Already activated</span>"
|
||||
return
|
||||
if(!module_state_1)
|
||||
module_state_1 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv1.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
else if(!module_state_2)
|
||||
module_state_2 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv2.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
else if(!module_state_3)
|
||||
module_state_3 = O
|
||||
O.layer = 20
|
||||
O.screen_loc = inv3.screen_loc
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
else
|
||||
src << "<span class='notice'>You need to disable a module first!</span>"
|
||||
|
||||
/mob/living/silicon/robot/proc/uneq_active()
|
||||
uneq_module(module_active)
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
var/obj/screen/inv2 = null
|
||||
var/obj/screen/inv3 = null
|
||||
|
||||
var/shown_robot_modules = 0 //Used to determine whether they have the module menu shown or not
|
||||
var/obj/screen/robot_modules_background
|
||||
|
||||
//3 Modules can be activated at any one time.
|
||||
var/obj/item/weapon/robot_module/module = null
|
||||
var/module_active = null
|
||||
@@ -67,6 +70,10 @@
|
||||
|
||||
wires = new(src)
|
||||
|
||||
robot_modules_background = new()
|
||||
robot_modules_background.icon_state = "block"
|
||||
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
|
||||
|
||||
ident = rand(1, 999)
|
||||
updatename("Default")
|
||||
updateicon()
|
||||
@@ -863,31 +870,7 @@
|
||||
|
||||
if (href_list["act"])
|
||||
var/obj/item/O = locate(href_list["act"])
|
||||
if(!(locate(O) in src.module.modules) && O != src.module.emag)
|
||||
return
|
||||
if(activated(O))
|
||||
src << "Already activated"
|
||||
return
|
||||
if(!module_state_1)
|
||||
module_state_1 = O
|
||||
O.layer = 20
|
||||
contents += O
|
||||
if(istype(module_state_1,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_1:sight_mode
|
||||
else if(!module_state_2)
|
||||
module_state_2 = O
|
||||
O.layer = 20
|
||||
contents += O
|
||||
if(istype(module_state_2,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_2:sight_mode
|
||||
else if(!module_state_3)
|
||||
module_state_3 = O
|
||||
O.layer = 20
|
||||
contents += O
|
||||
if(istype(module_state_3,/obj/item/borg/sight))
|
||||
sight_mode |= module_state_3:sight_mode
|
||||
else
|
||||
src << "You need to disable a module first!"
|
||||
activate_module(O)
|
||||
installed_modules()
|
||||
|
||||
if (href_list["deact"])
|
||||
|
||||
@@ -2,16 +2,19 @@
|
||||
/mob/living/simple_animal/cat
|
||||
name = "cat"
|
||||
desc = "Kitty!!"
|
||||
icon_state = "cat"
|
||||
icon_living = "cat"
|
||||
icon_dead = "cat_dead"
|
||||
speak = list("Meow!","Esp!","Purr!","HSSSSS")
|
||||
icon_state = "cat2"
|
||||
icon_living = "cat2"
|
||||
icon_dead = "cat2_dead"
|
||||
gender = MALE
|
||||
speak = list("Meow!", "Esp!", "Purr!", "HSSSSS")
|
||||
speak_emote = list("purrs", "meows")
|
||||
emote_hear = list("meows","mews")
|
||||
emote_hear = list("meows", "mews")
|
||||
emote_see = list("shakes its head", "shivers")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
species = /mob/living/simple_animal/cat
|
||||
childtype = /mob/living/simple_animal/cat/kitten
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
@@ -21,6 +24,10 @@
|
||||
/mob/living/simple_animal/cat/Runtime
|
||||
name = "Runtime"
|
||||
desc = "GCAT"
|
||||
icon_state = "cat"
|
||||
icon_living = "cat"
|
||||
icon_dead = "cat_dead"
|
||||
gender = FEMALE
|
||||
var/turns_since_scan = 0
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
|
||||
@@ -38,6 +45,8 @@
|
||||
|
||||
..()
|
||||
|
||||
make_babies()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 5)
|
||||
@@ -55,4 +64,15 @@
|
||||
break
|
||||
if(movement_target)
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
walk_to(src,movement_target,0,3)
|
||||
|
||||
/mob/living/simple_animal/cat/Proc
|
||||
name = "Proc"
|
||||
|
||||
/mob/living/simple_animal/cat/kitten
|
||||
name = "kitten"
|
||||
desc = "D'aaawwww"
|
||||
icon_state = "kitten"
|
||||
icon_living = "kitten"
|
||||
icon_dead = "kitten_dead"
|
||||
gender = NEUTER
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "corgi"
|
||||
icon_living = "corgi"
|
||||
icon_dead = "corgi_dead"
|
||||
gender = MALE
|
||||
speak = list("YAP", "Woof!", "Bark!", "AUUUUUU")
|
||||
speak_emote = list("barks", "woofs")
|
||||
emote_hear = list("barks", "woofs", "yaps","pants")
|
||||
@@ -18,6 +19,8 @@
|
||||
response_disarm = "bops"
|
||||
response_harm = "kicks"
|
||||
see_in_dark = 5
|
||||
childtype = /mob/living/simple_animal/corgi/puppy
|
||||
species = /mob/living/simple_animal/corgi
|
||||
var/obj/item/inventory_head
|
||||
var/obj/item/inventory_back
|
||||
var/facehugger
|
||||
@@ -482,28 +485,9 @@
|
||||
/mob/living/simple_animal/corgi/Lisa/Life()
|
||||
..()
|
||||
|
||||
make_babies()
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
turns_since_scan++
|
||||
if(turns_since_scan > 15)
|
||||
turns_since_scan = 0
|
||||
var/alone = 1
|
||||
var/ian = 0
|
||||
for(var/mob/M in oviewers(7, src))
|
||||
if(istype(M, /mob/living/simple_animal/corgi/Ian))
|
||||
if(M.client)
|
||||
alone = 0
|
||||
break
|
||||
else
|
||||
ian = M
|
||||
else
|
||||
alone = 0
|
||||
break
|
||||
if(alone && ian && puppies < 4)
|
||||
if(near_camera(src) || near_camera(ian))
|
||||
return
|
||||
new /mob/living/simple_animal/corgi/puppy(loc)
|
||||
|
||||
|
||||
if(prob(1))
|
||||
emote(pick("dances around","chases her tail"))
|
||||
spawn(0)
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
|
||||
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
|
||||
|
||||
//Hot simple_animal baby making vars
|
||||
var/childtype = null
|
||||
var/scan_ready = 1
|
||||
var/species //Sorry, no spider+corgi buttbabies.
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
verbs -= /mob/verb/observe
|
||||
@@ -481,4 +486,27 @@
|
||||
|
||||
/mob/living/simple_animal/revive()
|
||||
health = maxHealth
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/proc/make_babies() // <3 <3 <3
|
||||
if(gender != FEMALE || stat || !scan_ready || !childtype || !species)
|
||||
return
|
||||
scan_ready = 0
|
||||
spawn(400)
|
||||
scan_ready = 1
|
||||
var/alone = 1
|
||||
var/mob/living/simple_animal/partner
|
||||
var/children = 0
|
||||
for(var/mob/M in oview(7, src))
|
||||
if(istype(M, childtype)) //Check for children FIRST.
|
||||
children++
|
||||
else if(istype(M, species))
|
||||
if(M.client)
|
||||
continue
|
||||
else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_;
|
||||
partner = M
|
||||
else if(istype(M, /mob/))
|
||||
alone = 0
|
||||
continue
|
||||
if(alone && partner && children < 3)
|
||||
new childtype(loc)
|
||||
|
||||
@@ -44,4 +44,7 @@
|
||||
client.eye = src
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
if(isobj(loc))
|
||||
var/obj/Loc=loc
|
||||
Loc.on_log()
|
||||
|
||||
|
||||
@@ -30,4 +30,8 @@
|
||||
send2irc("Server", "[cheesy_message]")
|
||||
..()
|
||||
|
||||
if(isobj(loc))
|
||||
var/obj/Loc=loc
|
||||
Loc.on_log()
|
||||
|
||||
return 1
|
||||
@@ -166,4 +166,4 @@
|
||||
var/robot_talk_understand = 0
|
||||
var/alien_talk_understand = 0
|
||||
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
var/turf/listed_turf = null //the current turf being examined in the stat panel
|
||||
@@ -278,6 +278,10 @@
|
||||
icon_state = null
|
||||
gender = MALE
|
||||
|
||||
parted
|
||||
name = "Side Part"
|
||||
icon_state = "hair_part"
|
||||
|
||||
/////////////////////////////
|
||||
// Facial Hair Definitions //
|
||||
/////////////////////////////
|
||||
|
||||
@@ -716,10 +716,6 @@
|
||||
|
||||
var/turf/target
|
||||
|
||||
if(T.density) // dense ouput turf, so stop holder
|
||||
H.active = 0
|
||||
H.loc = src
|
||||
return
|
||||
if(istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||
var/turf/simulated/floor/F = T
|
||||
//F.health = 100
|
||||
@@ -742,8 +738,6 @@
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.throw_at(target, 100, 1)
|
||||
H.vent_gas(T)
|
||||
del(H)
|
||||
|
||||
else // no specified direction, so throw in random direction
|
||||
|
||||
@@ -757,10 +751,8 @@
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.throw_at(target, 5, 1)
|
||||
|
||||
H.vent_gas(T) // all gas vent to turf
|
||||
del(H)
|
||||
|
||||
H.vent_gas(T)
|
||||
del(H)
|
||||
return
|
||||
|
||||
// call to break the pipe
|
||||
|
||||
@@ -219,105 +219,107 @@
|
||||
var/start_flush = 0
|
||||
var/c_mode = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
/obj/machinery/disposal/deliveryChute/New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
interact()
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/interact()
|
||||
return
|
||||
|
||||
update()
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/update()
|
||||
return
|
||||
|
||||
Bumped(var/atom/movable/AM) //Go straight into the chute
|
||||
if(istype(AM, /obj/item/projectile)) return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
if(AM.loc.y != loc.y+1) return
|
||||
if(EAST)
|
||||
if(AM.loc.x != loc.x+1) return
|
||||
if(SOUTH)
|
||||
if(AM.loc.y != loc.y-1) return
|
||||
if(WEST)
|
||||
if(AM.loc.x != loc.x-1) return
|
||||
|
||||
if(istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
O.loc = src
|
||||
else if(istype(AM, /mob))
|
||||
var/mob/M = AM
|
||||
M.loc = src
|
||||
flush()
|
||||
/obj/machinery/disposal/deliveryChute/Bumped(var/atom/movable/AM) //Go straight into the chute
|
||||
if(istype(AM, /obj/item/projectile)) return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
if(AM.loc.y != loc.y+1) return
|
||||
if(EAST)
|
||||
if(AM.loc.x != loc.x+1) return
|
||||
if(SOUTH)
|
||||
if(AM.loc.y != loc.y-1) return
|
||||
if(WEST)
|
||||
if(AM.loc.x != loc.x-1) return
|
||||
|
||||
if(istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
O.loc = src
|
||||
else if(istype(AM, /mob))
|
||||
var/mob/M = AM
|
||||
M.loc = src
|
||||
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.
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/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/structure/bigDelivery/O in src)
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0) //This auto-sorts package wrapped objects to disposals
|
||||
O.sortTag = 1 //Cargo techs can do this themselves with their taggers
|
||||
for(var/obj/item/smallDelivery/O in src) //With this disabled packages will loop back round and come out the mail chute
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1 */
|
||||
if(deliveryCheck == 0)
|
||||
H.destinationTag = 1
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0) //This auto-sorts package wrapped objects to disposals
|
||||
O.sortTag = 1 //Cargo techs can do this themselves with their taggers
|
||||
for(var/obj/item/smallDelivery/O in src) //With this disabled packages will loop back round and come out the mail chute
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1 */
|
||||
if(deliveryCheck == 0)
|
||||
H.destinationTag = 1
|
||||
|
||||
air_contents = new() // new empty gas resv.
|
||||
sleep(10)
|
||||
if((start_flush + 15) < world.time)
|
||||
start_flush = world.time
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
sleep(5) // wait for animation to finish
|
||||
|
||||
sleep(10)
|
||||
if((start_flush + 15) < world.time)
|
||||
start_flush = world.time
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
sleep(5) // wait for animation to finish
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
air_contents = new() // new empty gas resv.
|
||||
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
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
|
||||
|
||||
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()
|
||||
/obj/machinery/disposal/deliveryChute/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!I || !user)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(!I || !user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(c_mode==0)
|
||||
c_mode=1
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the screws around the power connection.</span>"
|
||||
return
|
||||
else if(c_mode==1)
|
||||
c_mode=0
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You attach the screws around the power connection.</span>"
|
||||
return
|
||||
else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start slicing the floorweld off the delivery chute.</span>"
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "<span class='notice'>You sliced the floorweld off the delivery chute.</span>"
|
||||
var/obj/structure/disposalconstruct/C = new (loc)
|
||||
C.ptype = 8 // 8 = Delivery chute
|
||||
C.update()
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(c_mode==0)
|
||||
c_mode=1
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the screws around the power connection.</span>"
|
||||
return
|
||||
else if(c_mode==1)
|
||||
c_mode=0
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You attach the screws around the power connection.</span>"
|
||||
return
|
||||
else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start slicing the floorweld off the delivery chute.</span>"
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "<span class='notice'>You sliced the floorweld off the delivery chute.</span>"
|
||||
var/obj/structure/disposalconstruct/C = new (loc)
|
||||
C.ptype = 8 // 8 = Delivery chute
|
||||
C.update()
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/process()
|
||||
return PROCESS_KILL
|
||||
@@ -11,7 +11,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
name = "Destructive Analyzer"
|
||||
icon_state = "d_analyzer"
|
||||
var/obj/item/weapon/loaded_item = null
|
||||
var/decon_mod = 1
|
||||
var/decon_mod = 0
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/New()
|
||||
..()
|
||||
@@ -24,7 +24,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/weapon/stock_parts/S in src)
|
||||
for(var/obj/item/weapon/stock_parts/S in component_parts)
|
||||
T += S.rating
|
||||
decon_mod = T
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ research holder datum.
|
||||
if(temp_tech[T] - 1 >= known_tech[T])
|
||||
for(var/datum/design/D in known_designs)
|
||||
if(D.req_tech[T])
|
||||
D.reliability = min(100, D.reliability + prob(35))
|
||||
D.reliability = min(100, D.reliability + 1)
|
||||
if(D.build_path == I.type)
|
||||
D.reliability = min(100, D.reliability + rand(1,3))
|
||||
if(I.crit_fail)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
continue
|
||||
|
||||
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
|
||||
|
||||
if(affecting.status == ORGAN_ROBOTIC) //Cannot operate on Robotic organs - RR
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user