mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Merge remote-tracking branch 'upstream/master' into traymesons
Conflicts: code/modules/research/designs.dm icons/mob/eyes.dmi icons/obj/clothing/glasses.dmi
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
//No other icons for it atm
|
||||
|
||||
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/power/am_control_unit/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W) || !user) return
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(!anchored)
|
||||
|
||||
@@ -125,7 +125,7 @@ proc/cardinalrange(var/center)
|
||||
else if(processing) shutdown_core()
|
||||
|
||||
|
||||
/obj/machinery/am_shielding/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/am_shielding/attackby(obj/item/W, mob/user, params)
|
||||
if(!istype(W) || !user) return
|
||||
if(W.force > 10)
|
||||
stability -= W.force/2
|
||||
@@ -203,7 +203,7 @@ proc/cardinalrange(var/center)
|
||||
throw_range = 2
|
||||
m_amt = 100
|
||||
|
||||
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user, params)
|
||||
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
|
||||
new/obj/machinery/am_shielding(src.loc)
|
||||
qdel(src)
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
|
||||
//attack with an item - open/close cover, insert cell, or (un)lock interface
|
||||
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user)
|
||||
/obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
if (istype(user, /mob/living/silicon) && get_dist(src,user)>1)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -128,7 +128,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
// - Cable coil : merge cables
|
||||
// - Multitool : get the power currently passing through the cable
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user, params)
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
return
|
||||
@@ -550,7 +550,7 @@ obj/structure/cable/proc/avail()
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/item/stack/cable_coil/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if( istype(W, /obj/item/weapon/wirecutters) && src.amount > 1)
|
||||
src.amount--
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
SNG.drain("CELL",src,H.wear_suit)
|
||||
return
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user)
|
||||
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = W
|
||||
|
||||
@@ -63,7 +63,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
/obj/machinery/gravity_generator/part
|
||||
var/obj/machinery/gravity_generator/main/main_part = null
|
||||
|
||||
/obj/machinery/gravity_generator/part/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/gravity_generator/part/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
return main_part.attackby(I, user)
|
||||
|
||||
/obj/machinery/gravity_generator/part/get_status()
|
||||
@@ -171,7 +171,7 @@ var/const/GRAV_NEEDS_WRENCH = 3
|
||||
// Interaction
|
||||
|
||||
// Fixing the gravity generator.
|
||||
/obj/machinery/gravity_generator/main/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/machinery/gravity_generator/main/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
var/old_broken_state = broken_state
|
||||
switch(broken_state)
|
||||
if(GRAV_NEEDS_SCREWDRIVER)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/obj/machinery/light/newlight = null
|
||||
var/sheets_refunded = 2
|
||||
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
qdel(src)
|
||||
@@ -94,7 +94,7 @@
|
||||
if(3)
|
||||
user << "The casing is closed."
|
||||
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
src.add_fingerprint(user)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if (src.stage == 1)
|
||||
@@ -328,7 +328,7 @@
|
||||
|
||||
// attack with item - insert light (if right type), otherwise try to break the light
|
||||
|
||||
/obj/machinery/light/attackby(obj/item/W, mob/living/user)
|
||||
/obj/machinery/light/attackby(obj/item/W, mob/living/user, params)
|
||||
|
||||
//Light replacer code
|
||||
if(istype(W, /obj/item/device/lightreplacer))
|
||||
@@ -676,7 +676,7 @@
|
||||
|
||||
// attack bulb/tube with object
|
||||
// if a syringe, can inject plasma to make it explode
|
||||
/obj/item/weapon/light/attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/item/weapon/light/attackby(var/obj/item/I, var/mob/user, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/syringe))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = I
|
||||
|
||||
@@ -194,7 +194,7 @@ display round(lastgen) and plasmatank amount
|
||||
/obj/machinery/power/port_gen/pacman/proc/overheat()
|
||||
explosion(src.loc, 2, 5, 2, -1)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, sheet_path))
|
||||
var/obj/item/stack/addstack = O
|
||||
var/amount = min((max_sheets - sheets), addstack.amount)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
// attach a wire to a power machine - leads from the turf you are standing on
|
||||
//almost never called, overwritten by all power machines but terminal and generator
|
||||
/obj/machinery/power/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/machinery/power/attackby(obj/item/weapon/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ var/global/list/rad_collectors = list()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
user << "<span class='notice'>The [W.name] detects that [last_power]W were recently produced.</span>"
|
||||
return 1
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
A.fire()
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
if(active)
|
||||
|
||||
@@ -94,7 +94,7 @@ field_generator power level display
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/field/generator/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/field/generator/attackby(obj/item/W, mob/user, params)
|
||||
if(active)
|
||||
user << "The [src] needs to be off."
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
new /obj/singularity/(T, 50)
|
||||
if(src) qdel(src)
|
||||
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
if(!anchored && !isinspace())
|
||||
|
||||
@@ -129,7 +129,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params)
|
||||
if(istool(W))
|
||||
if(src.process_tool_hit(W,user))
|
||||
return
|
||||
@@ -308,7 +308,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user, params)
|
||||
if(istool(W))
|
||||
if(src.process_tool_hit(W,user))
|
||||
return
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
src.energy = starting_energy
|
||||
..()
|
||||
SSobj.processing.Add(src)
|
||||
SSobj.processing |= src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in world)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
/obj/machinery/power/smes/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/power/smes/attackby(obj/item/I, mob/user, params)
|
||||
//opening using screwdriver
|
||||
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
|
||||
update_icon()
|
||||
|
||||
+24
-45
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
@@ -221,7 +221,7 @@
|
||||
glass_type = null
|
||||
|
||||
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
/obj/item/solar_assembly/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
|
||||
if(!anchored && isturf(loc))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
@@ -367,38 +367,34 @@
|
||||
|
||||
/obj/machinery/power/solar_control/attack_hand(mob/user)
|
||||
if(!..())
|
||||
interact(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/power/solar_control/interact(mob/user)
|
||||
/obj/machinery/power/solar_control/ui_interact(mob/user, ui_key = "main")
|
||||
|
||||
var/t = "<B><span class='highlight'>Generated power</span></B> : [round(lastgen)] W<BR>"
|
||||
t += "<B><span class='highlight'>Orientation</span></B>: [rate_control(src,"cdir","[cdir]°",1,15)] ([angle2text(cdir)])<BR>"
|
||||
t += "<B><span class='highlight'>Tracking:</B><div class='statusDisplay'>"
|
||||
switch(track)
|
||||
if(0)
|
||||
t += "<span class='linkOn'>Off</span> <A href='?src=\ref[src];track=1'>Timed</A> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(1)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <span class='linkOn'>Timed</span> <A href='?src=\ref[src];track=2'>Auto</A><BR>"
|
||||
if(2)
|
||||
t += "<A href='?src=\ref[src];track=0'>Off</A> <A href='?src=\ref[src];track=1'>Timed</A> <span class='linkOn'>Auto</span><BR>"
|
||||
var/data = list()
|
||||
|
||||
t += "Tracking Rate: [rate_control(src,"tdir","[trackrate] deg/h ([trackrate<0 ? "CCW" : "CW"])",1,30,180)]</div><BR>"
|
||||
data["generated"] = round(lastgen)
|
||||
data["angle"] = cdir
|
||||
data["direction"] = angle2text(cdir)
|
||||
|
||||
t += "<B><span class='highlight'>Connected devices:</span></B><div class='statusDisplay'>"
|
||||
data["tracking_state"] = track
|
||||
data["tracking_rate"] = trackrate
|
||||
data["rotating_way"] = (trackrate<0 ? "CCW" : "CW")
|
||||
|
||||
t += "<A href='?src=\ref[src];search_connected=1'>Search for devices</A><BR>"
|
||||
t += "Solar panels : [connected_panels.len] connected<BR>"
|
||||
t += "Solar tracker : [connected_tracker ? "<span class='good'>Found</span>" : "<span class='bad'>Not found</span>"]</div><BR>"
|
||||
data["connected_panels"] = connected_panels.len
|
||||
data["connected_tracker"] = (connected_tracker ? 1 : 0)
|
||||
|
||||
t += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
var/datum/nanoui/ui = SSnano.get_open_ui(user, src, ui_key)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "solar_control.tmpl", name, 490, 420)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
else
|
||||
ui.push_data(data)
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(user, "solar", name)
|
||||
popup.set_content(t)
|
||||
popup.open()
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/power/solar_control/attackby(I as obj, user as mob)
|
||||
/obj/machinery/power/solar_control/attackby(I as obj, user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
@@ -445,19 +441,11 @@
|
||||
targetdir = (targetdir + trackrate/abs(trackrate) + 360) % 360 //... do it
|
||||
nexttime += 36000/abs(trackrate) //reset the counter for the next 1°
|
||||
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/power/solar_control/Topic(href, href_list)
|
||||
if(..())
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.unset_machine()
|
||||
return
|
||||
if(href_list["close"] )
|
||||
usr << browse(null, "window=solcon")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(href_list["rate control"])
|
||||
if(href_list["rate_control"])
|
||||
if(href_list["cdir"])
|
||||
src.cdir = dd_range(0,359,(360+src.cdir+text2num(href_list["cdir"]))%360)
|
||||
src.targetdir = src.cdir
|
||||
@@ -486,9 +474,6 @@
|
||||
connected_tracker.set_angle(SSsun.angle)
|
||||
set_panels(cdir)
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
//rotates the panel to the passed angle
|
||||
/obj/machinery/power/solar_control/proc/set_panels(var/cdir)
|
||||
|
||||
@@ -534,9 +519,3 @@
|
||||
/obj/item/weapon/paper/solar
|
||||
name = "paper- 'Going green! Setup your own solar array instructions.'"
|
||||
info = "<h1>Welcome</h1><p>At greencorps we love the environment, and space. With this package you are able to help mother nature and produce energy without any usage of fossil fuel or plasma! Singularity energy is dangerous while solar energy is safe, which is why it's better. Now here is how you setup your own solar array.</p><p>You can make a solar panel by wrenching the solar assembly onto a cable node. Adding a glass panel, reinforced or regular glass will do, will finish the construction of your solar panel. It is that easy!</p><p>Now after setting up 19 more of these solar panels you will want to create a solar tracker to keep track of our mother nature's gift, the sun. These are the same steps as before except you insert the tracker equipment circuit into the assembly before performing the final step of adding the glass. You now have a tracker! Now the last step is to add a computer to calculate the sun's movements and to send commands to the solar panels to change direction with the sun. Setting up the solar computer is the same as setting up any computer, so you should have no trouble in doing that. You do need to put a wire node under the computer, and the wire needs to be connected to the tracker.</p><p>Congratulations, you should have a working solar array. If you are having trouble, here are some tips. Make sure all solar equipment are on a cable node, even the computer. You can always deconstruct your creations if you make a mistake.</p><p>That's all to it, be safe, be green!</p>"
|
||||
|
||||
/proc/rate_control(var/S, var/V, var/C, var/Min=1, var/Max=5, var/Limit=null) //How not to name vars
|
||||
var/href = "<A href='?src=\ref[S];rate control=1;[V]"
|
||||
var/rate = "[href]=-[Max]'>-</A>[href]=-[Min]'>-</A> [(C?C : 0)] [href]=[Min]'>+</A>[href]=[Max]'>+</A>"
|
||||
if(Limit) return "[href]=-[Limit]'>-</A>"+rate+"[href]=[Limit]'>+</A>"
|
||||
return rate
|
||||
@@ -237,7 +237,7 @@
|
||||
R.receive_pulse(power/10)
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter_shard/attackby(obj/item/W as obj, mob/living/user as mob)
|
||||
/obj/machinery/power/supermatter_shard/attackby(obj/item/W as obj, mob/living/user as mob, params)
|
||||
if(!istype(W) || (W.flags & ABSTRACT) || !istype(user))
|
||||
return
|
||||
if(user.drop_item(W))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user)
|
||||
/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
dismantle(user)
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(powernet && (powernet == control.powernet)) //update if we're still in the same powernet
|
||||
control.cdir = angle
|
||||
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
E += M.rating
|
||||
efficiency = E / 6
|
||||
|
||||
/obj/machinery/power/compressor/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/power/compressor/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I))
|
||||
return
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/power/turbine/attackby(obj/item/I, mob/user)
|
||||
/obj/machinery/power/turbine/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I))
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user