This commit is contained in:
Geeves
2021-03-01 17:40:59 +02:00
committed by GitHub
parent 0d5ada01c8
commit 714448e714
42 changed files with 307 additions and 497 deletions
-4
View File
@@ -525,7 +525,6 @@
#include "code\game\gamemodes\endgame\supermatter_cascade\blob.dm"
#include "code\game\gamemodes\endgame\supermatter_cascade\portal.dm"
#include "code\game\gamemodes\endgame\supermatter_cascade\universe.dm"
#include "code\game\gamemodes\events\black_hole.dm"
#include "code\game\gamemodes\events\clang.dm"
#include "code\game\gamemodes\events\dust.dm"
#include "code\game\gamemodes\events\power_failure.dm"
@@ -760,7 +759,6 @@
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\glowshroom.dm"
#include "code\game\objects\effects\landmarks.dm"
#include "code\game\objects\effects\manifest.dm"
#include "code\game\objects\effects\misc.dm"
#include "code\game\objects\effects\overlays.dm"
#include "code\game\objects\effects\plastic_explosive.dm"
@@ -2753,8 +2751,6 @@
#include "code\modules\spell_system\spells\spell_projectile.dm"
#include "code\modules\spell_system\spells\spell_verb.dm"
#include "code\modules\spell_system\spells\spells.dm"
#include "code\modules\spell_system\spells\hand\hand.dm"
#include "code\modules\spell_system\spells\hand\hand_item.dm"
#include "code\modules\spell_system\spells\spell_list\aoe_turf.dm"
#include "code\modules\spell_system\spells\spell_list\conjure.dm"
#include "code\modules\spell_system\spells\spell_list\construct_spells.dm"
@@ -799,7 +799,6 @@
SearchVar(sent_faxes)
SearchVar(alldepartments)
SearchVar(admin_departments)
SearchVar(photo_count)
SearchVar(possible_cable_coil_colours)
SearchVar(rad_collectors)
SearchVar(blacklisted_tesla_types)
@@ -36,7 +36,8 @@
/obj/effect/gateway/active/cult/cultify()
return
/obj/effect/gateway/active/New()
/obj/effect/gateway/active/Initialize(mapload, ...)
. = ..()
addtimer(CALLBACK(src, .proc/do_spawn), rand(30, 60) SECONDS)
/obj/effect/gateway/active/proc/do_spawn()
-93
View File
@@ -1,93 +0,0 @@
/obj/effect/bhole
name = "black hole"
icon = 'icons/obj/objects.dmi'
desc = "FUCK FUCK FUCK AAAHHH"
icon_state = "bhole3"
opacity = 1
unacidable = 1
density = 0
anchored = 1
/obj/effect/bhole/New()
spawn(4)
controller()
/obj/effect/bhole/proc/controller()
while(src)
if(!isturf(loc))
qdel(src)
return
//DESTROYING STUFF AT THE EPICENTER
for(var/mob/living/M in orange(1,src))
qdel(M)
for(var/obj/O in orange(1,src))
qdel(O)
var/turf/T = loc
var/base_turf = T.baseturf
for(var/turf/simulated/ST in orange(1,src))
if(ST.type == base_turf)
continue
ST.ChangeTurf(base_turf)
sleep(6)
grav(10, 4, 10, 0 )
sleep(6)
grav( 8, 4, 10, 0 )
sleep(6)
grav( 9, 4, 10, 0 )
sleep(6)
grav( 7, 3, 40, 1 )
sleep(6)
grav( 5, 3, 40, 1 )
sleep(6)
grav( 6, 3, 40, 1 )
sleep(6)
grav( 4, 2, 50, 6 )
sleep(6)
grav( 3, 2, 50, 6 )
sleep(6)
grav( 2, 2, 75,25 )
sleep(6)
//MOVEMENT
if( prob(50) )
src.anchored = 0
step(src,pick(alldirs))
src.anchored = 1
/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
qdel(src)
return
for(var/t = -r, t < r, t++)
affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
return
/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
//Get turf at coordinate
var/turf/T = locate(x, y, z)
if(isnull(T)) return
//Pulling and/or ex_act-ing movable atoms in that turf
if( prob(pull_chance) )
for(var/obj/O in T.contents)
if(O.anchored)
O.ex_act(ex_act_force)
else
step_towards(O,src)
for(var/mob/living/M in T.contents)
step_towards(M,src)
//Destroying the turf
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
var/turf/simulated/ST = T
var/base_turf = get_base_turf_by_area(src)
if(ST.type != base_turf)
ST.ChangeTurf(base_turf)
+145 -163
View File
@@ -6,53 +6,57 @@
unacidable = 1
simulated = 0
invisibility = 101
var/delete_me = 0
/obj/effect/landmark/New()
..()
var/add_to_landmark_list = TRUE
/obj/effect/landmark/Initialize()
. = ..()
var/do_qdel = do_landmark_action()
if(do_qdel)
return INITIALIZE_HINT_QDEL
if(add_to_landmark_list)
landmarks_list += src
/obj/effect/landmark/Destroy()
landmarks_list -= src
return ..()
/obj/effect/landmark/proc/do_landmark_action()
tag = text("landmark*[]", name)
switch(name) //some of these are probably obsolete
if("monkey")
monkeystart += loc
delete_me = 1
return
return TRUE
if("start")
newplayer_start = get_turf(loc)
delete_me = 1
return
return TRUE
if("JoinLate")
latejoin += loc
delete_me = 1
return
return TRUE
if("KickoffLocation")
kickoffsloc += loc
delete_me = 1
return
return TRUE
if("JoinLateGateway")
latejoin_gateway += loc
delete_me = 1
return
return TRUE
if("JoinLateCryo")
latejoin_cryo += loc
delete_me = 1
return
return TRUE
if("JoinLateCryoCommand")
latejoin_cryo_command += loc
delete_me = 1
return
return TRUE
if("JoinLateCyborg")
latejoin_cyborg += loc
delete_me = 1
return
return TRUE
if("JoinLateMerchant")
latejoin_merchant += loc
delete_me = 1
return
return TRUE
if("prisonwarp")
prisonwarp += loc
delete_me = 1
return
return TRUE
if("Holding Facility")
holdingfacility += loc
if("tdome1")
@@ -65,43 +69,24 @@
tdomeobserve += loc
if("prisonsecuritywarp")
prisonsecuritywarp += loc
delete_me = 1
return
return TRUE
if("xeno_spawn")
xeno_spawn += loc
delete_me = 1
return
return TRUE
if("endgame_exit")
endgame_safespawns += loc
delete_me = 1
return
return TRUE
if("bluespacerift")
endgame_exits += loc
delete_me = 1
return
return TRUE
if("asteroid spawn")
asteroid_spawn += loc
delete_me = 1
return
return TRUE
if("skrell_entry")
dream_entries += loc
delete_me = 1
return
return TRUE
landmarks_list += src
return 1
/obj/effect/landmark/proc/delete()
delete_me = 1
/obj/effect/landmark/Initialize()
. = ..()
if(delete_me)
qdel(src)
/obj/effect/landmark/Destroy()
landmarks_list -= src
return ..()
return FALSE
/obj/effect/landmark/start
name = "start"
@@ -110,146 +95,143 @@
anchored = 1.0
invisibility = 101
/obj/effect/landmark/start/New()
..()
/obj/effect/landmark/start/do_landmark_action()
tag = "start*[name]"
return 1
return FALSE
//Costume spawner landmarks
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
/obj/effect/landmark/costume/do_landmark_action() //costume spawner, selects a random subclass and disappears
var/list/options = typesof(/obj/effect/landmark/costume)
var/PICK= options[rand(1,options.len)]
new PICK(src.loc)
delete_me = 1
var/costume_type = pick(options)
new costume_type(loc)
return TRUE
//SUBCLASSES. Spawn a bunch of items and disappear likewise
/obj/effect/landmark/costume/chicken/New()
new /obj/item/clothing/suit/chickensuit(src.loc)
new /obj/item/clothing/head/chicken(src.loc)
new /obj/item/reagent_containers/food/snacks/egg(src.loc)
delete_me = 1
/obj/effect/landmark/costume/chicken/do_landmark_action()
new /obj/item/clothing/suit/chickensuit(loc)
new /obj/item/clothing/head/chicken(loc)
new /obj/item/reagent_containers/food/snacks/egg(loc)
return TRUE
/obj/effect/landmark/costume/gladiator/New()
new /obj/item/clothing/under/gladiator(src.loc)
new /obj/item/clothing/head/helmet/gladiator(src.loc)
delete_me = 1
/obj/effect/landmark/costume/gladiator/do_landmark_action()
new /obj/item/clothing/under/gladiator(loc)
new /obj/item/clothing/head/helmet/gladiator(loc)
return TRUE
/obj/effect/landmark/costume/madscientist/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/suit/storage/toggle/labcoat(src.loc)
new /obj/item/clothing/glasses/regular(src.loc)
delete_me = 1
/obj/effect/landmark/costume/madscientist/do_landmark_action()
new /obj/item/clothing/under/gimmick/rank/captain/suit(loc)
new /obj/item/clothing/head/flatcap(loc)
new /obj/item/clothing/suit/storage/toggle/labcoat(loc)
new /obj/item/clothing/glasses/regular(loc)
return TRUE
/obj/effect/landmark/costume/elpresidente/New()
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
new /obj/item/clothing/head/flatcap(src.loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(src.loc)
new /obj/item/clothing/shoes/jackboots(src.loc)
delete_me = 1
/obj/effect/landmark/costume/elpresidente/do_landmark_action()
new /obj/item/clothing/under/gimmick/rank/captain/suit(loc)
new /obj/item/clothing/head/flatcap(loc)
new /obj/item/clothing/mask/smokable/cigarette/cigar/havana(loc)
new /obj/item/clothing/shoes/jackboots(loc)
return TRUE
/obj/effect/landmark/costume/maid/New()
new /obj/item/clothing/under/skirt/(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
new CHOICE(src.loc)
new /obj/item/clothing/glasses/sunglasses/blindfold(src.loc)
delete_me = 1
/obj/effect/landmark/costume/maid/do_landmark_action()
new /obj/item/clothing/under/skirt(loc)
var/maid_headwear_type = pick(/obj/item/clothing/head/beret, /obj/item/clothing/head/rabbitears)
new maid_headwear_type(loc)
new /obj/item/clothing/glasses/sunglasses/blindfold(loc) // hollup
return TRUE
/obj/effect/landmark/costume/butler/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/under/suit_jacket(src.loc)
new /obj/item/clothing/head/that(src.loc)
delete_me = 1
/obj/effect/landmark/costume/butler/do_landmark_action()
new /obj/item/clothing/suit/wcoat(loc)
new /obj/item/clothing/under/suit_jacket(loc)
new /obj/item/clothing/head/that(loc)
return TRUE
/obj/effect/landmark/costume/scratch/New()
new /obj/item/clothing/gloves/white(src.loc)
new /obj/item/clothing/shoes/white(src.loc)
new /obj/item/clothing/under/suit_jacket/white(src.loc)
if (prob(30))
new /obj/item/clothing/head/cueball(src.loc)
delete_me = 1
/obj/effect/landmark/costume/scratch/do_landmark_action()
new /obj/item/clothing/gloves/white(loc)
new /obj/item/clothing/shoes/white(loc)
new /obj/item/clothing/under/suit_jacket/white(loc)
if(prob(30))
new /obj/item/clothing/head/cueball(loc)
return TRUE
/obj/effect/landmark/costume/highlander/New()
new /obj/item/clothing/under/kilt(src.loc)
new /obj/item/clothing/head/beret/red(src.loc)
delete_me = 1
/obj/effect/landmark/costume/highlander/do_landmark_action()
new /obj/item/clothing/under/kilt(loc)
new /obj/item/clothing/head/beret/red(loc)
return TRUE
/obj/effect/landmark/costume/prig/New()
new /obj/item/clothing/suit/wcoat(src.loc)
new /obj/item/clothing/glasses/monocle(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
new CHOICE(src.loc)
new /obj/item/clothing/shoes/black(src.loc)
new /obj/item/cane(src.loc)
new /obj/item/clothing/under/sl_suit(src.loc)
new /obj/item/clothing/mask/fakemoustache(src.loc)
delete_me = 1
/obj/effect/landmark/costume/prig/do_landmark_action()
new /obj/item/clothing/suit/wcoat(loc)
new /obj/item/clothing/glasses/monocle(loc)
var/hat_path = pick(/obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
new hat_path(loc)
new /obj/item/clothing/shoes/black(loc)
new /obj/item/cane(loc)
new /obj/item/clothing/under/sl_suit(loc)
new /obj/item/clothing/mask/fakemoustache(loc)
return TRUE
/obj/effect/landmark/costume/plaguedoctor/New()
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
delete_me = 1
/obj/effect/landmark/costume/plaguedoctor/do_landmark_action()
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(loc)
new /obj/item/clothing/head/plaguedoctorhat(loc)
return TRUE
/obj/effect/landmark/costume/nightowl/New()
new /obj/item/clothing/under/owl(src.loc)
new /obj/item/clothing/mask/gas/owl_mask(src.loc)
delete_me = 1
/obj/effect/landmark/costume/nightowl/do_landmark_action()
new /obj/item/clothing/under/owl(loc)
new /obj/item/clothing/mask/gas/owl_mask(loc)
return TRUE
/obj/effect/landmark/costume/waiter/New()
new /obj/item/clothing/under/waiter(src.loc)
new /obj/item/clothing/head/rabbitears(src.loc)
new /obj/item/clothing/suit/apron(src.loc)
delete_me = 1
/obj/effect/landmark/costume/waiter/do_landmark_action()
new /obj/item/clothing/under/waiter(loc)
new /obj/item/clothing/head/rabbitears(loc)
new /obj/item/clothing/suit/apron(loc)
return TRUE
/obj/effect/landmark/costume/pirate/New()
new /obj/item/clothing/suit/pirate(src.loc)
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana/pirate)
new CHOICE(src.loc)
new /obj/item/clothing/glasses/eyepatch(src.loc)
delete_me = 1
/obj/effect/landmark/costume/pirate/do_landmark_action()
new /obj/item/clothing/suit/pirate(loc)
var/hat_path = pick(/obj/item/clothing/head/pirate, /obj/item/clothing/head/bandana/pirate)
new hat_path(loc)
new /obj/item/clothing/glasses/eyepatch(loc)
return TRUE
/obj/effect/landmark/costume/commie/New()
new /obj/item/clothing/head/ushanka/grey(src.loc)
delete_me = 1
/obj/effect/landmark/costume/commie/do_landmark_action()
new /obj/item/clothing/head/ushanka/grey(loc)
return TRUE
/obj/effect/landmark/costume/imperium_monk/New()
new /obj/item/clothing/suit/imperium_monk(src.loc)
if (prob(25))
new /obj/item/clothing/mask/gas/cyborg(src.loc)
delete_me = 1
/obj/effect/landmark/costume/imperium_monk/do_landmark_action()
new /obj/item/clothing/suit/imperium_monk(loc)
if(prob(25))
new /obj/item/clothing/mask/gas/cyborg(loc)
return TRUE
/obj/effect/landmark/costume/holiday_priest/New()
new /obj/item/clothing/suit/holidaypriest(src.loc)
delete_me = 1
/obj/effect/landmark/costume/holiday_priest/do_landmark_action()
new /obj/item/clothing/suit/holidaypriest(loc)
return TRUE
/obj/effect/landmark/costume/marisawizard/fake/New()
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
delete_me = 1
/obj/effect/landmark/costume/marisawizard/fake/do_landmark_action()
new /obj/item/clothing/head/wizard/marisa/fake(loc)
new/obj/item/clothing/suit/wizrobe/marisa/fake(loc)
return TRUE
/obj/effect/landmark/costume/cutewitch/New()
new /obj/item/clothing/under/sundress(src.loc)
new /obj/item/clothing/head/witchwig(src.loc)
new /obj/item/staff/broom(src.loc)
delete_me = 1
/obj/effect/landmark/costume/cutewitch/do_landmark_action()
new /obj/item/clothing/under/sundress(loc)
new /obj/item/clothing/head/witchwig(loc)
new /obj/item/staff/broom(loc)
return TRUE
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
new /obj/item/staff/(src.loc)
delete_me = 1
/obj/effect/landmark/costume/fakewizard/do_landmark_action()
new /obj/item/clothing/suit/wizrobe/fake(loc)
new /obj/item/clothing/head/wizard/fake(loc)
new /obj/item/staff(loc)
return TRUE
/obj/effect/landmark/costume/sexyclown/New()
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
new /obj/item/clothing/under/sexyclown(src.loc)
delete_me = 1
/obj/effect/landmark/costume/sexyclown/do_landmark_action()
new /obj/item/clothing/mask/gas/sexyclown(loc)
new /obj/item/clothing/under/sexyclown(loc)
return TRUE
/obj/effect/landmark/costume/sexymime/New()
new /obj/item/clothing/mask/gas/sexymime(src.loc)
new /obj/item/clothing/under/sexymime(src.loc)
delete_me = 1
/obj/effect/landmark/costume/sexymime/do_landmark_action()
new /obj/item/clothing/mask/gas/sexymime(loc)
new /obj/item/clothing/under/sexymime(loc)
return TRUE
/obj/effect/landmark/dungeon_spawn
name = "asteroid spawn"
-21
View File
@@ -1,21 +0,0 @@
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen/generic.dmi'
icon_state = "x"
unacidable = 1//Just to be sure.
/obj/effect/manifest/New()
src.invisibility = 101
return
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
return
+5 -3
View File
@@ -19,9 +19,11 @@
name = "bottle of BeezEez"
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle17"
New()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
randpixel = 5
/obj/item/beezeez/Initialize()
. = ..()
randpixel_xy()
/obj/item/reagent_containers/food/snacks/honeycomb
name = "honeycomb"
+4 -3
View File
@@ -19,8 +19,8 @@
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
/obj/item/device/spy_bug/New()
..()
/obj/item/device/spy_bug/Initialize()
. = ..()
radio = new(src)
camera = new(src)
listening_objects += src
@@ -67,7 +67,8 @@
var/obj/machinery/camera/spy/selected_camera
var/list/obj/machinery/camera/spy/cameras = new()
/obj/item/device/spy_monitor/New()
/obj/item/device/spy_monitor/Initialize()
. = ..()
radio = new(src)
listening_objects += src
+30 -24
View File
@@ -22,17 +22,20 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/ui_host()
return loc
/obj/item/device/uplink/New(var/location, var/datum/mind/owner, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
..()
src.uplink_owner = owner
purchase_log = list()
world_uplinks += src
uses = telecrystals
/obj/item/device/uplink/Initialize(mapload, var/datum/mind/owner, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
. = ..()
do_uplink_action(owner, telecrystals)
/obj/item/device/uplink/Destroy()
world_uplinks -= src
return ..()
/obj/item/device/uplink/proc/do_uplink_action(var/datum/mind/owner, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
src.uplink_owner = owner
purchase_log = list()
world_uplinks += src
uses = telecrystals
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
@@ -53,15 +56,16 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/exploit_id // Id of the current exploit record we are viewing
var/pda_code = ""
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
spawn(2)
if(!istype(src.loc, /obj/item))
qdel(src)
/obj/item/device/uplink/hidden/do_uplink_action(var/datum/mind/owner, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
..()
nanoui_data = list()
update_nano_data()
addtimer(CALLBACK(src, .proc/check_loc), 2)
/obj/item/device/uplink/hidden/proc/check_loc()
if(!isitem(loc))
qdel(src)
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
@@ -314,26 +318,28 @@ A list of items and costs is stored under the datum of every game mode, alongsid
// Includes normal radio uplink, multitool uplink,
// implant uplink (not the implant tool) and a preset headset uplink.
/obj/item/device/radio/uplink/New(var/loc, var/mind)
/obj/item/device/radio/uplink/Initialize(mapload, var/datum/mind/mind)
. = ..()
hidden_uplink = new(src, mind)
icon_state = "radio"
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
/obj/item/device/radio/uplink/attack_self(mob/user)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/multitool/uplink/New(var/loc, var/mind)
/obj/item/device/multitool/uplink/Initialize(mapload, var/datum/mind/mind)
. = ..()
hidden_uplink = new(src, mind)
/obj/item/device/multitool/uplink/attack_self(mob/user as mob)
/obj/item/device/multitool/uplink/attack_self(mob/user)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/radio/headset/uplink
traitor_frequency = 1445
/obj/item/device/radio/headset/uplink/New(var/loc, var/mind)
..()
/obj/item/device/radio/headset/uplink/Initialize(mapload, var/datum/mind/mind)
. = ..()
hidden_uplink = new(src, mind)
hidden_uplink.uses = DEFAULT_TELECRYSTAL_AMOUNT
@@ -349,13 +355,13 @@ A list of items and costs is stored under the datum of every game mode, alongsid
flags = CONDUCT
w_class = ITEMSIZE_SMALL
/obj/item/device/contract_uplink/New(var/loc, var/mind)
..()
/obj/item/device/contract_uplink/Initialize(mapload, var/datum/mind/mind)
. = ..()
hidden_uplink = new(src, mind)
hidden_uplink.uses = 0
hidden_uplink.nanoui_menu = 3
/obj/item/device/contract_uplink/attack_self(mob/user as mob)
/obj/item/device/contract_uplink/attack_self(mob/user)
if (hidden_uplink)
hidden_uplink.trigger(user)
@@ -368,7 +374,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
desc_antag = "This device allows you to create a single central command report. It has only one use."
w_class = ITEMSIZE_SMALL
/obj/item/device/announcer/attack_self(mob/user as mob)
/obj/item/device/announcer/attack_self(mob/user)
if(!player_is_antag(user.mind))
return
@@ -394,8 +400,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
w_class = ITEMSIZE_SMALL
var/starting_telecrystals // how much telecrystals the uplink should spawn with, defaults to default amount if not set
/obj/item/device/special_uplink/New(var/loc, var/mind)
..()
/obj/item/device/special_uplink/Initialize(mapload, var/datum/mind/mind)
. = ..()
hidden_uplink = new(src, mind)
if(!starting_telecrystals)
hidden_uplink.uses = DEFAULT_TELECRYSTAL_AMOUNT
@@ -403,7 +409,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
hidden_uplink.uses = starting_telecrystals
hidden_uplink.nanoui_menu = 1
/obj/item/device/special_uplink/attack_self(mob/user as mob)
/obj/item/device/special_uplink/attack_self(mob/user)
if(hidden_uplink)
hidden_uplink.trigger(user)
+3 -3
View File
@@ -43,10 +43,10 @@
drop_sound = 'sound/items/drop/rubber.ogg'
pickup_sound = 'sound/items/pickup/rubber.ogg'
/obj/item/toy/waterballoon/New()
var/datum/reagents/R = new/datum/reagents(10)
/obj/item/toy/waterballoon/Initialize()
. = ..()
var/datum/reagents/R = new /datum/reagents(10, src)
reagents = R
R.my_atom = src
/obj/item/toy/waterballoon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
+12 -12
View File
@@ -6,40 +6,40 @@
icon_state = "lipstick"
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
var/colour = "red"
var/lipstick_color = "red"
var/open = 0
drop_sound = 'sound/items/drop/screwdriver.ogg'
pickup_sound = 'sound/items/pickup/screwdriver.ogg'
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
lipstick_color = "purple"
/obj/item/lipstick/jade
name = "jade lipstick"
colour = "jade"
lipstick_color = "jade"
/obj/item/lipstick/black
name = "black lipstick"
colour = "black"
lipstick_color = "black"
/obj/item/lipstick/pink
name = "pink lipstick"
colour = "pink"
lipstick_color = "pink"
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
colour = pick("red","purple","jade","pink","black")
name = "[colour] lipstick"
/obj/item/lipstick/random/Initialize()
. = ..()
name = "[lipstick_color] lipstick"
lipstick_color = pick("red","purple","jade","pink","black")
/obj/item/lipstick/attack_self(mob/user as mob)
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
open = !open
if(open)
icon_state = "[initial(icon_state)]_[colour]"
icon_state = "[initial(icon_state)]_[lipstick_color]"
else
icon_state = initial(icon_state)
@@ -56,7 +56,7 @@
if(H == user)
user.visible_message("<span class='notice'>[user] does their lips with \the [src].</span>", \
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
H.lip_style = colour
H.lip_style = lipstick_color
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
@@ -64,7 +64,7 @@
if(do_after(user, 20) && do_after(H, 20, 0)) //user needs to keep their active hand, H does not.
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
"<span class='notice'>You apply \the [src].</span>")
H.lip_style = colour
H.lip_style = lipstick_color
H.update_body()
else
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
@@ -24,7 +24,8 @@
var/datatype=0
var/value=0
/obj/item/dnainjector/New()
/obj/item/dnainjector/Initialize()
. = ..()
if(datatype && block)
buf=new
buf.dna=new
@@ -236,23 +236,26 @@
origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4)
sharp = 1
edge = 1
var/possible_blade_colors = "{'red':1,'blue':1,'green':1,'purple':1}"
var/blade_color
shield_power = 75
/obj/item/melee/energy/sword/New()
blade_color = pick("red","blue","green","purple")
/obj/item/melee/energy/sword/Initialize()
. = ..()
blade_color = pick(json_decode(possible_blade_colors))
/obj/item/melee/energy/sword/green/New()
/obj/item/melee/energy/sword/green
possible_blade_colors = "{'green':1}"
blade_color = "green"
/obj/item/melee/energy/sword/red/New()
blade_color = "red"
/obj/item/melee/energy/sword/red
possible_blade_colors = "{'red':1}"
/obj/item/melee/energy/sword/blue/New()
blade_color = "blue"
/obj/item/melee/energy/sword/blue
possible_blade_colors = "{'blue':1}"
/obj/item/melee/energy/sword/purple/New()
blade_color = "purple"
/obj/item/melee/energy/sword/purple
possible_blade_colors = "{'blue':1}"
/obj/item/melee/energy/sword/activate(mob/living/user)
if(!active)
+2 -1
View File
@@ -23,7 +23,8 @@
power = 2
size = "large"
/obj/item/syndie/c4explosive/New()
/obj/item/syndie/c4explosive/Initialize()
. = ..()
var/K = rand(1,2000)
K = md5(num2text(K)+name)
K = copytext(K,1,7)
+2 -1
View File
@@ -20,7 +20,8 @@
var/force_piano = FALSE
var/broken = 0 //Whether or not the piano can actually be played.
/obj/structure/device/piano/New()
/obj/structure/device/piano/Initialize(mapload)
. = ..()
if(prob(50) && !force_piano)
name = "space minimoog"
desc = "This is a minimoog, like a space piano, but more spacey!"
-4
View File
@@ -1119,10 +1119,6 @@
if(!check_rights(R_FUN,0))
removed_paths += dirty_path
continue
else if(ispath(path, /obj/effect/bhole))
if(!check_rights(R_FUN,0))
removed_paths += dirty_path
continue
paths += path
if(!paths)
+4 -3
View File
@@ -26,9 +26,10 @@ var/intercom_range_display_status = 0
icon = 'icons/480x480.dmi'
icon_state = "25percent"
New()
src.pixel_x = -224
src.pixel_y = -224
/obj/effect/debugging/camera_range/Initialize(mapload, ...)
. = ..()
pixel_x = -224
pixel_y = -224
/obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi'
+5 -4
View File
@@ -13,14 +13,15 @@
name = "budget insulated gloves"
icon_state = "yellow"
item_state = "yellow"
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
siemens_coefficient = 1 //Set to a default of 1, gets overridden in initialize
permeability_coefficient = 0.05
drop_sound = 'sound/items/drop/rubber.ogg'
pickup_sound = 'sound/items/pickup/rubber.ogg'
New()
//average of 0.5, somewhat better than regular gloves' 0.75
siemens_coefficient = pick(0,0.1,0.3,0.5,0.5,0.75,1.35)
/obj/item/clothing/gloves/fyellow/Initialize(mapload, material_key)
. = ..()
//average of 0.5, somewhat better than regular gloves' 0.75
siemens_coefficient = pick(0,0.1,0.3,0.5,0.5,0.75,1.35)
/obj/item/clothing/gloves/black
desc = "These work gloves are thick and fire-resistant."
+2 -1
View File
@@ -3,7 +3,8 @@
desc = "Finally! A children's card game in space!"
icon_state = "card_pack_cardemon"
/obj/item/pack/cardemon/New()
/obj/item/pack/cardemon/Initialize()
. = ..()
var/datum/playingcard/P
var/i
for(i=0; i<5; i++)
+3 -2
View File
@@ -3,7 +3,8 @@
desc = "Officially licensed to take your money."
icon_state = "card_pack_spaceball"
/obj/item/pack/spaceball/New()
/obj/item/pack/spaceball/Initialize()
. = ..()
var/datum/playingcard/P
var/i
var/year = 554 + text2num(time2text(world.timeofday, "YYYY"))
@@ -20,4 +21,4 @@
P.card_icon = "spaceball_standard"
P.back_icon = "card_back_spaceball"
cards += P
cards += P
+2 -1
View File
@@ -275,7 +275,8 @@
return 1
return 0
/obj/item/holo/esword/New()
/obj/item/holo/esword/Initialize()
. = ..()
if(!item_color)
item_color = pick("red","blue","green","purple")
@@ -18,6 +18,7 @@
#endif
/atom/movable/lighting_overlay/New()
// im too scared to touch this - geeves
SSlighting.total_lighting_overlays++
var/turf/T = loc // If this runtimes atleast we'll know what's creating overlays in things that aren't turfs.
+3 -1
View File
@@ -17,7 +17,9 @@
var/sides = 2
var/cmineral = null
var/last_flip = 0 //Spam limiter
/obj/item/coin/New()
/obj/item/coin/Initialize()
. = ..()
randpixel_xy()
/obj/item/coin/gold
+2 -2
View File
@@ -411,9 +411,9 @@ var/list/mineral_can_smooth_with = list(
//otherwise, they come out inside a chunk of rock
var/obj/item/X
if(prob_clean)
X = new /obj/item/archaeological_find(src, new_item_type = F.find_type)
X = new /obj/item/archaeological_find(src, F.find_type)
else
X = new /obj/item/ore/strangerock(src, inside_item_type = F.find_type)
X = new /obj/item/ore/strangerock(src, F.find_type)
geologic_data.UpdateNearbyArtifactInfo(src) //AAAAAAAAAAAAAAAAAAAAAAAAAA
X:geologic_data = geologic_data //AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -1,3 +1,4 @@
// someone please just turn this into a structure
/mob/living/silicon/decoy
name = "AI"
icon = 'icons/mob/AI.dmi'//
@@ -5,12 +6,13 @@
anchored = 1 // -- TLE
canmove = 0
/mob/living/silicon/decoy/New()
src.icon = 'icons/mob/AI.dmi'
src.icon_state = "ai"
src.anchored = 1
src.canmove = 0
/mob/living/silicon/decoy/Initialize()
. = ..()
return INITIALIZE_HINT_NORMAL
mob_list -= src
living_mob_list -= src
silicon_mob_list -= src
icon = 'icons/mob/AI.dmi'
icon_state = "ai"
anchored = 1
canmove = 0
return INITIALIZE_HINT_NORMAL
+4 -1
View File
@@ -1,8 +1,11 @@
// If you add a more comprehensive system, just untick this file.
// WARNING: Only works for up to 17 z-levels!
/obj/effect/landmark/map_data
add_to_landmark_list = FALSE
// If the height is more than 1, we mark all contained levels as connected.
/obj/effect/landmark/map_data/New()
/obj/effect/landmark/map_data/do_landmark_action()
SSatlas.height_markers += src
/obj/effect/landmark/map_data/proc/setup()
@@ -134,6 +134,7 @@
var/destruction_timer
/atom/movable/openspace/overlay/New()
// im too scared to touch this - geeves
initialized = TRUE
SSzcopy.openspace_overlays += src
+1
View File
@@ -9,6 +9,7 @@ var/list/cached_space = list()
known = 0
/obj/effect/overmap/visitable/sector/temporary/New(var/nx, var/ny, var/nz)
// since this is a recent bay port, i assume not calling parent is intentional - geeves | 25/02/2021
loc = locate(nx, ny, current_map.overmap_z)
x = nx
y = ny
-5
View File
@@ -21,8 +21,6 @@
/********
* photo *
********/
var/global/photo_count = 0
/obj/item/photo
name = "photo"
desc = "An archaic means of visual preservation, kept alive as kitschy memorabilia by paparazzi, conspiracy theorists and teenage girls."
@@ -40,9 +38,6 @@ var/global/photo_count = 0
drop_sound = 'sound/items/drop/paper.ogg'
pickup_sound = 'sound/items/pickup/paper.ogg'
/obj/item/photo/New()
id = photo_count++
/obj/item/photo/attack_self(mob/user as mob)
user.examinate(src)
@@ -31,15 +31,12 @@
movement_range = 20
energy = 50
/obj/effect/accelerated_particle/New(loc, dir = 2)
src.forceMove(loc)
src.set_dir(dir)
/obj/effect/accelerated_particle/Initialize(mapload, dir = SOUTH)
. = ..()
set_dir(dir)
if(movement_range > 20)
movement_range = 20
spawn(0)
move(1)
return
INVOKE_ASYNC(src, .proc/move, 1)
/obj/effect/accelerated_particle/Collide(atom/A)
. = ..()
@@ -9,9 +9,9 @@
muzzle_type = null
/obj/item/projectile/bullet/chemdart/New()
reagents = new/datum/reagents(reagent_amount)
reagents.my_atom = src
/obj/item/projectile/bullet/chemdart/Initialize()
. = ..()
reagents = new /datum/reagents(reagent_amount, src)
/obj/item/projectile/bullet/chemdart/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
if(blocked < 100 && ishuman(target))
+1
View File
@@ -4,6 +4,7 @@
var/hidden = TRUE
/obj/screen/psi/New(var/mob/living/_owner)
// since this is a recent bay port, i assume this not calling parent is intentional - geeves | 25/02/2021
loc = null
owner = _owner
update_icon()
@@ -41,7 +41,8 @@
var/datum/artifact_find/artifact_find
var/last_act = 0
/obj/structure/boulder/New()
/obj/structure/boulder/Initialize(mapload)
. = ..()
icon_state = "boulder[rand(1,4)]"
excavation_level = rand(5,50)
@@ -32,12 +32,12 @@
var/method = 0// 0 = fire, 1 = brush, 2 = pick
origin_tech = list(TECH_MATERIAL = 5)
/obj/item/ore/strangerock/New(loc, var/inside_item_type = 0)
..(loc)
/obj/item/ore/strangerock/Initialize(mapload, var/inside_item_type = 0)
. = ..()
//method = rand(0,2)
if(inside_item_type)
inside = new/obj/item/archaeological_find(src, new_item_type = inside_item_type)
inside = new /obj/item/archaeological_find(src, inside_item_type)
if(!inside)
inside = locate() in contents
@@ -84,7 +84,8 @@
icon_state = "ano01"
var/find_type = 0
/obj/item/archaeological_find/New(loc, var/new_item_type)
/obj/item/archaeological_find/Initialize(mapload, var/new_item_type)
. = ..()
if(new_item_type)
find_type = new_item_type
else
@@ -553,7 +554,7 @@
if(talkative)
new_item.talking_atom = new(new_item)
qdel(src)
return INITIALIZE_HINT_QDEL
else if(talkative)
src.talking_atom = new(src)
src.talking_atom = new(src)
@@ -9,15 +9,16 @@
desc = "It's a fossil."
var/animal = 1
/obj/item/fossil/base/New()
var/list/l = list("/obj/item/fossil/bone"=9,"/obj/item/fossil/skull"=3,
"/obj/item/fossil/skull/horned"=2)
var/t = pickweight(l)
var/obj/item/W = new t(src.loc)
/obj/item/fossil/base/Initialize()
..()
var/list/possible_fossils = list(/obj/item/fossil/bone = 9, /obj/item/fossil/skull = 3, /obj/item/fossil/skull/horned = 2)
var/fossil_path = pickweight(possible_fossils)
var/obj/item/fossil = new fossil_path(src.loc)
var/turf/T = get_turf(src)
if(istype(T, /turf/simulated/mineral))
T:last_find = W
qdel(src)
var/turf/simulated/mineral/M = T
M.last_find = fossil
return INITIALIZE_HINT_QDEL
/obj/item/fossil/bone
name = "Fossilised bone"
@@ -53,7 +54,8 @@
var/bstate = 0
var/plaque_contents = "Unnamed alien creature"
/obj/skeleton/New()
/obj/skeleton/Initialize(mapload, ...)
. = ..()
src.breq = rand(6)+3
src.desc = "An incomplete skeleton, looks like it could use [src.breq-src.bnum] more bones."
@@ -100,5 +102,6 @@
desc = "It's fossilised plant remains."
animal = 0
/obj/item/fossil/plant/New()
icon_state = "plant[rand(1,4)]"
/obj/item/fossil/plant/Initialize()
. = ..()
icon_state = "plant[rand(1,4)]"
@@ -64,8 +64,8 @@
var/wight_check_index = 1
var/list/shadow_wights = list()
/obj/item/vampiric/New()
..()
/obj/item/vampiric/Initialize()
. = ..()
START_PROCESSING(SSprocessing, src)
listening_objects += src
@@ -157,8 +157,8 @@
var/turf/target_turf
var/loc_last_process
/obj/effect/decal/cleanable/blood/splatter/animated/New()
..()
/obj/effect/decal/cleanable/blood/splatter/animated/Initialize(mapload)
. = ..()
START_PROCESSING(SSprocessing, src)
loc_last_process = src.loc
@@ -192,7 +192,8 @@
icon_state = "shade"
density = 1
/obj/effect/shadow_wight/New()
/obj/effect/shadow_wight/Initialize(mapload, ...)
. = ..()
START_PROCESSING(SSprocessing, src)
/obj/effect/shadow_wight/Destroy()
@@ -26,11 +26,12 @@
var/source_rock = "/turf/simulated/mineral/"
var/datum/geosample/geological_data
/obj/item/rocksliver/New()
/obj/item/rocksliver/Initialize()
. = ..()
icon_state = "sliver[rand(1,3)]"
randpixel_xy()
create_reagents(50)
reagents.add_reagent(/decl/reagent/stone_dust,50)
reagents.add_reagent(/decl/reagent/stone_dust, 50)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Geosample datum
@@ -5,7 +5,9 @@
notices = 5
icon_state = "nboard05"
/obj/structure/noticeboard/anomaly/New()
/obj/structure/noticeboard/anomaly/Initialize()
. = ..()
//add some memos
var/obj/item/paper/P = new()
P.name = "Memo RE: proper analysis procedure"
@@ -8,8 +8,9 @@
var/stored_charge = 0
var/effect_id = ""
/obj/item/anobattery/New()
battery_effect = new()
/obj/item/anobattery/Initialize()
. = ..()
battery_effect = new /datum/artifact_effect()
/obj/item/anobattery/proc/UpdateSprite()
var/p = (stored_charge/capacity)*100
@@ -1,33 +0,0 @@
/spell/hand
var/min_range = 0
var/list/compatible_targets = list()
var/casts = 1
var/spell_delay = 5
var/move_delay
var/click_delay
var/hand_state = "magic"
/spell/hand/choose_targets(mob/user = usr)
return list(user)
/spell/hand/cast(list/targets, mob/user)
for(var/mob/M in targets)
if(M.get_active_hand())
to_chat(user, "<span class='warning'>You need an empty hand to cast this spell.</span>")
return
var/obj/item/magic_hand/H = new(src)
if(!M.put_in_active_hand(H))
qdel(H)
return
to_chat(user, "You ready the [name] spell ([casts]/[casts] charges).")
/spell/hand/proc/valid_target(var/atom/a,var/mob/user) //we use seperate procs for our target checking for the hand spells.
var/distance = get_dist(a,user)
if((min_range && distance < min_range) || (range && distance > range))
return 0
if(!is_type_in_list(a,compatible_targets))
return 0
return 1
/spell/hand/proc/cast_hand(var/atom/a,var/mob/user) //same for casting.
return 1
@@ -1,56 +0,0 @@
/*much like grab this item is used primarily for the utility it provides.
Basically: I can use it to target things where I click. I can then pass these targets to a spell and target things not using a list.
*/
/obj/item/magic_hand
name = "Magic Hand"
icon = 'icons/mob/screen/generic.dmi'
flags = 0
abstract = 1
w_class = ITEMSIZE_HUGE
icon_state = "grabbed1"
var/next_spell_time = 0
var/spell/hand/hand_spell
var/casts = 0
/obj/item/magic_hand/New(var/spell/hand/S)
hand_spell = S
name = "[name] ([S.name])"
casts = S.casts
icon_state = S.hand_state
/obj/item/magic_hand/attack() //can't be used to actually bludgeon things
return 1
/obj/item/magic_hand/afterattack(atom/A, mob/living/user)
if(!hand_spell) //no spell? Die.
user.drop_from_inventory(src)
if(!hand_spell.valid_target(A,user))
return
if(world.time < next_spell_time)
to_chat(user, "<span class='warning'>The spell isn't ready yet!</span>")
return
if(hand_spell.cast_hand(A,user))
next_spell_time = world.time + hand_spell.spell_delay
casts--
if(hand_spell.move_delay)
user.setMoveCooldown(hand_spell.move_delay)
if(hand_spell.click_delay)
user.setClickCooldown(hand_spell.move_delay)
if(!casts)
user.drop_from_inventory(src)
return
to_chat(user, "[casts]/[hand_spell.casts] charges left.")
/obj/item/magic_hand/throw_at() //no throwing pls
usr.drop_from_inventory(src)
/obj/item/magic_hand/dropped() //gets deleted on drop
loc = null
qdel(src)
/obj/item/magic_hand/Destroy() //better save than sorry.
hand_spell = null
return ..()
+6
View File
@@ -0,0 +1,6 @@
author: Geeves
delete-after: True
changes:
- refactor: "Refactors how a lot of items handles being initialized. A full list of affected items can be found in the New Check PR."