mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge branch 'master' into upstream-merge-13122
This commit is contained in:
@@ -1,32 +1,22 @@
|
||||
/* Note from Carnie:
|
||||
The way datum/mind stuff works has been changed a lot.
|
||||
Minds now represent IC characters rather than following a client around constantly.
|
||||
|
||||
Guidelines for using minds properly:
|
||||
|
||||
- Never mind.transfer_to(ghost). The var/current and var/original of a mind must always be of type mob/living!
|
||||
ghost.mind is however used as a reference to the ghost's corpse
|
||||
|
||||
- When creating a new mob for an existing IC character (e.g. cloning a dead guy or borging a brain of a human)
|
||||
the existing mind of the old mob should be transfered to the new mob like so:
|
||||
|
||||
mind.transfer_to(new_mob)
|
||||
|
||||
- You must not assign key= or ckey= after transfer_to() since the transfer_to transfers the client for you.
|
||||
By setting key or ckey explicitly after transfering the mind with transfer_to you will cause bugs like DCing
|
||||
the player.
|
||||
|
||||
- IMPORTANT NOTE 2, if you want a player to become a ghost, use mob.ghostize() It does all the hard work for you.
|
||||
|
||||
- When creating a new mob which will be a new IC character (e.g. putting a shade in a construct or randomly selecting
|
||||
a ghost to become a xeno during an event). Simply assign the key or ckey like you've always done.
|
||||
|
||||
new_mob.key = key
|
||||
|
||||
The Login proc will handle making a new mob for that mobtype (including setting up stuff like mind.name). Simple!
|
||||
However if you want that mind to have any special properties like being a traitor etc you will have to do that
|
||||
yourself.
|
||||
|
||||
*/
|
||||
|
||||
/datum/mind
|
||||
@@ -190,11 +180,7 @@
|
||||
assigned_role = new_role
|
||||
|
||||
else if (href_list["memory_edit"])
|
||||
<<<<<<< HEAD
|
||||
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
|
||||
=======
|
||||
var/new_memo = sanitize(tgui_input_text(usr, "Write new memory", "Memory", memory, multiline = TRUE))
|
||||
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
|
||||
if (isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
|
||||
@@ -202,11 +188,7 @@
|
||||
var/datum/mind/mind = locate(href_list["amb_edit"])
|
||||
if(!mind)
|
||||
return
|
||||
<<<<<<< HEAD
|
||||
var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
|
||||
=======
|
||||
var/new_ambition = tgui_input_text(usr, "Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE)
|
||||
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
|
||||
if(isnull(new_ambition))
|
||||
return
|
||||
if(mind)
|
||||
@@ -304,11 +286,7 @@
|
||||
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
|
||||
def_num = objective.target_amount
|
||||
|
||||
<<<<<<< HEAD
|
||||
var/target_number = input("Input target number:", "Objective", def_num) as num|null
|
||||
=======
|
||||
var/target_number = tgui_input_number(usr, "Input target number:", "Objective", def_num)
|
||||
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
|
||||
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
||||
return
|
||||
|
||||
@@ -326,11 +304,7 @@
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
if ("custom")
|
||||
<<<<<<< HEAD
|
||||
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
|
||||
=======
|
||||
var/expl = sanitize(tgui_input_text(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : ""))
|
||||
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
|
||||
if (!expl) return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
@@ -426,11 +400,7 @@
|
||||
// var/obj/item/device/uplink/hidden/suplink = find_syndicate_uplink() No longer needed, uses stored in mind
|
||||
var/crystals
|
||||
crystals = tcrystals
|
||||
<<<<<<< HEAD
|
||||
crystals = input("Amount of telecrystals for [key]", crystals) as null|num
|
||||
=======
|
||||
crystals = tgui_input_number(usr, "Amount of telecrystals for [key]", crystals)
|
||||
>>>>>>> cab11cf3ea... Merge pull request #13122 from ItsSelis/tgui-input-conversions
|
||||
if (!isnull(crystals))
|
||||
tcrystals = crystals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user