mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Fixes #5874
This commit is contained in:
@@ -4,7 +4,6 @@ RSF
|
||||
|
||||
*/
|
||||
|
||||
//TODO: WHAT THE FUCK, FIX THIS GARBAGE.
|
||||
/obj/item/weapon/rsf
|
||||
name = "\improper Rapid-Service-Fabricator"
|
||||
desc = "A device used to rapidly deploy service items."
|
||||
@@ -13,26 +12,29 @@ RSF
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
var/stored_matter = 0
|
||||
var/stored_matter = 30
|
||||
var/mode = 1
|
||||
flags = TABLEPASS
|
||||
w_class = 3.0
|
||||
|
||||
/obj/item/weapon/rsf/New()
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
/obj/item/weapon/rsf/examine()
|
||||
set src in view(1)
|
||||
..()
|
||||
usr << "It currently holds [stored_matter]/30 fabrication-units."
|
||||
|
||||
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
|
||||
if ((stored_matter + 10) > 30)
|
||||
user << "The RSF cant hold any more matter."
|
||||
user << "The RSF can't hold any more matter."
|
||||
return
|
||||
|
||||
del(W)
|
||||
|
||||
stored_matter += 10
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
/obj/item/weapon/rsf/attack_self(mob/user as mob)
|
||||
@@ -64,174 +66,51 @@ RSF
|
||||
// Change mode
|
||||
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
|
||||
|
||||
if(!proximity) return
|
||||
if (!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
|
||||
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.stat || !R.cell || R.cell.charge <= 0)
|
||||
return
|
||||
else
|
||||
if(stored_matter <= 0)
|
||||
return
|
||||
|
||||
if(!istype(A, /obj/structure/table) && !istype(A, /turf/simulated/floor))
|
||||
return
|
||||
|
||||
if (istype(A, /obj/structure/table) && mode == 1)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Dosh..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
var/used_energy = 0
|
||||
var/obj/product
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 1)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Dosh..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
switch(mode)
|
||||
if(1)
|
||||
product = new /obj/item/weapon/spacecash/c10()
|
||||
used_energy = 200
|
||||
if(2)
|
||||
product = new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass()
|
||||
used_energy = 50
|
||||
if(3)
|
||||
product = new /obj/item/weapon/paper()
|
||||
used_energy = 10
|
||||
if(4)
|
||||
product = new /obj/item/weapon/pen()
|
||||
used_energy = 50
|
||||
if(5)
|
||||
product = new /obj/item/weapon/storage/pill_bottle/dice()
|
||||
used_energy = 200
|
||||
if(6)
|
||||
product = new /obj/item/clothing/mask/cigarette()
|
||||
used_energy = 10
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 2)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Drinking Glass..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
user << "Dispensing [product ? product : "product"]..."
|
||||
product.loc = get_turf(A)
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 2)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Drinking Glass..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 3)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Paper Sheet..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 3)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Paper Sheet..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 4)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Pen..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 4)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Pen..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 5)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Dice Pack..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 5)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Dice Pack..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 6)
|
||||
if (istype(A, /obj/structure/table) && stored_matter >= 1)
|
||||
user << "Dispensing Cigarette..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A.loc )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 6)
|
||||
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
|
||||
user << "Dispensing Cigarette..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A )
|
||||
if (isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
|
||||
return
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell)
|
||||
R.cell.use(used_energy)
|
||||
else
|
||||
stored_matter--
|
||||
user << "The RSF now holds [stored_matter]/30 fabrication-units."
|
||||
@@ -294,7 +294,7 @@
|
||||
src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
|
||||
|
||||
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
|
||||
M.matter = 30
|
||||
M.stored_matter = 30
|
||||
src.modules += M
|
||||
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
|
||||
Reference in New Issue
Block a user