Adds a "params" parameter to attackby(), so it keeps track of pixel_x and pixel_y among other things

This commit is contained in:
Markolie
2015-02-22 22:12:11 +01:00
parent aee4626ed9
commit 672305e034
456 changed files with 714 additions and 1182 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
/obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials()
return g_amount + gold_amount + diamond_amount
/obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (shocked)
shock(user,50)
if (default_deconstruction_screwdriver(user, "circuit_imprinter_t", "circuit_imprinter", O))
@@ -37,7 +37,7 @@ Note: Must be placed within 3 tiles of the R&D Console
return temp_list
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (shocked)
shock(user,50)
if (default_deconstruction_screwdriver(user, "d_analyzer_t", "d_analyzer", O))
+1 -1
View File
@@ -93,7 +93,7 @@ Note: Must be placed west/left of and R&D console to function.
A = A / max(1, (being_built.materials[M]/efficiency_coeff))
return A
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (shocked)
shock(user,50)
if (default_deconstruction_screwdriver(user, "protolathe_t", "protolathe", O))
+1 -1
View File
@@ -149,7 +149,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
griefProtection()
*/
/obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
/obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob, params)
//Loading a disk into it.
if(istype(D, /obj/item/weapon/disk))
+1 -1
View File
@@ -118,7 +118,7 @@
env.merge(removed)
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (disabled)
return
@@ -64,7 +64,7 @@
if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
M.selected.action(src)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/device/core_sampler))
if(geological_data)
src.geological_data.artifact_distance = rand(-100,100) / 100
@@ -128,7 +128,7 @@
user << browse(dat, "window=alien_replicator")
/obj/machinery/replicator/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
/obj/machinery/replicator/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
user.drop_item()
W.loc = src
stored_materials.Add(W)
@@ -244,7 +244,7 @@ var/list/valid_secondary_effect_types = list(\
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated)
secondary_effect.DoEffectTouch(user)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
if (istype(W, /obj/item/weapon/reagent_containers/))
if(W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1))
@@ -89,7 +89,7 @@ datum
volume = 2
flags = OPENCONTAINER
obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
if(istype(W, /obj/item/weapon/pen))
var/new_label = input("What should the new label be?","Label solution tray")
if(new_label)
@@ -45,7 +45,7 @@
if(severity && prob(30))
src.visible_message("The [src] crumbles away, leaving some dust and gravel behind.")*/
/obj/item/weapon/ore/strangerock/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/ore/strangerock/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/weldingtool/))
var/obj/item/weapon/weldingtool/w = W
if(w.isOn())
@@ -33,7 +33,7 @@
icon_state = "hskull"
desc = "It's a fossilised, horned skull."
/obj/item/weapon/fossil/skull/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/fossil/skull/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/fossil/bone))
var/obj/o = new /obj/skeleton(get_turf(src))
var/a = new /obj/item/weapon/fossil/bone
@@ -57,7 +57,7 @@
src.breq = rand(6)+3
src.desc = "An incomplete skeleton, looks like it could use [src.breq-src.bnum] more bones."
/obj/skeleton/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/skeleton/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/fossil/bone))
if(!bstate)
bnum++
@@ -24,7 +24,7 @@
else
return
/obj/item/weapon/shard/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/shard/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
@@ -35,7 +35,7 @@
continue
if(G.amount>=G.max_amount)
continue
G.attackby(NG, user)
G.attackby(NG, user, params)
usr << "You add the newly-formed plasma glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
returnToPool(src)
@@ -47,7 +47,7 @@ datum/genesequence
undiscovered_genesequences = master_controller.all_animal_genesequences.Copy()
..()
/obj/machinery/computer/reconstitutor/attackby(obj/item/W, mob/user)
/obj/machinery/computer/reconstitutor/attackby(obj/item/W, mob/user, params)
if(istype(W,/obj/item/weapon/fossil))
user.drop_item()
W.loc = src.loc
@@ -21,7 +21,7 @@
if(!owned_scanner)
owned_scanner = locate(/obj/machinery/artifact_scanpad) in orange(1, src)
/obj/machinery/artifact_harvester/attackby(var/obj/I as obj, var/mob/user as mob)
/obj/machinery/artifact_harvester/attackby(var/obj/I as obj, var/mob/user as mob, params)
if(istype(I,/obj/item/weapon/anobattery))
if(!inserted_battery)
user << "\blue You insert [I] into [src]."
@@ -63,7 +63,7 @@
/obj/machinery/radiocarbon_spectrometer/attack_hand(var/mob/user as mob)
ui_interact(user)
/obj/machinery/radiocarbon_spectrometer/attackby(var/obj/I as obj, var/mob/user as mob)
/obj/machinery/radiocarbon_spectrometer/attackby(var/obj/I as obj, var/mob/user as mob, params)
if(scanning)
user << "<span class='warning'>You can't do that while [src] is scanning!</span>"
else
@@ -37,7 +37,7 @@
..()
processing_objects.Add(src)
/obj/item/weapon/anodevice/attackby(var/obj/I as obj, var/mob/user as mob)
/obj/item/weapon/anodevice/attackby(var/obj/I as obj, var/mob/user as mob, params)
if(istype(I, /obj/item/weapon/anobattery))
if(!inserted_battery)
user << "\blue You insert the battery."
@@ -9,7 +9,7 @@
var/obj/item/weapon/reagent_containers/held_container
var/heat_time = 50
/obj/machinery/bunsen_burner/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/bunsen_burner/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/reagent_containers))
if(held_container)
user << "\red You must remove the [held_container] first."
@@ -168,7 +168,7 @@
cell = null
user << "<span class='info'>You remove the power cell</span>"
/obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/suspension_gen/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/screwdriver))
if(!open)
if(screwed)
@@ -35,7 +35,7 @@
else
return ..()
/obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/evidencebag))
if(num_stored_bags < 10)
del(W)