- 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:
baloh.matevz
2012-04-30 18:16:51 +00:00
parent b5a7415c7f
commit eec06043da
7 changed files with 1082 additions and 910 deletions

View File

@@ -142,12 +142,15 @@ proc/process_ghost_teleport_locs()
music = "music/escape.ogg" music = "music/escape.ogg"
/area/shuttle/escape/station /area/shuttle/escape/station
name = "Emergency Shuttle Station"
icon_state = "shuttle2" icon_state = "shuttle2"
/area/shuttle/escape/centcom /area/shuttle/escape/centcom
name = "Emergency Shuttle Centcom"
icon_state = "shuttle" icon_state = "shuttle"
/area/shuttle/escape/transit // the area to pass through for 3 minute transit /area/shuttle/escape/transit // the area to pass through for 3 minute transit
name = "Emergency Shuttle Transit"
icon_state = "shuttle" icon_state = "shuttle"
/area/shuttle/escape_pod1 /area/shuttle/escape_pod1

View File

@@ -65,6 +65,75 @@ var/global/BSACooldown = 0
alert("You cannot perform this action. You must be of a higher administrative rank!") alert("You cannot perform this action. You must be of a higher administrative rank!")
return return
if(href_list["simplemake"])
if(!href_list["mob"])
usr << "Invalid mob"
return
var/mob/M = locate(href_list["mob"])
if(!M || !ismob(M))
usr << "Cannot find mob"
return
var/delmob = 0
var/option = alert("Delete old mob?","Message","Yes","No","Cancel")
if(option == "Cancel")
return
if(option == "Yes")
delmob = 1
switch(href_list["simplemake"])
if("observer")
M.change_mob_type( /mob/dead/observer , null, null, delmob)
if("drone")
M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob)
if("hunter")
M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob)
if("queen")
M.change_mob_type( /mob/living/carbon/alien/humanoid/queen , null, null, delmob)
if("sentinel")
M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob)
if("larva")
M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob)
if("human")
M.change_mob_type( /mob/living/carbon/human , null, null, delmob)
if("metroid")
M.change_mob_type( /mob/living/carbon/metroid , null, null, delmob)
if("adultmetroid")
M.change_mob_type( /mob/living/carbon/metroid/adult , null, null, delmob)
if("monkey")
M.change_mob_type( /mob/living/carbon/monkey , null, null, delmob)
if("robot")
M.change_mob_type( /mob/living/silicon/robot , null, null, delmob)
if("cat")
M.change_mob_type( /mob/living/simple_animal/cat , null, null, delmob)
if("runtime")
M.change_mob_type( /mob/living/simple_animal/cat/Runtime , null, null, delmob)
if("corgi")
M.change_mob_type( /mob/living/simple_animal/corgi , null, null, delmob)
if("ian")
M.change_mob_type( /mob/living/simple_animal/corgi/Ian , null, null, delmob)
if("crab")
M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob)
if("coffee")
M.change_mob_type( /mob/living/simple_animal/crab/Coffee , null, null, delmob)
if("parrot")
M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob)
if("drprofessor")
M.change_mob_type( /mob/living/simple_animal/parrot/DrProfessor , null, null, delmob)
if("constructarmoured")
M.change_mob_type( /mob/living/simple_animal/constructarmoured , null, null, delmob)
if("constructbuilder")
M.change_mob_type( /mob/living/simple_animal/constructbuilder , null, null, delmob)
if("constructwraith")
M.change_mob_type( /mob/living/simple_animal/constructwraith , null, null, delmob)
if("shade")
M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob)
/////////////////////////////////////new ban stuff /////////////////////////////////////new ban stuff
if(href_list["unbanf"]) if(href_list["unbanf"])
var/banfolder = href_list["unbanf"] var/banfolder = href_list["unbanf"]
@@ -795,6 +864,11 @@ var/global/BSACooldown = 0
if (href_list["sendtoprison"]) if (href_list["sendtoprison"])
if ((src.rank in list( "Moderator", "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) if ((src.rank in list( "Moderator", "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Send to admin prison for the round?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["sendtoprison"]) var/mob/M = locate(href_list["sendtoprison"])
if (ismob(M)) if (ismob(M))
if(istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/silicon/ai))
@@ -864,6 +938,11 @@ var/global/BSACooldown = 0
if (href_list["tdome1"]) if (href_list["tdome1"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdome1"]) var/mob/M = locate(href_list["tdome1"])
if (ismob(M)) if (ismob(M))
if(istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/silicon/ai))
@@ -890,6 +969,11 @@ var/global/BSACooldown = 0
if (href_list["tdome2"]) if (href_list["tdome2"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdome2"]) var/mob/M = locate(href_list["tdome2"])
if (ismob(M)) if (ismob(M))
if(istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/silicon/ai))
@@ -916,6 +1000,11 @@ var/global/BSACooldown = 0
if (href_list["tdomeadmin"]) if (href_list["tdomeadmin"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdomeadmin"]) var/mob/M = locate(href_list["tdomeadmin"])
if (ismob(M)) if (ismob(M))
if(istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/silicon/ai))
@@ -931,6 +1020,11 @@ var/global/BSACooldown = 0
if (href_list["tdomeobserve"]) if (href_list["tdomeobserve"])
if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) if ((src.rank in list( "Admin Candidate", "Temporary Admin", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["tdomeobserve"]) var/mob/M = locate(href_list["tdomeobserve"])
if (ismob(M)) if (ismob(M))
if(istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/silicon/ai))
@@ -1231,6 +1325,11 @@ var/global/BSACooldown = 0
if (href_list["getmob"]) if (href_list["getmob"])
if(rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master")) if(rank in list( "Trial Admin", "Badmin", "Game Admin", "Game Master"))
var/confirm = alert(usr, "Confirm?", "Message", "Yes", "No")
if(confirm != "Yes")
return
var/mob/M = locate(href_list["getmob"]) var/mob/M = locate(href_list["getmob"])
usr.client.Getmob(M) usr.client.Getmob(M)
else else
@@ -2143,7 +2242,7 @@ var/global/BSACooldown = 0
if (M.client) if (M.client)
if(!istype(M, /mob/new_player)) if(!istype(M, /mob/new_player))
body += "<br><br>" body += "<br><br>"
body += "<b>Transformations:</b>" body += "<b>Transformation:</b>"
body += "<br>" body += "<br>"
//Monkey //Monkey
@@ -2167,6 +2266,33 @@ var/global/BSACooldown = 0
body += "<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | " body += "<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> | "
body += "<A href='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> " body += "<A href='?src=\ref[src];makemetroid=\ref[M]'>Make Metroid</A> "
body += "<br><br>"
body += "<b>Rudimentary transformation:</b><font size=2><br>These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.</font><br>"
body += "<A href='?src=\ref[src];simplemake=observer;mob=\ref[M]'>Observer</A> | "
body += "\[ Alien: <A href='?src=\ref[src];simplemake=drone;mob=\ref[M]'>Drone</A>, "
body += "<A href='?src=\ref[src];simplemake=hunter;mob=\ref[M]'>Hunter</A>, "
body += "<A href='?src=\ref[src];simplemake=queen;mob=\ref[M]'>Queen</A>, "
body += "<A href='?src=\ref[src];simplemake=sentinel;mob=\ref[M]'>Sentinel</A>, "
body += "<A href='?src=\ref[src];simplemake=larva;mob=\ref[M]'>Larva</A> \] "
body += "<A href='?src=\ref[src];simplemake=human;mob=\ref[M]'>Human</A> "
body += "\[ Metroid: <A href='?src=\ref[src];simplemake=metroid;mob=\ref[M]'>Baby</A>, "
body += "<A href='?src=\ref[src];simplemake=adultmetroid;mob=\ref[M]'>Adult</A> \] "
body += "<A href='?src=\ref[src];simplemake=monkey;mob=\ref[M]'>Monkey</A> | "
body += "<A href='?src=\ref[src];simplemake=robot;mob=\ref[M]'>Cyborg</A> | "
body += "<A href='?src=\ref[src];simplemake=cat;mob=\ref[M]'>Cat</A> | "
body += "<A href='?src=\ref[src];simplemake=runtime;mob=\ref[M]'>Runtime</A> | "
body += "<A href='?src=\ref[src];simplemake=corgi;mob=\ref[M]'>Corgi</A> | "
body += "<A href='?src=\ref[src];simplemake=ian;mob=\ref[M]'>Ian</A> | "
body += "<A href='?src=\ref[src];simplemake=crab;mob=\ref[M]'>Crab</A> | "
body += "<A href='?src=\ref[src];simplemake=coffee;mob=\ref[M]'>Coffee</A> | "
//body += "<A href='?src=\ref[src];simplemake=parrot;mob=\ref[M]'>Parrot</A> | "
//body += "<A href='?src=\ref[src];simplemake=drprofessor;mob=\ref[M]'>DrProfessor</A> | "
body += "\[ Construct: <A href='?src=\ref[src];simplemake=constructarmoured;mob=\ref[M]'>Armoured</A> , "
body += "<A href='?src=\ref[src];simplemake=constructbuilder;mob=\ref[M]'>Builder</A> , "
body += "<A href='?src=\ref[src];simplemake=constructwraith;mob=\ref[M]'>Wraith</A> \] "
body += "<A href='?src=\ref[src];simplemake=shade;mob=\ref[M]'>Shade</A>"
body += "<br>"
if (M.client) if (M.client)
body += "<br><br>" body += "<br><br>"
body += "<b>Other actions:</b>" body += "<b>Other actions:</b>"
@@ -2180,7 +2306,7 @@ var/global/BSACooldown = 0
body += "<br>" body += "<br>"
body += "</body></html>" body += "</body></html>"
usr << browse(body, "window=adminplayeropts;size=550x375") usr << browse(body, "window=adminplayeropts;size=550x515")
feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

View File

@@ -82,7 +82,7 @@
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1) message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]<BR>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_direct_narrate() // Targetted narrate -- TLE /client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE
set category = "Special Verbs" set category = "Special Verbs"
set name = "Direct Narrate" set name = "Direct Narrate"
@@ -90,11 +90,17 @@
src << "Only administrators may use this command." src << "Only administrators may use this command."
return return
var/mob/M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list() if(!M)
if(M == null) M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list()
if(!M)
return return
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
if( !msg )
return
M << msg M << msg
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]") log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1) message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]<BR>", 1)

View File

@@ -15,7 +15,8 @@
if(facehugger.stat == CONSCIOUS) if(facehugger.stat == CONSCIOUS)
var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active") var/image/activeIndicator = image('alien.dmi', loc = facehugger, icon_state = "facehugger_active")
activeIndicator.override = 1 activeIndicator.override = 1
client.images += activeIndicator if(client)
client.images += activeIndicator
/mob/living/carbon/alien/IsAdvancedToolUser() /mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation return has_fine_manipulation

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -833,6 +833,7 @@
#include "code\modules\mob\mob_grab.dm" #include "code\modules\mob\mob_grab.dm"
#include "code\modules\mob\mob_helpers.dm" #include "code\modules\mob\mob_helpers.dm"
#include "code\modules\mob\mob_movement.dm" #include "code\modules\mob\mob_movement.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
#include "code\modules\mob\say.dm" #include "code\modules\mob\say.dm"
#include "code\modules\mob\screen.dm" #include "code\modules\mob\screen.dm"
#include "code\modules\mob\transform_procs.dm" #include "code\modules\mob\transform_procs.dm"