mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-26 10:04:12 +00:00
Merge pull request #724 from Datraen/Telecrystal-Item
Telecrystal item implementation + More
This commit is contained in:
@@ -61,6 +61,9 @@
|
||||
|
||||
//put this here for easier tracking ingame
|
||||
var/datum/money_account/initial_account
|
||||
|
||||
//used for antag tcrystal trading, more info in code\game\objects\items\telecrystals.dm
|
||||
var/accept_tcrystals = 0
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
|
||||
@@ -44,9 +44,10 @@ var/datum/antagonist/mercenary/mercs
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(player.back), slot_in_backpack)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(player), slot_in_backpack)
|
||||
player.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
|
||||
player.mind.accept_tcrystals = 1
|
||||
|
||||
if (player.mind == leader)
|
||||
var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, 40)
|
||||
var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, DEFAULT_TELECRYSTAL_AMOUNT)
|
||||
player.put_in_hands(U)
|
||||
|
||||
player.update_icons()
|
||||
|
||||
@@ -82,6 +82,7 @@ var/datum/antagonist/traitor/traitors
|
||||
|
||||
spawn_uplink(traitor_mob)
|
||||
traitor_mob.mind.tcrystals = DEFAULT_TELECRYSTAL_AMOUNT
|
||||
traitor_mob.mind.accept_tcrystals = 1
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M && M != traitor_mob)
|
||||
|
||||
@@ -13,7 +13,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
slot_flags = SLOT_ID | SLOT_BELT
|
||||
|
||||
//Main variables
|
||||
var/pdachoice = 1
|
||||
var/pdachoice = 3
|
||||
var/owner = null
|
||||
var/default_cartridge = 0 // Access level defined by cartridge
|
||||
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
|
||||
@@ -319,9 +319,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
new /obj/item/weapon/pen(src)
|
||||
pdachoice = isnull(H) ? 1 : (ishuman(H) ? H.pdachoice : 1)
|
||||
switch(pdachoice)
|
||||
if(1) icon = 'icons/obj/pda.dmi'
|
||||
if(2) icon = 'icons/obj/pda_slim.dmi'
|
||||
if(3) icon = 'icons/obj/pda_old.dmi'
|
||||
else icon = 'icons/obj/pda.dmi'
|
||||
else
|
||||
icon = 'icons/obj/pda_old.dmi'
|
||||
log_debug("Invalid switch for PDA, defaulting to old PDA icons. [pdachoice] chosen.")
|
||||
|
||||
|
||||
/obj/item/device/pda/proc/can_use()
|
||||
|
||||
|
||||
20
code/game/objects/items/devices/telecrystal.dm
Normal file
20
code/game/objects/items/devices/telecrystal.dm
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Telecrystal item
|
||||
Does nothing if not suitable antag type, checks for accept_tcrystals = 1 in a mob's mind.
|
||||
For new antags, make sure to add "player.mind.accept_tcrystals = 1" if you want tradable tcrystals.
|
||||
*/
|
||||
/obj/item/device/telecrystal
|
||||
name = "red crystal"
|
||||
desc = "A strange, red, glowing crystal."
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "telecrystal"
|
||||
item_state = "telecrystal"
|
||||
force = 5
|
||||
|
||||
/obj/item/device/telecrystal/attack_self(mob/user as mob)
|
||||
if(user.mind.accept_tcrystals) //Checks to see if antag type allows for tcrystals
|
||||
user.mind.tcrystals += 1
|
||||
user.drop_from_inventory(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -385,6 +385,12 @@ datum/uplink_item/dd_SortValue()
|
||||
item_cost = 3
|
||||
path = /obj/item/weapon/storage/secure/briefcase/money
|
||||
desc = "A briefcase with 10,000 untraceable thalers for funding your sneaky activities."
|
||||
|
||||
/datum/uplink_item/item/tools/crystal
|
||||
name = "Tradable Crystal"
|
||||
item_cost = 1
|
||||
path = /obj/item/device/telecrystal
|
||||
desc = "A telecrystal that can be transferred from one user to another. Be sure not to give it to just anyone."
|
||||
|
||||
/***********
|
||||
* Implants *
|
||||
|
||||
@@ -34,7 +34,7 @@ datum/preferences
|
||||
var/undershirt //undershirt type
|
||||
var/socks //socks type
|
||||
var/backbag = 2 //backpack type
|
||||
var/pdachoice = 1 //PDA type
|
||||
var/pdachoice = 3 //PDA type
|
||||
var/h_style = "Bald" //Hair type
|
||||
var/r_hair = 0 //Hair color
|
||||
var/g_hair = 0 //Hair color
|
||||
|
||||
7
html/changelogs/DatraenTCrystalItem.yml
Normal file
7
html/changelogs/DatraenTCrystalItem.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
author: Datraen
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Telecrystal item added for trading telecrystals between traitors and mercenaries."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -651,6 +651,7 @@
|
||||
#include "code\game\objects\items\devices\suit_cooling.dm"
|
||||
#include "code\game\objects\items\devices\t_scanner.dm"
|
||||
#include "code\game\objects\items\devices\taperecorder.dm"
|
||||
#include "code\game\objects\items\devices\telecrystal.dm"
|
||||
#include "code\game\objects\items\devices\traitordevices.dm"
|
||||
#include "code\game\objects\items\devices\transfer_valve.dm"
|
||||
#include "code\game\objects\items\devices\uplink.dm"
|
||||
|
||||
Reference in New Issue
Block a user