mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Ore box verb tweaks
- Added more sanity checks - Added more user feedback
This commit is contained in:
@@ -40,13 +40,16 @@
|
|||||||
usr << "That's an [src]."
|
usr << "That's an [src]."
|
||||||
usr << desc
|
usr << desc
|
||||||
|
|
||||||
if(!(src in view(1, usr))) //If you can't physically get to the ore box to open it, you can't see what's in it.
|
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!Adjacent(usr)) //Can only check the contents of ore boxes if you can physically reach them.
|
||||||
return
|
return
|
||||||
|
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
|
|
||||||
if(contents.len < 1)
|
if(contents.len < 1)
|
||||||
usr << "It is empty"
|
usr << "It is empty."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(world.time > last_update + 10)
|
if(world.time > last_update + 10)
|
||||||
@@ -81,11 +84,19 @@
|
|||||||
/obj/structure/ore_box/verb/empty_box()
|
/obj/structure/ore_box/verb/empty_box()
|
||||||
set name = "Empty Ore Box"
|
set name = "Empty Ore Box"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in view(1) //You can only empty the box if you can physically reach it
|
set src in view(1)
|
||||||
|
|
||||||
|
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
|
||||||
|
usr << "\red You are physically incapable of emptying the ore box."
|
||||||
|
return
|
||||||
|
|
||||||
if( usr.stat || usr.restrained() )
|
if( usr.stat || usr.restrained() )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(!Adjacent(usr)) //You can only empty the box if you can physically reach it
|
||||||
|
usr << "You cannot reach the ore box."
|
||||||
|
return
|
||||||
|
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
|
|
||||||
if(contents.len < 1)
|
if(contents.len < 1)
|
||||||
@@ -99,6 +110,7 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
// Updates ore tally
|
// Updates ore tally
|
||||||
/obj/structure/ore_box/proc/update_orecount()
|
/obj/structure/ore_box/proc/update_orecount()
|
||||||
amt_iron = 0
|
amt_iron = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user