mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Item TF smite (#9383)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f1020d3d55
commit
1c62f9e1f1
@@ -339,6 +339,32 @@
|
|||||||
M.forceMove(new_mob)
|
M.forceMove(new_mob)
|
||||||
new_mob.tf_mob_holder = M
|
new_mob.tf_mob_holder = M
|
||||||
|
|
||||||
|
if("item_tf")
|
||||||
|
var/mob/living/M = target
|
||||||
|
|
||||||
|
if(!istype(M))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!M.ckey)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/obj/item/spawning = user.client.get_path_from_partial_text()
|
||||||
|
|
||||||
|
to_chat(user,span_warning("spawning is: [spawning]"))
|
||||||
|
|
||||||
|
if(!ispath(spawning, /obj/item/))
|
||||||
|
to_chat(user,span_warning("Can only spawn items."))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/obj/item/spawned_obj = new spawning(M.loc)
|
||||||
|
var/obj/item/original_name = spawned_obj.name
|
||||||
|
spawned_obj.inhabit_item(M, original_name, M)
|
||||||
|
var/mob/living/possessed_voice = spawned_obj.possessed_voice
|
||||||
|
spawned_obj.trash_eatable = M.devourable
|
||||||
|
spawned_obj.unacidable = !M.digestable
|
||||||
|
M.forceMove(possessed_voice)
|
||||||
|
|
||||||
|
|
||||||
////////MEDICAL//////////////
|
////////MEDICAL//////////////
|
||||||
|
|
||||||
if("appendicitis")
|
if("appendicitis")
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ export const ControlSmites = (props) => {
|
|||||||
<Button fluid onClick={() => act('mob_tf')}>
|
<Button fluid onClick={() => act('mob_tf')}>
|
||||||
Mob Transformation
|
Mob Transformation
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button fluid onClick={() => act('item_tf')}>
|
||||||
|
Object Transformation
|
||||||
|
</Button>
|
||||||
</Section>
|
</Section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user