mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
- Added a rudimentary transformation section to the options panel (show player panel verb). This allows rudimentary mob type changes to any mob. These are however generic and non-mob-specific, as they only copy over some of the most needed variables, such as the three name variables, dna and mind. They do not, for instance, create a MMI for cyborgs. A note of this is also added to the player panel.
- Once you click one of the links a popup will appear asking you whether you'd like to delete the old mob of the player (yes or no) or cancel this transformation. Screenshot: http://www.kamletos.si/options%20panel%20rudamentary%20transformation.PNG git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3534 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
if(facehugger.stat == CONSCIOUS)
|
||||
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
|
||||
activeIndicator.override = 1
|
||||
client.images += activeIndicator
|
||||
if(client)
|
||||
client.images += activeIndicator
|
||||
|
||||
/mob/living/carbon/alien/IsAdvancedToolUser()
|
||||
return has_fine_manipulation
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
//This proc is the most basic of the procs. All it does is make a new mob on the same tile and transfer over a few variables.
|
||||
//Returns the new mob
|
||||
//Note that this proc does NOT do MMI related stuff!
|
||||
/mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num)
|
||||
|
||||
if(istype(src,/mob/new_player))
|
||||
usr << "\red cannot convert players who have not entered yet."
|
||||
return
|
||||
|
||||
if(!new_type)
|
||||
new_type = input("Mob type path:", "Mob type") as text|null
|
||||
|
||||
if(istext(new_type))
|
||||
new_type = text2path(new_type)
|
||||
|
||||
if( !ispath(new_type) )
|
||||
usr << "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder."
|
||||
return
|
||||
|
||||
if( new_type == /mob/new_player )
|
||||
usr << "\red cannot convert into a new_player mob type."
|
||||
return
|
||||
|
||||
var/mob/M = null
|
||||
if( !isnull(location) && isturf(location))
|
||||
M = new new_type( location )
|
||||
else
|
||||
M = new new_type( src.loc )
|
||||
|
||||
if(!M || !ismob(M))
|
||||
usr << "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder."
|
||||
return
|
||||
|
||||
if( istext(new_name) )
|
||||
M.name = new_name
|
||||
M.original_name = new_name
|
||||
M.real_name = new_name
|
||||
else
|
||||
M.name = src.name
|
||||
M.original_name = src.original_name
|
||||
M.real_name = src.real_name
|
||||
|
||||
M.dna = src.dna
|
||||
|
||||
M.ckey = src.ckey
|
||||
if(mind)
|
||||
mind.transfer_to(M)
|
||||
|
||||
if(delete_old_mob)
|
||||
spawn(1)
|
||||
del(src)
|
||||
return M
|
||||
Reference in New Issue
Block a user