merging upstream master into local repo

This commit is contained in:
VistaPOWA
2014-01-11 17:14:48 +01:00
95 changed files with 2646 additions and 2416 deletions
+13 -10
View File
@@ -120,7 +120,7 @@
screen_loc = "NORTH,WEST+2"
var/varholder = "name"
var/valueholder = "derp"
var/objholder = "/obj/structure/closet"
var/objholder = /obj/structure/closet
Click(location, control, params)
var/list/pa = params2list(params)
@@ -145,14 +145,13 @@
if(1)
return 1
if(2)
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
var/P = text2path(objholder)
var/list/removed_paths = list("/obj/effect/bhole")
if((objholder in removed_paths) || !ispath(P))
objholder = "/obj/structure/closet"
objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
if(!ispath(objholder))
objholder = /obj/structure/closet
alert("That path is not allowed.")
else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
objholder = "/obj/structure/closet"
else
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
@@ -236,8 +235,12 @@
WIN.dir = NORTHWEST
if(2)
if(pa.Find("left"))
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
if(ispath(holder.buildmode.objholder,/turf))
var/turf/T = get_turf(object)
T.ChangeTurf(holder.buildmode.objholder)
else
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
else if(pa.Find("right"))
if(isobj(object)) del(object)
+3 -3
View File
@@ -47,7 +47,8 @@
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
#define ui_borg_store "CENTER+1:16,SOUTH:5" //borgs
#define ui_borg_module "CENTER+1:16,SOUTH:5"
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
#define ui_monkey_mask "CENTER-3:14,SOUTH:5" //monkey
#define ui_monkey_back "CENTER-2:15,SOUTH:5" //monkey
@@ -63,8 +64,7 @@
#define ui_zonesel "EAST-1:28,SOUTH:5"
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
#define ui_borg_pull "EAST-3:24,SOUTH+1:7"
#define ui_borg_module "EAST-2:26,SOUTH+1:7"
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_panel "EAST-1:28,SOUTH+1:7"
//Upper-middle right (damage indicators)
+63 -1
View File
@@ -137,7 +137,69 @@
mymob.client.screen = null
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += list(mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += adding + other
return
/datum/hud/proc/toggle_show_robot_modules()
if(!isrobot(mymob)) return
var/mob/living/silicon/robot/r = mymob
r.shown_robot_modules = !r.shown_robot_modules
update_robot_modules_display()
/datum/hud/proc/update_robot_modules_display()
if(!isrobot(mymob)) return
var/mob/living/silicon/robot/r = mymob
if(r.shown_robot_modules)
//Modules display is shown
r.client.screen += r.throw_icon //"store" icon
if(!r.module)
usr << "<span class='danger'>No module selected</span>"
return
if(!r.module.modules)
usr << "<span class='danger'>Selected module has no modules to select</span>"
return
if(!r.robot_modules_background)
return
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
r.client.screen += r.robot_modules_background
var/x = -4 //Start at CENTER-4,SOUTH+1
var/y = 1
for(var/atom/movable/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen += A
if(x < 0)
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
A.layer = 20
x++
if(x == 4)
x = -4
y++
else
//Modules display is hidden
r.client.screen -= r.throw_icon //"store" icon
for(var/atom/A in r.module.modules)
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A
r.shown_robot_modules = 0
r.client.screen -= r.robot_modules_background
+9 -5
View File
@@ -263,10 +263,12 @@
usr.drop_item_v()
if("module")
if(issilicon(usr))
if(usr:module)
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
if(R.module)
R.hud_used.toggle_show_robot_modules()
return 1
usr:pick_module()
R.pick_module()
if("radio")
if(issilicon(usr))
@@ -276,8 +278,10 @@
usr:installed_modules()
if("store")
if(issilicon(usr))
usr:uneq_active()
if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
R.uneq_active()
R.hud_used.update_robot_modules_display()
if("module1")
if(istype(usr, /mob/living/silicon/robot))
-21
View File
@@ -52,27 +52,6 @@
// Not all of them require checking, see below
A.attack_ghost(src)
// This is the ghost's follow verb with an argument
/mob/dead/observer/proc/ManualFollow(var/atom/target)
following = target
if(target)
src << "\blue Now following [target]"
spawn(0)
var/turf/pos = get_turf(src)
while(loc == pos && target && following == target)
var/turf/T = get_turf(target)
if(!T)
break
if(following != target)
break
if(!client)
break
loc = T
pos = loc
sleep(15)
following = null
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user as mob)
if(user.client && user.client.inquisitive_ghost)
@@ -40,7 +40,10 @@ Bonus
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/parts = H.get_damaged_organs(1,1) //1,1 because it needs inputs.
var/list/parts = H.get_damaged_organs(1,1) //1,1 because it needs inputs.
if(!parts.len)
return
for(var/obj/item/organ/limb/L in parts)
L.heal_damage(get_damage, get_damage, 0)
@@ -49,6 +52,8 @@ Bonus
if(M.getFireLoss() > 0 || M.getBruteLoss() > 0)
M.adjustFireLoss(-get_damage)
M.adjustBruteLoss(-get_damage)
else
return
M.adjustToxLoss(get_damage)
return 1
@@ -35,7 +35,7 @@ Bonus
/datum/symptom/heal/proc/Heal(var/mob/living/M, var/datum/disease/advance/A)
var/get_damage = rand(1, 2)
var/get_damage = rand(8, 14)
M.adjustToxLoss(-get_damage)
return 1
@@ -119,4 +119,4 @@ Bonus
A.cure()
/datum/symptom/heal/longevity/Start(var/datum/disease/advance/A)
longevity = rand(initial(longevity) - 5, initial(longevity) + 5)
longevity = rand(initial(longevity) - 5, initial(longevity) + 5)
@@ -30,8 +30,8 @@ Bonus
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
M << "<span class='notice'>[pick("Your lungs feel sore.", "You are now breathing manually.")]</span>"
M << "<span class='notice'>[pick("Your lungs feel great.", "You are now breathing manually.", "You don't feel the need to breathe.")]</span>"
else
if (M.reagents.get_reagent_amount("inaprovaline") < 30)
M.reagents.add_reagent("inaprovaline", 10)
return
if (M.reagents.get_reagent_amount("dexalin") < 40)
M.reagents.add_reagent("dexalin", 20)
return
+5 -4
View File
@@ -139,9 +139,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
sleep(1)
charge_counter++
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1) //if recharge is started is important for the trigger spells
/obj/effect/proc_holder/spell/proc/perform(list/targets, recharge = 1, mob/user = usr) //if recharge is started is important for the trigger spells
before_cast(targets)
invocation()
user.attack_log += text("\[[time_stamp()]\] <font color='red'>[user.real_name] ([user.ckey]) cast the spell [name].</font>")
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
@@ -183,11 +184,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(smoke_spread)
if(smoke_spread == 1)
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
smoke.set_up(smoke_amt, 0, location, smoke_amt == 1 ? 15 : 0) // if more than one smoke, spread it around
smoke.start()
else if(smoke_spread == 2)
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
smoke.set_up(smoke_amt, 0, location) //no idea what the 0 is
smoke.set_up(smoke_amt, 0, location, smoke_amt == 1 ? 15 : 0) // same here
smoke.start()
/obj/effect/proc_holder/spell/proc/cast(list/targets)
@@ -257,7 +258,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
//Adds a safety check post-input to make sure those targets are actually in range.
var/mob/M = input("Choose the target for the spell.", "Targeting") as mob in possible_targets
if(M in view_or_range(range, user, selection_type)) targets += M
else
var/list/possible_targets = list()
for(var/mob/living/target in view_or_range(range, user, selection_type))
+1 -1
View File
@@ -67,4 +67,4 @@
summon_type = list(/obj/machinery/bot/ed209)
summon_amt = 10
range = 3
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
newVars = list("emagged" = 2,"name" = "Wizard's Justicebot")
+2 -1
View File
@@ -31,4 +31,5 @@
if(!picked || !isturf(picked))
return
target.loc = picked
if(!target.Move(picked))
target.loc = picked
+1 -1
View File
@@ -107,7 +107,7 @@
smoke_spread = 1
smoke_amt = 10
smoke_amt = 1
inner_tele_radius = 0
outer_tele_radius = 6
+3 -1
View File
@@ -684,11 +684,13 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 50
containertype = /obj/structure/closet/critter/corgi
containername = "corgi crate"
/datum/supply_packs/organic/cat
name = "Cat crate"
cost = 40
cost = 50 //Cats are worth as much as corgis.
containertype = /obj/structure/closet/critter/cat
containername = "cat crate"
/datum/supply_packs/organic/pug
name = "Pug crate"
cost = 50
+2
View File
@@ -386,6 +386,7 @@ var/list/uplink_items = list()
You can wrench the bomb down to prevent removal. The crew may attempt to defuse the bomb."
item = /obj/item/device/sbeacondrop/bomb
cost = 5
excludefrom = list(/datum/game_mode/traitor/double_agents)
/datum/uplink_item/device_tools/syndicate_detonator
name = "Syndicate Detonator"
@@ -393,6 +394,7 @@ var/list/uplink_items = list()
Useful for when speed matters or you wish to synchronize multiple bomb blasts. Be sure to stand clear of the blast radius before using the detonator."
item = /obj/item/device/syndicatedetonator
cost = 1
gamemodes = list(/datum/game_mode/nuclear)
/datum/uplink_item/device_tools/teleporter
name = "Teleporter Circuit Board"
+9 -10
View File
@@ -9,10 +9,15 @@ var/const/WIRE_DELAY = 4 // Raises the timer on pulse, does nothing on cut
var/const/WIRE_PROCEED = 8 // Lowers the timer, explodes if cut while the bomb is active
var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if pulsed while already active, will stop a timer a bomb on cut
/datum/wires/syndicatebomb/CanUse(var/mob/living/L)
var/obj/machinery/syndicatebomb/P = holder
if(P.open_panel)
return 1
return 0
/datum/wires/syndicatebomb/UpdatePulsed(var/index)
var/obj/machinery/syndicatebomb/P = holder
if(P.degutted)
return
switch(index)
if(WIRE_BOOM)
if (P.active)
@@ -38,19 +43,13 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
playsound(P.loc, 'sound/machines/click.ogg', 30, 1)
P.loc.visible_message("\red \icon[holder] You hear the bomb start ticking!")
P.active = 1
if(!P.open_panel) //Needs to exist in case the wire is pulsed with a signaler while the panel is closed
P.icon_state = "syndicate-bomb-active"
else
P.icon_state = "syndicate-bomb-active-wires"
processing_objects.Add(P)
P.icon_state = "[initial(P.icon_state)]-active[P.open_panel ? "-wires" : ""]"
else
P.loc.visible_message("\blue \icon[holder] The bomb seems to hesitate for a moment.")
P.timer += 5
/datum/wires/syndicatebomb/UpdateCut(var/index, var/mended)
var/obj/machinery/syndicatebomb/P = holder
if(P.degutted)
return
switch(index)
if(WIRE_EXPLODE)
if(!mended)
@@ -73,6 +72,6 @@ var/const/WIRE_ACTIVATE = 16 // Will start a bombs timer if pulsed, will hint if
if(WIRE_ACTIVATE)
if (!mended && P.active)
P.loc.visible_message("\blue \icon[holder] The timer stops! The bomb has been defused!")
P.icon_state = "syndicate-bomb-inactive-wires" //no cutting possible with the panel closed
P.icon_state = "[initial(P.icon_state)]-inactive[P.open_panel ? "-wires" : ""]"
P.active = 0
P.defused = 1
+15 -3
View File
@@ -72,8 +72,12 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
html = GetInteractWindow()
if(html)
user.set_machine(holder)
//user << browse(html, "window=wires;size=[window_x]x[window_y]")
//onclose(user, "wires")
else
user.unset_machine()
// No content means no window.
user << browse(null, "window=wires")
return
var/datum/browser/popup = new(user, "wires", holder.name, window_x, window_y)
popup.set_content(html)
popup.set_title_image(user.browse_rsc_icon(holder.icon, holder.icon_state))
@@ -278,4 +282,12 @@ var/const/POWER = 8
/datum/wires/proc/IsAllCut()
if(wires_status == (1 << wire_count) - 1)
return 1
return 0
return 0
//
//Shuffle and Mend
//
/datum/wires/proc/Shuffle()
wires_status = 0
GenerateWires()
+6
View File
@@ -309,6 +309,12 @@
icon_state = "wood_tableparts"
flags = null
/obj/item/weapon/table_parts/wood/poker
name = "poker table parts"
desc = "Keep away from fire, and keep near seedy dealers."
icon_state = "poker_tableparts"
flags = null
/obj/item/weapon/module
icon = 'icons/obj/module.dmi'
icon_state = "std_module"
-3
View File
@@ -70,9 +70,6 @@
src.throwing = 1
if(usr && HULK in usr.mutations)
src.throwing = 2 // really strong throw!
var/dist_x = abs(target.x - src.x)
var/dist_y = abs(target.y - src.y)
var/dx = (target.x > src.x) ? EAST : WEST
+2 -1
View File
@@ -27,7 +27,8 @@ var/bomb_set
if (src.timeleft <= 0)
explode()
else
playsound(loc, 'sound/items/timer.ogg', 5, 0)
var/volume = (timeleft <= 20 ? 30 : 5)
playsound(loc, 'sound/items/timer.ogg', volume, 0)
for(var/mob/M in viewers(1, src))
if ((M.client && M.machine == src))
src.attack_hand(M)
+1
View File
@@ -333,6 +333,7 @@
else
user.spell_list += S
user <<"<span class='notice'>you rapidly read through the arcane book. Suddenly you realize you understand [spellname]!</span>"
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>[user.real_name] ([user.ckey]) learned the spell [spellname] ([S]).</font>")
onlearned(user)
/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user as mob)
+1
View File
@@ -266,6 +266,7 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_srv(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
return 1
+3
View File
@@ -202,6 +202,9 @@ That prevents a few funky behaviors.
switch(choice)
if("AICORE")//AI mob.
var/mob/living/silicon/ai/T = target
if(!T.mind)
U << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
return
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
+3 -2
View File
@@ -23,7 +23,8 @@
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/cards = 2
/obj/item/toy/cards = 2,
/obj/item/toy/nuke = 2
)
/obj/machinery/computer/arcade/New()
@@ -546,4 +547,4 @@
/obj/machinery/computer/arcade/orion_trail/proc/win()
playing = 0
prizevend()
prizevend()
+1 -1
View File
@@ -323,7 +323,7 @@
temp = "<font class='bad'>Clonepod malfunction.</font>"
else if(!config.revival_cloning)
temp = "<font class='bad'>Unable to initiate cloning cycle.</font>"
else if(pod1.growclone(null, C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
temp = "[C.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
records.Remove(C)
if(active_record == C)
+164 -56
View File
@@ -1,7 +1,7 @@
/obj/machinery/syndicatebomb
icon = 'icons/obj/assemblies.dmi'
name = "syndicate bomb"
icon_state = "syndicate-bomb-inactive"
icon_state = "syndicate-bomb"
desc = "A large and menacing device. Can be bolted down with a wrench."
anchored = 0
@@ -14,25 +14,30 @@
var/open_panel = 0 //are the wires exposed?
var/active = 0 //is the bomb counting down?
var/defused = 0 //is the bomb capable of exploding?
var/degutted = 0 //is the bomb even a bomb anymore?
var/obj/item/weapon/bombcore/payload = /obj/item/weapon/bombcore/
var/beepsound = 'sound/items/timer.ogg'
/obj/machinery/syndicatebomb/process()
if(active && !defused && (timer > 0)) //Tick Tock
playsound(loc, 'sound/items/timer.ogg', 5, 0)
var/volume = (timer <= 10 ? 30 : 5) // Tick louder when the bomb is closer to being detonated.
playsound(loc, beepsound, volume, 0)
timer--
if(active && !defused && (timer <= 0)) //Boom
active = 0
timer = 60
processing_objects.Remove(src)
explosion(src.loc,2,5,11, flame_range = 11)
del(src)
update_icon()
if(payload in src)
payload.detonate()
return
if(!active || defused) //Counter terrorists win
processing_objects.Remove(src)
if(defused && payload in src)
payload.defuse()
return
/obj/machinery/syndicatebomb/New()
wires = new(src)
wires = new(src)
payload = new payload(src)
update_icon()
..()
@@ -40,6 +45,8 @@
..()
usr << "A digital display on it reads \"[timer]\"."
/obj/machinery/syndicatebomb/update_icon()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
/obj/machinery/syndicatebomb/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/wrench))
@@ -62,86 +69,103 @@
else if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
if(!active)
icon_state = "syndicate-bomb-inactive[open_panel ? "-wires" : ""]"
else
icon_state = "syndicate-bomb-active[open_panel ? "-wires" : ""]"
update_icon()
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
if(degutted)
user << "<span class='notice'>The wires aren't connected to anything!<span>"
else if(open_panel)
if(open_panel)
wires.Interact(user)
else if(istype(I, /obj/item/weapon/crowbar))
if(open_panel && !degutted && isWireCut(WIRE_BOOM) && isWireCut(WIRE_UNBOLT) && isWireCut(WIRE_DELAY) && isWireCut(WIRE_PROCEED) && isWireCut(WIRE_ACTIVATE))
user << "<span class='notice'>You carefully pry out the bomb's payload.</span>"
degutted = 1
new /obj/item/weapon/syndicatebombcore(user.loc)
if(open_panel && isWireCut(WIRE_BOOM) && isWireCut(WIRE_UNBOLT) && isWireCut(WIRE_DELAY) && isWireCut(WIRE_PROCEED) && isWireCut(WIRE_ACTIVATE))
if(payload)
user << "<span class='notice'>You carefully pry out [payload].</span>"
payload.loc = user.loc
payload = null
else
user << "<span class='notice'>There isn't anything in here to remove!</span>"
else if (open_panel)
user << "<span class='notice'>The wires conneting the shell to the explosives are holding it down!</span>"
else if (degutted)
user << "<span class='notice'>The explosives have already been removed.</span>"
else
user << "<span class='notice'>The cover is screwed on, it won't pry off!</span>"
else if(istype(I, /obj/item/weapon/syndicatebombcore))
if(degutted)
user << "<span class='notice'>You place the payload into the shell.</span>"
degutted = 0
else if(istype(I, /obj/item/weapon/bombcore))
if(!payload)
payload = I
user << "<span class='notice'>You place [payload] into [src].</span>"
user.drop_item()
del(I)
payload.loc = src
else
user << "<span class='notice'>While a double strength bomb would surely be a thing of terrible beauty, there's just no room for it.</span>"
user << "<span class='notice'>[payload] is already loaded into [src], you'll have to remove it first.</span>"
else
..()
/obj/machinery/syndicatebomb/attack_hand(var/mob/user)
if(degutted)
user << "<span class='notice'>The bomb's explosives have been removed, the [open_panel ? "wires" : "buttons"] are useless now.</span>"
else if(anchored)
if(open_panel)
wires.Interact(user)
else if(!active)
settings()
else
interact(user)
/obj/machinery/syndicatebomb/interact(var/mob/user)
if(wires)
wires.Interact(user)
if(!open_panel)
if(!active)
settings(user)
return
else if(anchored)
user << "<span class='notice'>The bomb is bolted to the floor!</span>"
else if(!active)
settings()
return
/obj/machinery/syndicatebomb/proc/settings(var/mob/user)
var/newtime = input(usr, "Please set the timer.", "Timer", "[timer]") as num
var/newtime = input(user, "Please set the timer.", "Timer", "[timer]") as num
newtime = Clamp(newtime, 60, 60000)
if(in_range(src, usr) && isliving(usr)) //No running off and setting bombs from across the station
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
timer = newtime
src.loc.visible_message("\blue \icon[src] timer set for [timer] seconds.")
if(alert(usr,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, usr) && isliving(usr))
if(defused || active || degutted)
if(degutted)
src.loc.visible_message("\blue \icon[src] Device error: Payload missing")
else if(defused)
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
if(defused || active)
if(defused)
src.loc.visible_message("\blue \icon[src] Device error: User intervention required")
return
else
src.loc.visible_message("\red \icon[src] [timer] seconds until detonation, please clear the area.")
playsound(loc, 'sound/machines/click.ogg', 30, 1)
if(!open_panel)
icon_state = "syndicate-bomb-active"
else
icon_state = "syndicate-bomb-active-wires"
active = 1
update_icon()
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
processing_objects.Add(src) //Ticking down
if(payload && !istype(payload, /obj/item/weapon/bombcore/training))
message_admins("[key_name(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> has primed a [name] ([payload]) for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(user)] has primed a [name] ([payload]) for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
/obj/machinery/syndicatebomb/proc/isWireCut(var/index)
return wires.IsIndexCut(index)
/obj/item/weapon/syndicatebombcore
///Bomb Subtypes///
/obj/machinery/syndicatebomb/training
name = "training bomb"
icon_state = "training-bomb"
desc = "A salvaged syndicate device gutted of its explosives to be used as a training aid for aspiring bomb defusers."
payload = /obj/item/weapon/bombcore/training/
/obj/machinery/syndicatebomb/badmin
name = "generic summoning badmin bomb"
desc = "Oh god what is in this thing?"
payload = /obj/item/weapon/bombcore/badmin/summon/
/obj/machinery/syndicatebomb/badmin/clown
name = "clown bomb"
icon_state = "clown-bomb"
desc = "HONK."
payload = /obj/item/weapon/bombcore/badmin/summon/clown
beepsound = 'sound/items/bikehorn.ogg'
/obj/machinery/syndicatebomb/badmin/varplosion
payload = /obj/item/weapon/bombcore/badmin/explosion/
///Bomb Cores///
/obj/item/weapon/bombcore
name = "bomb payload"
desc = "A powerful secondary explosive of syndicate design and unknown composition, it should be stable under normal conditions..."
icon = 'icons/obj/assemblies.dmi'
@@ -150,10 +174,94 @@
w_class = 3.0
origin_tech = "syndicate=6;combat=5"
/obj/item/weapon/syndicatebombcore/ex_act(severity) //Little boom can chain a big boom
explosion(src.loc,2,5,11, flame_range = 11)
/obj/item/weapon/bombcore/ex_act(severity) //Little boom can chain a big boom
src.detonate()
/obj/item/weapon/bombcore/proc/detonate()
explosion(get_turf(src),2,5,11, flame_range = 11)
del(src)
/obj/item/weapon/bombcore/proc/defuse()
//Note: Because of how var/defused is used you shouldn't override this UNLESS you intend to set the var to 0 or
// otherwise remove the core/reset the wires before the end of defuse(). It will repeatedly be called otherwise.
///Bomb Core Subtypes///
/obj/item/weapon/bombcore/training
name = "dummy payload"
desc = "A nanotrasen replica of a syndicate payload. Its not intended to explode but to announce that it WOULD have exploded, then rewire itself to allow for more training."
origin_tech = null
var/defusals = 0
var/attempts = 0
/obj/item/weapon/bombcore/training/proc/reset()
var/obj/machinery/syndicatebomb/holder = src.loc
if(istype(holder))
holder.open_panel = 0
if(holder.wires)
holder.wires.Shuffle()
holder.defused = 0
holder.update_icon()
holder.updateDialog()
/obj/item/weapon/bombcore/training/detonate()
var/obj/machinery/syndicatebomb/holder = src.loc
if(istype(holder))
attempts++
holder.loc.visible_message("\red \icon[holder] Alert: Bomb has detonated. Your score is now [defusals] for [attempts]. Resetting wires...")
reset()
else
del(src)
/obj/item/weapon/bombcore/training/defuse()
var/obj/machinery/syndicatebomb/holder = src.loc
if(istype(holder))
attempts++
defusals++
holder.loc.visible_message("\blue \icon[holder] Alert: Bomb has been defused. Your score is now [defusals] for [attempts]! Resetting wires...")
reset()
/obj/item/weapon/bombcore/badmin
name = "badmin payload"
desc = "If you're seeing this someone has either made a mistake or gotten dangerously savvy with var editing!"
origin_tech = null
/obj/item/weapon/bombcore/badmin/defuse() //because we wouldn't want them being harvested by players
del(src)
/obj/item/weapon/bombcore/badmin/summon/
var/summon_path = /obj/item/weapon/reagent_containers/food/snacks/cookie
var/amt_summon = 1
/obj/item/weapon/bombcore/badmin/summon/detonate()
for(var/i = 0; i < amt_summon; i++)
var/atom/movable/X = new summon_path
X.loc = get_turf(src)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(X, pick(NORTH,SOUTH,EAST,WEST))
del(src)
/obj/item/weapon/bombcore/badmin/summon/clown
summon_path = /mob/living/simple_animal/hostile/retaliate/clown
amt_summon = 100
/obj/item/weapon/bombcore/badmin/summon/clown/defuse()
playsound(src.loc, 'sound/misc/sadtrombone.ogg', 50)
..()
/obj/item/weapon/bombcore/badmin/explosion/
var/HeavyExplosion = 2
var/MediumExplosion = 5
var/LightExplosion = 11
var/Flames = 11
/obj/item/weapon/bombcore/badmin/explosion/detonate()
explosion(get_turf(src),HeavyExplosion,MediumExplosion,LightExplosion, flame_range = Flames)
///Syndicate Detonator (aka the big red button)///
/obj/item/device/syndicatedetonator
name = "big red button"
desc = "Nothing good can come of pressing a button this garish..."
@@ -179,10 +287,10 @@
var/turf/T = get_turf(src)
var/area/A = get_area(T)
detonated--
var/log_str = "[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>."
var/log_str = "[key_name(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>."
bombers += log_str
message_admins(log_str)
log_game("[key_name(usr)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])")
log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name]([T.x],[T.y],[T.z])")
detonated = 0
existant = 0
cooldown = 1
+2 -2
View File
@@ -447,10 +447,10 @@
for(var/datum/design/D in files.known_designs)
if(D.build_type&16)
if(D.category in part_sets)//Checks if it's a valid category
if(add_part_to_set(D.category, text2path(D.build_path)))//Adds it to said category
if(add_part_to_set(D.category, D.build_path))//Adds it to said category
i++
else
if(add_part_to_set("Misc", text2path(D.build_path)))//If in doubt, chunk it into the Misc
if(add_part_to_set("Misc", D.build_path))//If in doubt, chunk it into the Misc
i++
return i
+30 -8
View File
@@ -7,6 +7,19 @@
else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
//var/y1=((Center.y-Dist)<1 ? 1 : Center.y-Dist)
//var/x2=((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist)
//var/y2=((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist)
var/turf/x1y1 = locate(((Center.x-Dist)<1 ? 1 : Center.x-Dist),((Center.y-Dist)<1 ? 1 : Center.y-Dist),Center.z)
var/turf/x2y2 = locate(((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist),((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist),Center.z)
return block(x1y1,x2y2)
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, ignorecap = 0, flame_range = 0)
src = null //so we don't abort once src is deleted
epicenter = get_turf(epicenter)
@@ -86,7 +99,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y
var/z0 = epicenter.z
for(var/turf/T in range(epicenter, max_range))
for(var/turf/T in trange(max_range, epicenter))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
var/flame_dist = 0
var/hotspot_exists
@@ -100,15 +114,19 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
else dist = 0
//------- TURF FIRES -------\\
//------- TURF FIRES -------
if(T)
if(flame_dist && prob(40) && !istype(T, /turf/space))
new/obj/effect/hotspot(T) //Mostly for ambience!
spawn()
new/obj/effect/hotspot(T) //Mostly for ambience!
hotspot_exists = 1
if(dist)
T.ex_act(dist)
spawn()
if(T)
T.ex_act(dist)
//------- THINGS IN TURFS FIRES -------\\
//------- THINGS IN TURFS FIRES -------
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
var/atom/movable/AM = atom_movable
@@ -116,10 +134,14 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
if(AM) //Something is inside T (We have already checked T exists above) - RR
if(flame_dist) //if it has flame distance, run this - RR
if(isliving(AM) && !hotspot_exists && !istype(T, /turf/space))
new /obj/effect/hotspot(AM.loc)
spawn()
if(AM && AM.loc!=null)
new /obj/effect/hotspot(AM.loc)
//Just in case we missed a mob while they were in flame_range, but a hotspot didn't spawn on them, otherwise it looks weird when you just burst into flame out of nowhere
if(dist) //if no flame_dist, run this - RR
AM.ex_act(dist)
spawn()
if(AM)
AM.ex_act(dist)
@@ -145,5 +167,5 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
for(var/turf/tile in trange(range, epicenter))
tile.ex_act(2)
+16 -38
View File
@@ -9,31 +9,12 @@
/obj
var/explosion_resistance
/datum/explosion_turf
var/turf/turf //The turf which will get ex_act called on it
var/max_power //The largest amount of power the turf sustained
New()
..()
max_power = 0
proc/save_power_if_larger(power)
if(power > max_power)
max_power = power
return 1
return 0
var/list/explosion_turfs = list()
var/list/datum/explosion_turf/explosion_turfs = list()
var/explosion_in_progress = 0
proc/get_explosion_turf(var/turf/T)
for( var/datum/explosion_turf/ET in explosion_turfs )
if( T == ET.turf )
return ET
var/datum/explosion_turf/ET = new()
ET.turf = T
explosion_turfs += ET
return ET
proc/explosion_rec(turf/epicenter, power)
@@ -55,9 +36,8 @@ proc/explosion_rec(turf/epicenter, power)
explosion_in_progress = 1
explosion_turfs = list()
var/datum/explosion_turf/ETE = get_explosion_turf()
ETE.turf = epicenter
ETE.max_power = power
explosion_turfs[epicenter] = power
//This steap handles the gathering of turfs which will be ex_act() -ed in the next step. It also ensures each turf gets the maximum possible amount of power dealt to it.
for(var/direction in cardinal)
@@ -65,22 +45,21 @@ proc/explosion_rec(turf/epicenter, power)
T.explosion_spread(power - epicenter.explosion_resistance, direction)
//This step applies the ex_act effects for the explosion, as planned in the previous step.
for( var/datum/explosion_turf/ET in explosion_turfs )
if(ET.max_power <= 0) continue
if(!ET.turf) continue
for(var/turf/T in explosion_turfs)
if(explosion_turfs[T] <= 0) continue
if(!T) continue
//Wow severity looks confusing to calculate... Fret not, I didn't leave you with any additional instructions or help. (just kidding, see the line under the calculation)
var/severity = 4 - round(max(min( 3, ((ET.max_power - ET.turf.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1)
//sanity effective power on tile divided by either 3 or one third the total explosion power
var/severity = 4 - round(max(min( 3, ((explosion_turfs[T] - T.explosion_resistance) / (max(3,(power/3)))) ) ,1), 1) //sanity effective power on tile divided by either 3 or one third the total explosion power
// One third because there are three power levels and I
// want each one to take up a third of the crater
var/x = ET.turf.x
var/y = ET.turf.y
var/z = ET.turf.z
ET.turf.ex_act(severity)
if(!ET.turf)
ET.turf = locate(x,y,z)
for( var/atom/A in ET.turf )
var/x = T.x
var/y = T.y
var/z = T.z
T.ex_act(severity)
if(!T)
T = locate(x,y,z)
for(var/atom/A in T)
A.ex_act(severity)
explosion_in_progress = 0
@@ -126,10 +105,9 @@ proc/explosion_rec(turf/epicenter, power)
new/obj/effect/debugging/marker(src)
*/
var/datum/explosion_turf/ET = get_explosion_turf(src)
if(ET.max_power >= power)
if(explosion_turfs[src] >= power)
return //The turf already sustained and spread a power greated than what we are dealing with. No point spreading again.
ET.max_power = power
explosion_turfs[src] = power
var/spread_power = power - src.explosion_resistance //This is the amount of power that will be spread to the tile in the direction of the blast
var/side_spread_power = power - 2 * src.explosion_resistance //This is the amount of power that will be spread to the side tiles
+8
View File
@@ -117,6 +117,7 @@
/obj/item/attack_hand(mob/user as mob)
if (!user) return
if (istype(src.loc, /obj/item/weapon/storage))
//If the item is in a storage item, take it out
var/obj/item/weapon/storage/S = src.loc
S.remove_from_storage(src)
@@ -171,6 +172,13 @@
return
attack_paw(A)
/obj/item/attack_ai(mob/user as mob)
if (istype(src.loc, /obj/item/weapon/robot_module))
//If the item is part of a cyborg module, equip it
if(!isrobot(user)) return
var/mob/living/silicon/robot/R = user
R.activate_module(src)
R.hud_used.update_robot_modules_display()
// Due to storage type consolidation this should get used more now.
// I have cleaned it up a little, but it could probably use more. -Sayu
@@ -1,4 +1,3 @@
/obj/item/device/laser_pointer
name = "laser pointer"
desc = "Don't shine it in your eyes!"
@@ -10,14 +9,17 @@
slot_flags = SLOT_BELT
m_amt = 500
g_amt = 500
w_class = 1.0
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
origin_tech = "combat=1"
origin_tech = "magnets=2"
var/turf/pointer_loc
var/energy = 5
var/max_energy = 5
var/effectchance = 33
var/recharging = 0
var/recharge_locked = 0
var/obj/item/weapon/stock_parts/micro_laser/diode //used for upgrading!
/obj/item/device/laser_pointer/red
pointer_icon_state = "red_laser"
@@ -30,12 +32,39 @@
/obj/item/device/laser_pointer/New()
..()
diode = new(src)
if(!pointer_icon_state)
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
/obj/item/device/laser_pointer/upgraded/New()
..()
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
/obj/item/device/laser_pointer/attack(mob/living/M, mob/user)
laser_act(M, user)
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
if(!diode)
user.drop_item()
W.loc = src
diode = W
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
else
user << "<span class='notice'>[src] already has a diode installed.</span>"
return
else if(istype(W, /obj/item/weapon/screwdriver))
if(diode)
user << "<span class='notice'>You remove the [diode.name] from the [src].</span>"
diode.loc = get_turf(src.loc)
diode = null
return
..()
return
/obj/item/device/laser_pointer/afterattack(var/atom/target, var/mob/living/user, flag, params)
if(flag) //we're placing the object on a table or in backpack
return
@@ -44,6 +73,9 @@
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user)
if( !(user in (viewers(7,target))) )
return
if (!diode)
user << "<span class='notice'>You point [src] at [target], but nothing happens!</span>"
return
if (!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
return
@@ -72,7 +104,7 @@
var/mob/living/carbon/C = target
//20% chance to actually hit the eyes
if(prob(20))
if(prob(effectchance * diode.rating))
add_logs(user, C, "shone in the eyes", object="laser pointer")
//eye target check
@@ -121,7 +153,7 @@
else if(issilicon(target))
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(20))
if(prob(effectchance * diode.rating))
S.Weaken(rand(5,10))
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
@@ -132,7 +164,7 @@
//cameras
else if(istype(target, /obj/machinery/camera))
var/obj/machinery/camera/C = target
if(prob(20))
if(prob(effectchance * diode.rating))
C.emp_act(1)
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
add_logs(user, C, "EMPed", object="laser pointer")
@@ -173,4 +205,4 @@
energy = max_energy
recharging = 0
recharge_locked = 0
..()
..()
@@ -149,7 +149,7 @@
/obj/item/device/radio/headset/headset_srv
name = "service radio headset"
desc = "Headset used by the foodservice staff, tasked with keeping the station full and happy. To access the service channel, use :v."
desc = "Headset used by the service staff, tasked with keeping the station full, happy and clean. To access the service channel, use :v."
icon_state = "srv_headset"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/headset_service
@@ -265,4 +265,4 @@
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
return
@@ -21,6 +21,7 @@
for(var/mob/O in viewers(M, null))
if (O.client)
O.show_message("\red <B>[user] has prodded [M] with an electrically-charged arm!</B>", 1, "\red You hear someone fall", 2)
add_logs(user, M, "stunned", object="[src.name]", addition="(INTENT: [uppertext(user.a_intent)])")
/obj/item/borg/overdrive
name = "overdrive"
+42 -50
View File
@@ -11,70 +11,62 @@
var/heal_burn = 0
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
var/mob/living/carbon/human/H = M
var/obj/item/organ/limb/affecting = H.get_organ(user.zone_sel.selecting)
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
return
if(affecting.status == ORGAN_ORGANIC) //Limb must be organic to be healed - RR
if (M.stat == 2)
var/t_him = "it"
if (M.gender == MALE)
t_him = "him"
else if (M.gender == FEMALE)
t_him = "her"
user << "\red \The [M] is dead, you cannot help [t_him]!"
return
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
return 1
if (!istype(M))
user << "\red \The [src] cannot be applied to [M]!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
user << "\red You don't have the dexterity to do this!"
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
user << "\red You don't have the dexterity to do this!"
return 1
if (user)
if (M != user)
user.visible_message( \
"\blue [M] has been applied with [src] by [user].", \
"\blue You apply \the [src] to [M]." \
)
else
var/t_himself = "itself"
if (user.gender == MALE)
t_himself = "himself"
else if (user.gender == FEMALE)
t_himself = "herself"
if (user)
if (M != user)
user.visible_message( \
"\blue [M] has been applied with [src] by [user].", \
"\blue You apply \the [src] to [M]." \
)
else
var/t_himself = "itself"
if (user.gender == MALE)
t_himself = "himself"
else if (user.gender == FEMALE)
t_himself = "herself"
user.visible_message( \
"\blue [M] applied [src] on [t_himself].", \
"\blue You apply \the [src] on yourself." \
)
user.visible_message( \
"\blue [M] applied [src] on [t_himself].", \
"\blue You apply \the [src] on yourself." \
)
if (istype(M, /mob/living/carbon/human))
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/user2 = user
affecting = H.get_organ(check_zone(user2.zone_sel.selecting))
else
if(!istype(affecting, /obj/item/organ/limb) || affecting:burn_dam <= 0)
affecting = H.get_organ("head")
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/limb/affecting = H.get_organ(check_zone(user.zone_sel.selecting))
if(affecting.status == ORGAN_ORGANIC) //Limb must be organic to be healed - RR
if (affecting.heal_damage(src.heal_brute, src.heal_burn, 0))
H.update_damage_overlays(0)
M.updatehealth()
else
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
else
user << "<span class='notice'>Medicine won't work on a robotic limb!</span>"
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
use(1)
/obj/item/stack/medical/bruise_pack
+17 -1
View File
@@ -851,7 +851,23 @@ obj/item/toy/singlecard/attack_self(mob/user)
Flip()
/obj/item/toy/nuke
name = "\improper Nuclear Fission Explosive toy"
desc = "A plastic model of a Nuclear Fission Explosive."
icon = 'icons/obj/toy.dmi'
icon_state = "nuketoyidle"
w_class = 2.0
var/cooldown = 0
/obj/item/toy/nuke/attack_self(mob/user)
if (cooldown < world.time)
cooldown = world.time + 3000 //5 minutes
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
spawn(5) //gia said so
icon_state = "nuketoy"
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
sleep(135)
icon_state = "nuketoyidle"
@@ -56,12 +56,40 @@
new /obj/item/stack/sheet/wood( user.loc )
del(src)
if (istype(W, /obj/item/stack/tile/grass))
var/obj/item/stack/tile/grass/Grass = W
if(Grass.amount > 1)
Grass.amount -= 1
else
del(Grass)
new /obj/item/weapon/table_parts/wood/poker( src.loc )
visible_message("<span class='notice'>[user] adds grass to the wooden table parts</span>")
del(src)
/obj/item/weapon/table_parts/wood/attack_self(mob/user as mob)
new /obj/structure/table/woodentable( user.loc )
user.drop_item()
del(src)
return
/*
* Poker Table Parts
*/
/obj/item/weapon/table_parts/wood/poker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/wood( user.loc )
new /obj/item/stack/tile/grass( user.loc )
del(src)
/obj/item/weapon/table_parts/wood/poker/attack_self(mob/user as mob)
new /obj/structure/table/woodentable/poker( user.loc )
user.drop_item()
del(src)
return
/*
* Rack Parts
*/
@@ -6,7 +6,7 @@
item_state = "waterbackpack"
w_class = 4.0
slot_flags = SLOT_BACK
slowdown = 3
slowdown = 1
action_button_name = "Toggle Mister"
var/obj/item/weapon/reagent_containers/glass/mister/noz
+10
View File
@@ -130,3 +130,13 @@
mo.show_message(rendered, 2)
*/
return
//If a mob logouts/logins in side of an object you can use this proc
/obj/proc/on_log()
..()
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
@@ -30,6 +30,9 @@
if(num) //No more matriarchy for cargo
content_mob = /mob/living/simple_animal/corgi/Lisa
new content_mob(loc)
else if(content_mob == /mob/living/simple_animal/cat)
if(prob(50))
content_mob = /mob/living/simple_animal/cat/Proc
else
new content_mob(loc)
already_opened = 1
@@ -48,4 +48,5 @@
new /obj/item/clothing/suit/armor/reactive(src)
new /obj/item/device/flash(src)
new /obj/item/device/laser_pointer(src)
new /obj/item/clothing/under/rank/research_director/alt(src)
return
+32 -4
View File
@@ -10,6 +10,7 @@
* Morgue
*/
/obj/structure/morgue
name = "morgue"
desc = "Used to keep bodies in untill someone fetches them."
@@ -19,14 +20,32 @@
var/obj/structure/m_tray/connected = null
anchored = 1.0
/obj/structure/morgue/on_log()
update()
/obj/structure/morgue/proc/update()
if (src.connected)
src.icon_state = "morgue0"
else
if (src.contents.len)
src.icon_state = "morgue2"
else
if(!src.contents.len)
src.icon_state = "morgue1"
else
src.icon_state = "morgue2"//default dead no-client mob
var/list/compiled = recursive_mob_check(src)//run through contents
if(!length(compiled))//no mobs at all, but objects inside
src.icon_state = "morgue3"
return
for(var/mob/living/M in compiled)
if(M.client)
src.icon_state = "morgue4"//clone that mofo
break
return
/obj/structure/morgue/ex_act(severity)
@@ -185,12 +204,19 @@
if (src.connected)
src.icon_state = "crema0"
else
if (src.contents.len)
if(src.contents.len)
src.icon_state = "crema2"
else
src.icon_state = "crema1"
if(cremating)
src.icon_state = "crema_active"
return
/obj/structure/crematorium/ex_act(severity)
switch(severity)
if(1.0)
@@ -310,6 +336,7 @@
cremating = 1
locked = 1
update()
for(var/mob/living/M in contents)
if (M.stat!=2)
@@ -329,6 +356,7 @@
sleep(30)
cremating = 0
locked = 0
update()
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
return
@@ -7,27 +7,23 @@
icon_state = "nest"
var/health = 100
/obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob)
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
"<span class='notice'>[user.name] pulls you free from the gelatinous resin.</span>",\
"<span class='notice'>You hear squelching...</span>")
buckled_mob.pixel_y = 0
unbuckle()
else
buckled_mob.visible_message(\
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
"<span class='notice'>You hear squelching...</span>")
spawn(1200)
if(user && buckled_mob && user.buckled == src)
buckled_mob.pixel_y = 0
unbuckle()
src.add_fingerprint(user)
return
/obj/structure/stool/bed/nest/unbuckle_other(mob/user as mob)
buckled_mob.visible_message(\
"<span class='notice'>[user.name] pulls [buckled_mob.name] free from the sticky nest!</span>",\
"[user.name] pulls you free from the gelatinous resin.",\
"You hear squelching...")
buckled_mob.pixel_y = 0
unbuckle()
/obj/structure/stool/bed/nest/unbuckle_myself(mob/user as mob)
buckled_mob.visible_message(\
"<span class='warning'>[buckled_mob.name] struggles to break free of the gelatinous resin...</span>",\
"<span class='warning'>You struggle to break free from the gelatinous resin...</span>",\
"You hear squelching...")
spawn(1200)
if(user && buckled_mob && user.buckled == src)
buckled_mob.pixel_y = 0
unbuckle()
/obj/structure/stool/bed/nest/buckle_mob(mob/M as mob, mob/user as mob)
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
@@ -48,19 +48,30 @@
if(buckled_mob)
if(buckled_mob.buckled == src)
if(buckled_mob != user)
buckled_mob.visible_message(\
"\blue [buckled_mob.name] was unbuckled by [user.name]!",\
"You were unbuckled from [src] by [user.name].",\
"You hear metal clanking")
if(!(user.buckled))
unbuckle_other(user)
else
user << "<span class='notice'>You can't reach [src]!</span>"
else
buckled_mob.visible_message(\
"\blue [buckled_mob.name] unbuckled \himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
unbuckle()
unbuckle_myself(user)
src.add_fingerprint(user)
return
/obj/structure/stool/bed/proc/unbuckle_other(mob/user as mob)
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] was unbuckled by [user.name]!</span>",\
"You were unbuckled from [src] by [user.name].",\
"You hear metal clanking.")
unbuckle()
/obj/structure/stool/bed/proc/unbuckle_myself(mob/user as mob)
buckled_mob.visible_message(\
"<span class='notice'>[buckled_mob.name] unbuckled \himself!</span>",\
"You unbuckle yourself from [src].",\
"You hear metal clanking.")
unbuckle()
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
+55 -117
View File
@@ -19,6 +19,7 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
var/parts = /obj/item/weapon/table_parts
/obj/structure/table/New()
..()
@@ -277,9 +278,9 @@
return
/obj/structure/table/attackby(obj/item/W, mob/user)
if (istype(W, /obj/item/weapon/grab) && get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = W
/obj/structure/table/attackby(obj/item/I, mob/user)
if (istype(I, /obj/item/weapon/grab) && get_dist(src, user) < 2)
var/obj/item/weapon/grab/G = I
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
@@ -292,36 +293,59 @@
G.affecting.Weaken(5)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
del(W)
del(I)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user,50))
new /obj/item/weapon/table_parts( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//SN src = null
del(src)
return
if (istype(I, /obj/item/weapon/wrench))
table_destroy(2, user)
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
if(istype(I, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/SS = new /datum/effect/effect/system/spark_spread()
SS.set_up(5, 0, src.loc)
SS.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
new /obj/item/weapon/table_parts( src.loc )
table_destroy(1, user)
user.drop_item(src)
/obj/structure/table/proc/table_destroy(var/destroy_type, var/mob/user as mob)
/*
Destroy type values:
1 = Destruction, Actually destroyed
2 = Deconstruction.
*/
if(destroy_type == 1)
user.visible_message("<span class='notice'>The table was sliced apart by [user]!</span>")
new parts( src.loc )
del(src)
return
user.drop_item(src)
return 1
if(destroy_type == 2)
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
user << "<span class='notice'>Now disassembling the reinforced table</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 50))
new parts( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
else
user << "<span class='notice'>Now disassembling table</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 50))
new parts( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
/*
@@ -331,52 +355,14 @@
name = "wooden table"
desc = "Do not apply fire to this. Rumour says it burns easily."
icon_state = "woodtable"
parts = /obj/item/weapon/table_parts/wood
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "\blue Now disassembling the wooden table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
sleep(50)
new /obj/item/weapon/table_parts/wood( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
new /obj/item/weapon/table_parts/wood( src.loc )
del(src)
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return 1
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
name = "gambling table"
desc = "A seedy table for seedy dealings in seedy places."
icon_state = "pokertable"
parts = /obj/item/weapon/table_parts/wood/poker
/*
* Reinforced tables
@@ -385,27 +371,11 @@
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
icon_state = "reinftable"
parts = /obj/item/weapon/table_parts/reinforced
var/status = 2
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(G.affecting.buckled)
user << "<span class='notice'>[G.affecting] is buckled to [G.affecting.buckled]!</span>"
return
if(G.state < GRAB_AGGRESSIVE)
user << "<span class='notice'>You need a better grip to do that!</span>"
return
if(!G.confirm())
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
del(W)
return
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
@@ -424,40 +394,7 @@
user << "\blue Table strengthened"
src.status = 2
return
if(isrobot(user))
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return
if (istype(W, /obj/item/weapon/wrench))
if(src.status == 1)
user << "\blue Now disassembling the reinforced table"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if (do_after(user, 50))
new /obj/item/weapon/table_parts/reinforced( src.loc )
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
del(src)
return
if(isrobot(user))
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 4))
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
new /obj/item/weapon/table_parts/reinforced( src.loc )
del(src)
return
user.drop_item(src)
//if(W && W.loc) W.loc = src.loc
return 1
..()
/*
* Racks
@@ -562,3 +499,4 @@
del(src)
/obj/structure/rack/attack_tk() // no telehulk sorry
return
+8 -8
View File
@@ -1,4 +1,4 @@
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff)
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, surround = 1)
soundin = get_sfx(soundin) // same sound for everyone
@@ -17,12 +17,12 @@
if(get_dist(M, turf_source) <= world.view + extrarange)
var/turf/T = get_turf(M)
if(T && T.z == turf_source.z)
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff)
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, surround)
var/const/FALLOFF_SOUNDS = 1
var/const/SURROUND_CAP = 7
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff)
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, surround = 1)
if(!src.client || ear_deaf > 0) return
soundin = get_sfx(soundin)
@@ -40,12 +40,12 @@ var/const/SURROUND_CAP = 7
if(isturf(turf_source))
// 3D sounds, the technology is here!
var/turf/T = get_turf(src)
var/dx = turf_source.x - T.x // Hearing from the right/left
if (surround)
var/dx = turf_source.x - T.x // Hearing from the right/left
S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1)
S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1)
var/dz = turf_source.y - T.y // Hearing from infront/behind
S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1)
var/dz = turf_source.y - T.y // Hearing from infront/behind
S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1)
// The y value is for above your head, but there is no ceiling in 2d spessmens.
S.y = 1
+1 -1
View File
@@ -71,7 +71,7 @@ var/global/normal_ooc_colour = "#002eb8"
if(!holder || check_rights_for(src, R_ADMIN))
if(!is_content_unlocked()) return
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour", prefs.ooccolor) as color|null
if(new_ooccolor)
prefs.ooccolor = sanitize_ooccolor(new_ooccolor)
prefs.save_preferences()
+5 -1
View File
@@ -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"
+13 -13
View File
@@ -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>"
+4
View File
@@ -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//=======//
+4 -3
View File
@@ -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
+191 -202
View File
@@ -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)
+8 -30
View File
@@ -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)
+16 -34
View File
@@ -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
View File
@@ -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
+23 -20
View File
@@ -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)
+36 -16
View File
@@ -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)
+9 -5
View File
@@ -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)
+8 -25
View File
@@ -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)
+3
View File
@@ -44,4 +44,7 @@
client.eye = src
client.perspective = MOB_PERSPECTIVE
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
+4
View File
@@ -30,4 +30,8 @@
send2irc("Server", "[cheesy_message]")
..()
if(isobj(loc))
var/obj/Loc=loc
Loc.on_log()
return 1
+1 -1
View File
@@ -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 //
/////////////////////////////
+2 -10
View File
@@ -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
+90 -88
View File
@@ -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
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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