Merge pull request #9629 from GinjaNinja32/spawn

Spawn fixes
This commit is contained in:
PsiOmegaDelta
2015-06-02 08:05:54 +02:00
5 changed files with 30 additions and 11 deletions

View File

@@ -997,18 +997,18 @@ var/global/floorIsLava = 0
return 0
/datum/admins/proc/spawn_fruit()
/datum/admins/proc/spawn_fruit(seedtype in plant_controller.seeds)
set category = "Debug"
set desc = "Spawn the product of a seed."
set name = "Spawn Fruit"
if(!check_rights(R_SPAWN)) return
var/seedtype = input("Select a seed type", "Spawn Fruit") as null|anything in plant_controller.seeds
if(!seedtype || !plant_controller.seeds[seedtype])
return
var/datum/seed/S = plant_controller.seeds[seedtype]
S.harvest(usr,0,0,1)
log_admin("[key_name(usr)] spawned [seedtype] fruit at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_custom_item()
set category = "Debug"
@@ -1050,17 +1050,17 @@ var/global/floorIsLava = 0
for(var/datum/custom_item/item in current_items)
usr << "- name: [item.name] icon: [item.item_icon] path: [item.item_path] desc: [item.item_desc]"
/datum/admins/proc/spawn_plant()
/datum/admins/proc/spawn_plant(seedtype in plant_controller.seeds)
set category = "Debug"
set desc = "Spawn a spreading plant effect."
set name = "Spawn Plant"
if(!check_rights(R_SPAWN)) return
var/seedtype = input("Select a seed type", "Spawn Plant") as null|anything in plant_controller.seeds
if(!seedtype || !plant_controller.seeds[seedtype])
return
new /obj/effect/plant(get_turf(usr), plant_controller.seeds[seedtype])
log_admin("[key_name(usr)] spawned [seedtype] vines at ([usr.x],[usr.y],[usr.z])")
/datum/admins/proc/spawn_atom(var/object as text)
set category = "Debug"

View File

@@ -123,7 +123,8 @@ var/list/admin_verbs_spawn = list(
/client/proc/FireLaser,
/client/proc/FireCannons,
/client/proc/ChangeIcarusPosition,
/client/proc/virus2_editor
/client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge
)
var/list/admin_verbs_server = list(
/client/proc/Set_Holiday,

View File

@@ -30,19 +30,23 @@
if(!is_open_container())
user << "The cap is sealed."
/obj/item/weapon/reagent_containers/chem_disp_cartridge/verb/setLabel(L as text)
/obj/item/weapon/reagent_containers/chem_disp_cartridge/verb/verb_set_label(L as text)
set name = "Set Cartridge Label"
set category = "Object"
set src in view(usr, 1)
setLabel(L, usr)
/obj/item/weapon/reagent_containers/chem_disp_cartridge/proc/setLabel(L, mob/user = null)
if(L)
if(usr)
usr << "<span class='notice'>You set the label on \the [src] to '[L]'.</span>"
if(user)
user << "<span class='notice'>You set the label on \the [src] to '[L]'.</span>"
label = L
name = "[initial(name)] - '[L]'"
else
if(usr)
usr << "<span class='notice'>You clear the label on \the [src].</span>"
if(user)
user << "<span class='notice'>You clear the label on \the [src].</span>"
label = ""
name = initial(name)
@@ -87,4 +91,4 @@
user << "<span class='notice'>You transfer [trans] units of the solution to \the [target].</span>"
else
return ..()
return ..()

View File

@@ -0,0 +1,13 @@
/client/proc/spawn_chemdisp_cartridge(size in list("small", "medium", "large"), reagent in chemical_reagents_list)
set name = "Spawn Chemical Dispenser Cartridge"
set category = "Admin"
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C
switch(size)
if("small") C = new /obj/item/weapon/reagent_containers/chem_disp_cartridge/small(usr.loc)
if("medium") C = new /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium(usr.loc)
if("large") C = new /obj/item/weapon/reagent_containers/chem_disp_cartridge(usr.loc)
C.reagents.add_reagent(reagent, C.volume)
var/datum/reagent/R = chemical_reagents_list[reagent]
C.setLabel(R.name)
log_admin("[key_name(usr)] spawned a [size] reagent container containing [reagent] at ([usr.x],[usr.y],[usr.z])")